[issue35708] lib2to3 failed to convert as refactor's fixes not search.pyc files

2021-10-20 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
superseder:  -> Close 2to3 issues and list them here

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35708] lib2to3 failed to convert as refactor's fixes not search.pyc files

2019-01-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35708] lib2to3 failed to convert as refactor's fixes not search.pyc files

2019-01-10 Thread Nj Hsiong


New submission from Nj Hsiong :

python3's lib2to3 would fail in silence if python3 and its packages are 
installed as compiled .pyc files.

Root cause is in Lib/lib2to3/refactor.py, the function get_all_fix_names only 
searches '.py' fix names.

=below is workaround=
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
@@ -37,6 +37,12 @@
 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

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 93
nosy: njhsio
priority: normal
severity: normal
status: open
title: lib2to3 failed to convert as refactor's fixes not search.pyc files
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com