{
  "added_at": "2026-11-02",
  "additional_evidence_urls": [
    "https://github.com/rocky/python-decompile3/blob/0b97289634ffed8b785be5463ebab7cdf1743a15/NEWS.md",
    "https://github.com/rocky/python-decompile3/blob/0b97289634ffed8b785be5463ebab7cdf1743a15/pyproject.toml",
    "https://github.com/rocky/python-decompile3/blob/0b97289634ffed8b785be5463ebab7cdf1743a15/decompyle3/version.py",
    "https://github.com/rocky/python-decompile3/blob/0b97289634ffed8b785be5463ebab7cdf1743a15/decompyle3/bin/decompile.py",
    "https://github.com/rocky/python-decompile3/blob/0b97289634ffed8b785be5463ebab7cdf1743a15/decompyle3/bin/decompile_code_type.py",
    "https://github.com/rocky/python-decompile3/blob/0b97289634ffed8b785be5463ebab7cdf1743a15/.github/workflows/ubuntu.yml",
    "https://github.com/rocky/python-decompile3/tree/0b97289634ffed8b785be5463ebab7cdf1743a15/test",
    "https://github.com/rocky/python-decompile3/blob/0b97289634ffed8b785be5463ebab7cdf1743a15/COPYING",
    "https://github.com/rocky/python-decompile3/releases/tag/3.9.3",
    "https://pypi.org/project/decompyle3/3.9.3/"
  ],
  "category": "native-analysis",
  "description_en": "Reworking of uncompyle6 by the same author that translates Python 3.7 and 3.8 bytecode, including some PyPy 3.7 and 3.8 bytecode, back into equivalent Python source; older bytecode stays with uncompyle6. It disassembles code objects with the companion xdis library, then tokenizes and parses the instruction stream with a refactored grammar into a tree from which source is printed, and it can decompile between given start and stop offsets or, through decompyle3-code, only a file's lambdas, generators and comprehensions. The README says the grammar rewrite does not by itself fix uncompyle6's control-flow problem, which the author is addressing with dominator-based analysis in a separate, non-public project.",
  "description_zh": "uncompyle6 作者对该项目的重构版本，可把 Python 3.7 和 3.8 的字节码（包括部分 PyPy 3.7 和 3.8 字节码）还原为等价的 Python 源码；更早版本的字节码仍由 uncompyle6 处理。它借助配套的 xdis 库反汇编代码对象，再用重构后的语法对指令流进行词法处理和解析，生成语法树并据此输出源码；它还能只反编译给定起止偏移之间的代码，或通过 decompyle3-code 只反编译文件中的 lambda、生成器和各类推导式。README 指出，仅靠语法重写并不能解决 uncompyle6 在控制流上的根本问题，作者正在另一个未公开的项目中用基于支配关系的分析来解决。",
  "entry_url": "https://awesomerea.org/resources/decompyle3/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/decompyle3/",
  "evidence_url": "https://github.com/rocky/python-decompile3/blob/0b97289634ffed8b785be5463ebab7cdf1743a15/README.rst",
  "group": "tools",
  "id": "decompyle3",
  "json_url": "https://awesomerea.org/resources/decompyle3/record.json",
  "kind": "tool",
  "markdown_url": "https://awesomerea.org/resources/decompyle3/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/decompyle3/index.md",
  "name": "decompyle3",
  "name_zh": "decompyle3 Python 3.7–3.8 字节码反编译器",
  "record_type": "resource",
  "relationship": "foundation",
  "requirements": [
    "Latest release at review: 3.9.3, published 2025-10-01 on GitHub and PyPI; the reviewed master commit, from 2026-07-21, is 18 commits later and reports 3.9.4.dev0. The README says the code runs on Python 3.7 or 3.8, whereas pyproject.toml requires Python 3.7+ with classifiers through 3.13, master CI tests under Python 3.13, and a separate python-3.7-to-3.10 branch is tested under 3.8; the 3.9.3 release also ships wheels and eggs for 3.7, 3.8 and 3.9. It depends on xdis newer than 6.2, spark-parser 1.8.9 up to but not including 1.9.2, and click; master CI installs xdis from its git repository until the next xdis release.",
    "The README reports testing on bytecode from Python 3.7 and 3.8, and the regression suite keeps compiled 3.7 and 3.8 samples plus a few PyPy ones; the release notes state that bytecode newer than 3.8 is not decompiled. The author warns of numerous decompilation bugs and does not intend serious work on 3.8 or 3.9 until the project is better funded. Candidate-release magic numbers, PJOrion or otherwise obfuscated code, Cython and MicroPython are not handled, and pathologically long expression or statement lists are slow.",
    "Input .pyc or .pyo files come from the user; it cannot decompile Py2EXE executables directly, and bytecode bundled by such packagers has to be extracted first. The README's --syntax-verify option appears in the reviewed CLI as --verify syntax, next to --verify run; a syntax check is meaningful only when the checking interpreter matches the bytecode version, so the README suggests cross-checking with another decompiler such as unpyc37 and with programs that test themselves, including Python's standard-library tests. Recovered source remains subject to the rights of the original program’s owner.",
    "GPL-3.0-or-later per pyproject.toml, with the GPL-3.0 text in COPYING."
  ],
  "requirements_zh": [
    "审阅时最新版本为 3.9.3，于 2025-10-01 在 GitHub 和 PyPI 发布；所审阅的 master 提交日期为 2026-07-21，比该版本晚 18 个提交，版本号为 3.9.4.dev0。README 称代码可在 Python 3.7 或 3.8 上运行，而 pyproject.toml 要求 Python 3.7+，分类信息列到 3.13；master 分支的 CI 在 Python 3.13 下测试，另有独立的 python-3.7-to-3.10 分支在 3.8 下测试；3.9.3 版本还另行提供面向 3.7、3.8 和 3.9 的 wheel 与 egg 包。依赖高于 6.2 的 xdis、1.8.9 及以上但低于 1.9.2 的 spark-parser，以及 click；在 xdis 发布下一个版本之前，master 分支的 CI 从其 git 仓库安装 xdis。",
    "README 称已用 Python 3.7 和 3.8 的字节码测试过，回归测试保留了 3.7 和 3.8 的编译样本以及少量 PyPy 样本；发布说明指出，高于 3.8 的字节码不会被反编译。作者提醒反编译仍有大量缺陷，并表示在项目获得更多资助之前不打算认真投入 3.8 或 3.9 的支持。候选发布版本的魔数、PJOrion 或其他混淆代码以及 Cython 和 MicroPython 均不受支持，处理超长的表达式或语句列表也很慢。",
    "输入的 .pyc 或 .pyo 文件由使用者提供；它不能直接反编译 Py2EXE 生成的可执行文件，这类打包程序中的字节码需先行提取。README 所述的 --syntax-verify 选项在所审阅的命令行中为 --verify syntax，另有 --verify run；只有当检查用的解释器与字节码版本一致时，语法检查才有意义，因此 README 建议用 unpyc37 等其他反编译器交叉核对，并借助能自我测试的程序（包括 Python 标准库的测试）进行检验。恢复出的源码仍受原程序权利人的权利约束。",
    "pyproject.toml 声明采用 GPL-3.0-or-later，COPYING 收录 GPL-3.0 全文。"
  ],
  "targets": [
    "app",
    "binary"
  ],
  "url": "https://github.com/rocky/python-decompile3",
  "verification": "source-reviewed",
  "verified_at": "2026-10-20"
}
