Closed andrem-eberle closed 1 year ago
Certain imports in Python 2.7 are being decompiled wrong
Input file.py:
"""a doc""" from contextlib import *
python2.7 -m compileall file.py && python3.8 uncompyle6 file.pyc
__doc__ = 'a doc' from .contextlib import *
It adds a relative import to contextlib which shouldn't be there.
Correct import line
Python 2.7.18 for compileall Python 3.8.16 for uncompyle6 Ubuntu 16.0x
Fixed by #449
Description
Certain imports in Python 2.7 are being decompiled wrong
How to Reproduce
Input file.py:
Output Given
It adds a relative import to contextlib which shouldn't be there.
Expected behavior
Correct import line
Environment
Python 2.7.18 for compileall Python 3.8.16 for uncompyle6 Ubuntu 16.0x