X Tutup
Skip to content

Commit 1a8a0df

Browse files
committed
Merge branch 'master' into python-2.4
2 parents 0a37709 + d22931c commit 1a8a0df

39 files changed

+348
-155
lines changed

ChangeLog

Lines changed: 100 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,105 @@
1+
2016-12-04 rocky <rb@dustyfeet.com>
2+
3+
* uncompyle6/version.py: Get ready for release 2.9.7
4+
5+
2016-11-28 rocky <rb@dustyfeet.com>
6+
7+
* uncompyle6/parsers/parse3.py, uncompyle6/parsers/parse36.py:
8+
Shorten Python3 grammars with + and *
9+
10+
2016-11-28 rocky <rb@dustyfeet.com>
11+
12+
* __pkginfo__.py, uncompyle6/parser.py,
13+
uncompyle6/parsers/parse2.py: Try new spark 2.5.1 grammar syntax
14+
shortcuts This package I now declare stable
15+
16+
2016-11-28 R. Bernstein <rocky@users.noreply.github.com>
17+
18+
* README.rst: Update README.rst
19+
20+
2016-11-27 rocky <rb@dustyfeet.com>
21+
22+
* README.rst: Limitations of decompiling control structures.
23+
24+
2016-11-27 R. Bernstein <rocky@users.noreply.github.com>
25+
26+
* : Merge pull request #69 from rocky/ast-reduce-checks AST reduce checks
27+
28+
2016-11-26 rocky <rb@dustyfeet.com>
29+
30+
* test/simple_source/bug26/03_elif_vs_continue.py,
31+
uncompyle6/main.py, uncompyle6/parser.py,
32+
uncompyle6/parsers/parse2.py, uncompyle6/scanners/scanner2.py,
33+
uncompyle6/scanners/scanner26.py: Misc changes scanner26.py: make scanner2.py and scanner26.py more alike
34+
scanner2.py: check that return stmt is last in list. (May change)
35+
main.py: show filename on verify error test/*: add more
36+
37+
2016-11-25 rocky <rb@dustyfeet.com>
38+
39+
* __pkginfo__.py, test/Makefile, uncompyle6/parser.py,
40+
uncompyle6/parsers/parse2.py, uncompyle6/parsers/parse3.py: Start
41+
grammar reduction checks
42+
43+
2016-11-24 rocky <rb@dustyfeet.com>
44+
45+
* uncompyle6/parsers/parse27.py, uncompyle6/scanners/scanner2.py,
46+
uncompyle6/semantics/helper.py, uncompyle6/semantics/pysource.py:
47+
2.7 grammar bug workaround. Fix docstring bug
48+
49+
2016-11-24 rocky <rb@dustyfeet.com>
50+
51+
* uncompyle6/semantics/pysource.py: Better line number tracking Indent Python 2 list comprehensions, albeit badly. DRY code a
52+
little via indent_if_source_nl
53+
54+
2016-11-24 rocky <rb@dustyfeet.com>
55+
56+
* uncompyle6/parsers/parse3.py, uncompyle6/scanners/scanner2.py:
57+
<2.7 "if" detection and dup Python 3 grammar rule
58+
59+
2016-11-23 rocky <rb@dustyfeet.com>
60+
61+
* __pkginfo__.py, pytest/test_grammar.py, uncompyle6/parser.py,
62+
uncompyle6/parsers/parse26.py: Python 2.6 grammary bug and.. __pkginfo.py__: Bump spark_parser version for parse_flags 'dups'
63+
64+
2016-11-23 rocky <rb@dustyfeet.com>
65+
66+
* __pkginfo__.py: Note that we now work on 2.4 and 2.5
67+
68+
2016-11-23 rocky <rb@dustyfeet.com>
69+
70+
* : commit 6aa1531972de83ecab15b4c96b89c873ea5a7458 Author: rocky
71+
<rb@dustyfeet.com> Date: Wed Nov 23 00:48:38 2016 -0500
72+
73+
2016-11-22 rocky <rb@dustyfeet.com>
74+
75+
* uncompyle6/parsers/parse3.py, uncompyle6/parsers/parse32.py,
76+
uncompyle6/parsers/parse33.py, uncompyle6/parsers/parse34.py,
77+
uncompyle6/parsers/parse35.py: DRY Python3 grammar
78+
79+
2016-11-22 rocky <rb@dustyfeet.com>
80+
81+
* uncompyle6/parsers/parse2.py, uncompyle6/parsers/parse27.py,
82+
uncompyle6/scanners/scanner2.py: More detailed COME_FROMs For now we only add COME_FROM_FINALLY and COME_FROM_WITH and even
83+
here only on 2.7
84+
85+
2016-11-22 rocky <rb@dustyfeet.com>
86+
87+
* circle.yml, pytest/test_grammar.py, tox.ini,
88+
uncompyle6/parser.py, uncompyle6/parsers/parse2.py,
89+
uncompyle6/parsers/parse27.py: Remove redundant 2.7 (and 2.x)
90+
grammar rules
91+
92+
2016-11-22 rocky <rb@dustyfeet.com>
93+
94+
* pytest/test_docstring.py, uncompyle6/linenumbers.py,
95+
uncompyle6/semantics/fragments.py, uncompyle6/semantics/helper.py,
96+
uncompyle6/semantics/make_function.py,
97+
uncompyle6/semantics/pysource.py: Split out print_docstring move from pysource.py to new helper.py
98+
199
2016-11-20 rocky <rb@dustyfeet.com>
2100

3-
* uncompyle6/version.py: Get ready for release 2.9.6
101+
* ChangeLog, NEWS, uncompyle6/version.py: Get ready for release
102+
2.9.6
4103

5104
2016-11-20 R. Bernstein <rocky@users.noreply.github.com>
6105

NEWS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
uncompyle6 2.9.6 2016-12-04
2+
3+
- Shorten Python3 grammars with + and *
4+
this requires spark parser 1.5.1
5+
- Add some AST reduction checks to improve
6+
decompile accuracy. This too requires
7+
spark parser 1.5.1
8+
19
uncompyle6 2.9.6 2016-11-20
210

311
- Correct MANIFEST.in

README.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ information.
4343
Requirements
4444
------------
4545

46-
This project requires Python 2.6 or later, PyPy 3-2.4, or PyPy-5.0.1.
46+
This project requires Python 2.6 or later, PyPy 3-2.4, or PyPy-5.0.1.
47+
Python versions 2.3-2.7 are supported in the python-2.4 branch.
4748
The bytecode files it can read has been tested on Python bytecodes from
4849
versions 2.1-2.7, and 3.2-3.6 and the above-mentioned PyPy versions.
4950

@@ -97,7 +98,8 @@ Known Bugs/Restrictions
9798
-----------------------
9899

99100
The biggest known and possibly fixable (but hard) problem has to do
100-
with handling control flow. In some cases we can detect an erroneous
101+
with handling control flow. All of the Python decompilers I have looked
102+
at have the same problem. In some cases we can detect an erroneous
101103
decompilation and report that.
102104

103105
About 90% of the decompilation of Python standard library packages in
@@ -109,14 +111,17 @@ Other versions drop off in quality too.
109111
a Python for that bytecode version, and then comparing the bytecode
110112
produced by the decompiled/compiled program. Some allowance is made
111113
for inessential differences. But other semantically equivalent
112-
differences are not caught. For example ``if x: foo()`` is
113-
equivalent to ``x and foo()`` and decompilation may turn one into the
114-
other. *Weak Verification* on the other hand doesn't check bytecode
115-
for equivalence but does check to see if the resulting decompiled
116-
source is a valid Python program by running the Python
117-
interpreter. Because the Python language has changed so much, for best
118-
results you should use the same Python Version in checking as used in
119-
the bytecode.
114+
differences are not caught. For example ``1 and 0`` is decompiled to
115+
the equivalent ``0``; remnants of the first true evaluation (1) is
116+
lost when Python compiles this. When Python next compiles ``0`` the
117+
resulting code is simpler.
118+
119+
*Weak Verification*
120+
on the other hand doesn't check bytecode for equivalence but does
121+
check to see if the resulting decompiled source is a valid Python
122+
program by running the Python interpreter. Because the Python language
123+
has changed so much, for best results you should use the same Python
124+
Version in checking as used in the bytecode.
120125

121126
Later distributions average about 200 files. There is some work to do
122127
on the lower end Python versions which is more difficult for us to

__pkginfo__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
Copyright (C) 2015, 2016 Rocky Bernstein <rb@dustyfeet.com>.
1313
"""
1414

15-
classifiers = ['Development Status :: 4 - Beta',
15+
classifiers = ['Development Status :: 5 - Production/Stable',
1616
'Intended Audience :: Developers',
1717
'Operating System :: OS Independent',
1818
'Programming Language :: Python',
@@ -37,7 +37,7 @@
3737
'pydisassemble=uncompyle6.bin.pydisassemble:main',
3838
]}
3939
ftp_url = None
40-
install_requires = ['spark-parser >= 1.4.3, < 1.5.0',
40+
install_requires = ['spark-parser >= 1.5.1, < 1.6.0',
4141
'xdis >= 3.2.3, < 3.3.0']
4242
license = 'MIT'
4343
mailing_list = 'python-debugger@googlegroups.com'

test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ check-bytecode-2.6:
104104

105105
#: Check deparsing Python 2.7
106106
check-bytecode-2.7:
107-
$(PYTHON) test_pythonlib.py --bytecode-2.7
107+
$(PYTHON) test_pythonlib.py --bytecode-2.7 --verify
108108

109109
#: Check deparsing Python 3.0
110110
check-bytecode-3.0:

test/bytecode_2.6/01_boolean.pyc

-157 Bytes
Binary file not shown.
534 Bytes
Binary file not shown.
File renamed without changes.
383 Bytes
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)
X Tutup