Decompiling Python2.7 list literal produces indices instead of values
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- compilers, reverse-engineering
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 4.3k
- Fork
- 464
- Merge medio
- 10h 7m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rocky/python-uncompyle6
-
Works on decompyle3
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
rocky/python-uncompyle6#506 · 1 commento ·
-
Python 3.8 Volunteer wanted Works on decompyle3
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
rocky/python-uncompyle6#492 · 4 commenti ·
-
Redundant "else:"ApertaControl Flow Python 3.8 Volunteer wanted Works on decompyle3
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
rocky/python-uncompyle6#486 ·
-
Missing "While True"ApertaControl Flow Python 3.8 Volunteer wanted Works on decompyle3
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
rocky/python-uncompyle6#485 · 4 commenti ·
-
Duplicate Python 3.9+
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
rocky/python-uncompyle6#484 · 9 reazioni ·
Tutte le issue di rocky/python-uncompyle6
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
openwisp/openwisp-utils#777 ·
-
Boolean statistics (Covered, Confident, JaccardDistant) aggregate to 1.0 without float weightsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
google-research/weatherbenchX#310 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
huggingface/peft#3955 ·
I maintainer di solito rispondono entro 1 giorno
-
author-page correction
Difficoltà 2/5 1-3 ore Idoneità per principianti 60/100
acl-org/acl-anthology#10313 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AOSSIE-Org/Gitcord-GithubDiscordBot#147 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno