File redshift-no-imp.patch of Package redshift

Common subdirectories: redshift-1.12/data and redshift-1.12-new/data
Common subdirectories: redshift-1.12/m4 and redshift-1.12-new/m4
Common subdirectories: redshift-1.12/po and redshift-1.12-new/po
diff -u redshift-1.12/py-compile redshift-1.12-new/py-compile
--- redshift-1.12/py-compile	2017-07-28 17:58:10.000000000 -0400
+++ redshift-1.12-new/py-compile	2025-11-04 08:50:17.676743395 -0500
@@ -116,7 +116,7 @@
 fi
 
 $PYTHON -c "
-import sys, os, py_compile, imp
+import sys, os, py_compile, importlib.util as imp_util
 
 files = '''$files'''
 
@@ -129,8 +129,8 @@
 	    continue
     sys.stdout.write(file)
     sys.stdout.flush()
-    if hasattr(imp, 'get_tag'):
-        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
+    if hasattr(imp_util, 'cache_from_source'):
+        py_compile.compile(filepath, imp_util.cache_from_source(filepath), path)
     else:
         py_compile.compile(filepath, filepath + 'c', path)
 sys.stdout.write('\n')" || exit $?
@@ -154,7 +154,7 @@
     sys.stdout.write(file)
     sys.stdout.flush()
     if hasattr(imp, 'get_tag'):
-        py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
+        py_compile.compile(filepath, imp_util.cache_from_source(filepath, optimization=0), path)
     else:
         py_compile.compile(filepath, filepath + 'o', path)
 sys.stdout.write('\n')" 2>/dev/null || :
Common subdirectories: redshift-1.12/src and redshift-1.12-new/src
openSUSE Build Service is sponsored by