Decompiling Python2.7 list literal produces indices instead of values
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Reproduce the issue using the provided r.py, Python 2.7.18, py_compile, and the uncompyle6 command, then inspect the Python 2.7 list-literal decompilation path. Compare the generated list with the constants in r.pyc and add coverage showing that [239, 168, 254, 54, 235, 128] is preserved rather than emitted as indices.
由索引模型根据 Issue 内容生成。
描述
Description
Decompiling Python2.7 list literal produces indices instead of values
How to Reproduce
$ printf 'x = 1\nL = [239, 168, 254, 54, 235, 128]\n' > r.py
$ python2 -c "import py_compile; py_compile.compile('r.py')"
$ uncompyle6 r.pyc
# uncompyle6 version 3.9.3
# Python bytecode version base 2.7 (62211)
# Decompiled from: Python 3.13.15 (main, Aug 12 2026, 10:32:31) [GCC 16.2.0]
# Embedded file name: r.py
# Compiled at: 2026-09-30 13:48:38
x = 1
L = [1, 2, 3, 4, 5, 6]
return
# okay decompiling r.pyc
Expected behavior
L = [239, 168, 254, 54, 235, 128]
Environment
uncompyle6, version 3.9.3
pydisasm, version 6.1.7
Python 2.7.18
Priority
It is a silent failure which can cost extra developer time.
Additional Context
- 主要语言
- Python
- 星标
- 4.3k
- 派生
- 465
- 平均合并
- 4 天 11 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rocky/python-uncompyle6 的其他 Issue
-
Works on decompyle3
难度 4/5 3-5 天 新手友好度 35/100
rocky/python-uncompyle6#506 · 1 条评论 ·
-
Python 3.8 Volunteer wanted Works on decompyle3
难度 4/5 3-5 天 新手友好度 35/100
rocky/python-uncompyle6#492 · 4 条评论 ·
-
Control Flow Python 3.8 Volunteer wanted Works on decompyle3
难度 4/5 3-5 天 新手友好度 45/100
rocky/python-uncompyle6#486 ·
-
Control Flow Python 3.8 Volunteer wanted Works on decompyle3
难度 4/5 3-5 天 新手友好度 45/100
rocky/python-uncompyle6#485 · 4 条评论 ·
-
Duplicate Python 3.9+
难度 5/5 一周以上 新手友好度 25/100
rocky/python-uncompyle6#484 · 9 个 reaction ·
查看 rocky/python-uncompyle6 的全部 Issue
相似的 Issue
-
Validate non-divisible effective batch sizes in the Unsloth LoRA backend可能已有人在做 @debesh-biswas 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
`rx.Model` event arguments emit `PydanticDeprecatedSince20` once per payload key可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
reflex-dev/reflex#7634 · 1 条评论 ·
维护者通常 2 天内回复
-
documentation
难度 1/5 1-3 小时 新手友好度 82/100
topoteretes/cognee#6239 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
ranaroussi/yfinance#3009 ·
维护者通常 1 天内回复
-
Test discovery aborts on GPU builds without cuStateVec: check_cuStateVec expects a failed result but set_config() now raises RuntimeError可能已有人在做 @dmeliksetian 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
Qiskit/qiskit-aer#2495 ·
维护者通常 1 天内回复