summaryrefslogtreecommitdiffstats
path: root/lang/python/python3/patches/017_lib2to3_fix_pyc_search.patch
blob: ab55f39660aa50f32dfe6ac3138840ac3ca6053e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
@@ -37,6 +37,12 @@ def get_all_fix_names(fixer_pkg, remove_
             if remove_prefix:
                 name = name[4:]
             fix_names.append(name[:-3])
+        if name.startswith("fix_") and name.endswith(".pyc"):
+            if remove_prefix:
+                name = name[4:]
+            name = name[:-4]
+            if name not in fix_names:
+                fix_names.append(name)
     return fix_names