Skip to content

Python 3.5.3: function arguments and body are missing #409

@EZForever

Description

@EZForever

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):

def main():
	pass

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.0 and latest commit on master (6c116fe, labeled as uncompyle6 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions