Python 3.5.3: function arguments and body are missing
Description
When decompiling Python 3.5.3 bytecode, almost all functions' argument list and entire function body are missing, leaving only def xxx where xxx is the function name.
How to Reproduce
Minimal example (save as mytest.py):
Compile on Python 3.5.3 with python -m compileall mytest.py, or use the file from attachment.
$ uncompyle6 mytest.cpython-35.pyc # uncompyle6 version 3.8.0 # Python bytecode 3.5.2 (3351) # Decompiled from: Python 3.9.2 (default, Feb 28 2021, 17:03:44) # [GCC 10.2.1 20210110] # Embedded file name: mytest.py # Compiled at: 2022-09-21 10:32:39 # Size of source mod 2**32: 18 bytes def main # okay decompiling mytest.cpython-35.pyc $
Source and bytecode from Python 3.5.3 and 3.8.10 (for comparision): mytest.zip
Output Given
See the console output above.
Expected behavior
Bytecode from Python 3.5.3 should decompile correctly as with Python 3.8.10 or other versions.
Environment
- Uncompyle6 version: tested on
uncompyle6 3.8.0and latest commit onmaster(6c116fe, labeled asuncompyle6 3.9.0a1) - Python version for the version of Python the byte-compiled the file:
3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] - OS and Version: Windows 10 21H2 x64