Get ready for release 2.4.0

This commit is contained in:
rocky
2016-05-18 11:25:24 -04:00
parent b629a0c5df
commit 06edeeeb46
7 changed files with 230 additions and 17 deletions

189
ChangeLog
View File

@@ -1,7 +1,192 @@
2016-05-18 rocky <rocky@gnu.org>
* DECOMPYLE-2.4-CHANGELOG.txt, HISTORY.md, uncompyle6/version.py:
Get ready for release 2.4.0
2016-05-18 rocky <rocky@gnu.org>
* uncompyle6/verify.py: Add 3.5 to verify
2016-05-18 rocky <rocky@gnu.org>
* pytest/test_load.py, pytest/testdata/if-2.7.right,
pytest/testdata/ifelse-2.7.right, uncompyle6/disas.py,
uncompyle6/scanner.py, uncompyle6/scanners/scanner25.py,
uncompyle6/scanners/scanner26.py, uncompyle6/scanners/scanner27.py,
uncompyle6/scanners/scanner3.py, uncompyle6/scanners/scanner32.py,
uncompyle6/scanners/scanner33.py, uncompyle6/scanners/scanner34.py,
uncompyle6/scanners/scanner35.py, uncompyle6/scanners/tok.py,
uncompyle6/verify.py: pydisassemble improvements; DRY scannners disas.py: - disassembles *all* code objects found scanner*.py: - no longer need to pass in version numbers; this is obtained from the class name - no longer pass in opcodes; this is done at initialization from the scanner name - all Pythoin 3 scanners support native disassembly
2016-05-17 rocky <rocky@gnu.org>
* pytest/testdata/if-2.7.right, pytest/testdata/ifelse-2.7.right,
uncompyle6/bin/pydisassemble.py, uncompyle6/disas.py,
uncompyle6/scanners/scanner27.py, uncompyle6/scanners/tok.py: Go
over disassembly routine... * tok.py: - add arg value when it is an integer * pydisassemble.py: - add option -U --uncomplyle for which flavor of disassembly - remove -o option * scanner27.py: - allow for native (non-uncompyle6) output
2016-05-17 rocky <rocky@gnu.org>
* pytest/test_marsh.py,
test/simple_source/expression/02_complex.py, uncompyle6/marsh.py:
Fix marshal bug in handling complex numbers
2016-05-17 rocky <rocky@gnu.org>
* Makefile, test/simple_source/def/09_class_closure.py,
uncompyle6/parser.py, uncompyle6/parsers/parse3.py,
uncompyle6/semantics/fragments.py, uncompyle6/semantics/pysource.py:
Fix Python 3.x bugs * class definitions made via closures * Add "make check-short" to top-level * parse3.py: Python 3.3 uses STORE_LOGALS
2016-05-16 rocky <rocky@gnu.org>
* test/test_pyenvlib.py, uncompyle6/marsh.py,
uncompyle6/scanners/scanner3.py: Fix a number of small bugs... test_peynv.py: make Python3 compatible marsh.py: remove duplicate
test scanner3.py: fix opcode typo
2016-05-16 rocky <rocky@gnu.org>
* uncompyle6/parsers/parse3.py: Fix Python 3.x bug in function VAR
and KW args
2016-05-16 rocky <rocky@gnu.org>
* : Readd some 3.x loop tests
2016-05-16 rocky <rocky@gnu.org>
* pytest/test_fjt.py: pytest for last commit
2016-05-16 rocky <rocky@gnu.org>
* uncompyle6/semantics/fragments.py,
uncompyle6/semantics/pysource.py: Correct bugs in Python 3.2 source
generation
2016-05-16 rocky <rocky@gnu.org>
* Makefile: Travis can't handle pytest on Python 3.5
2016-05-16 rocky <rocky@gnu.org>
* HISTORY.md, Makefile, uncompyle6/parsers/parse3.py,
uncompyle6/scanner.py, uncompyle6/scanners/scanner27.py,
uncompyle6/scanners/scanner3.py: Python 2 loop scanner detection in
Python 3 scanner*.py: Make scanner27 and scanner3 more aligned Makefile: we
can run py.test on Python 3.5 HISTORY.md: grammar changes
2016-05-16 rocky <rocky@gnu.org>
* HISTORY.md, uncompyle6/main.py, uncompyle6/scanners/scanner27.py,
uncompyle6/scanners/scanner3.py, uncompyle6/verify.py: Misc small
changes Go over history yet again code cleanups.
2016-05-15 rocky <rocky@gnu.org>
* uncompyle6/parsers/parse3.py: Python3 mklambda bug
2016-05-15 rocky <rocky@gnu.org>
* test/simple_source/expression/08_genexpr.py,
test/simple_source/expression/10_genexpr.py,
uncompyle6/parsers/parse3.py: Python 3 genexpr bug
2016-05-15 rocky <rocky@gnu.org>
* HISTORY.md: Correct info on parser
2016-05-15 rocky <rocky@gnu.org>
* uncompyle6/parser.py, uncompyle6/parsers/parse2.py,
uncompyle6/parsers/parse3.py, uncompyle6/semantics/fragments.py,
uncompyle6/semantics/pysource.py: Bug in Python 3.x genexpr
2016-05-15 rocky <rocky@gnu.org>
* test/simple_source/expression/05_lambda.py,
test/test_pyenvlib.py, uncompyle6/parsers/parse3.py,
uncompyle6/scanners/scanner3.py, uncompyle6/semantics/pysource.py:
Fix bug in Python 3 lambda expression handling Some other small cleanup changes
2016-05-15 rocky <rocky@gnu.org>
* uncompyle6/bin/pydisassemble.py, uncompyle6/disas.py,
uncompyle6/parser.py, uncompyle6/parsers/parse3.py,
uncompyle6/scanners/scanner3.py, uncompyle6/scanners/scanner34.py,
uncompyle6/scanners/scanner35.py, uncompyle6/scanners/tok.py:
pydisassemble disassemble without grammar mangling Some other small cleanups as well
2016-05-15 rocky <rocky@gnu.org>
* uncompyle6/parser.py, uncompyle6/parsers/parse3.py: Fix verify bug
in 3.2
2016-05-15 rocky <rocky@gnu.org>
* test/simple_source/looping/12_if_while_bug.py,
uncompyle6/parsers/parse3.py: 3.4 if/while bug
2016-05-15 rocky <rocky@gnu.org>
* .travis.yml: force Travis 2.7.11 for Python 2.7
2016-05-15 rocky <rocky@gnu.org>
* test/ok_lib2.7/aifc.py, test/ok_lib2.7/antigravity.py,
test/ok_lib2.7/anydbm.py, test/ok_lib2.7/asynchat.py,
test/ok_lib2.7/atexit.py, test/ok_lib2.7/audiodev.py,
test/ok_lib2.7/base64.py, test/ok_lib2.7/binhex.py,
test/ok_lib2.7/bisect.py, test/ok_lib2.7/calendar.py,
test/ok_lib2.7/cgitb.py, test/ok_lib2.7/chunk.py,
test/ok_lib2.7/codeop.py, test/ok_lib2.7/colorsys.py,
test/ok_lib2.7/commands.py, test/ok_lib2.7/compileall.py,
test/ok_lib2.7/dircache.py, test/ok_lib2.7/dis.py,
test/test_pyenvlib.py: Add more Python 2.7 verify tests
2016-05-15 rocky <rocky@gnu.org>
* uncompyle6/semantics/fragments.py,
uncompyle6/semantics/pysource.py: Fix bug in kvlist handling on
Python 2.7 Created from previous DRY code in Python 3
2016-05-15 rocky <rocky@gnu.org>
* uncompyle6/parsers/parse3.py, uncompyle6/scanners/scanner3.py,
uncompyle6/scanners/scanner34.py, uncompyle6/scanners/scanner35.py,
uncompyle6/semantics/fragments.py, uncompyle6/semantics/pysource.py:
DRY scanner34 and scanner35 handle 3.0..3.4 build maps as key/value pairs
2016-05-15 rocky <rocky@gnu.org>
* uncompyle6/scanners/dis3.py: Optimize Python 2/3 code2num
2016-05-14 rocky <rocky@gnu.org>
* __pkginfo__.py, uncompyle6/version.py: Fix botched entry point
names Get ready for relase 2.3.6
* test/Makefile, uncompyle6/scanners/dis3.py: Python2 comptability
in using Python 3 disassembly Also fixes ablility to run bytecode 3.5 tests from 2.x now For Python 2 reading python3 bytstrings, we need to make sure we
confer the character to a number.
2016-05-14 rocky <rocky@gnu.org>
* uncompyle6/bin/pydisassemble.py, uncompyle6/scanners/dis3.py,
uncompyle6/scanners/dis35.py, uncompyle6/scanners/scanner34.py,
uncompyle6/scanners/scanner35.py: Start to DRY Python 3.4 and 3.5
scanners
2016-05-14 rocky <rocky@gnu.org>
* __pkginfo__.py, requirements.txt, setup.py: See if travis will
take spark 1.2.1
2016-05-14 rocky <rocky@gnu.org>
* uncompyle6/bin/pydisassemble.py, uncompyle6/bin/uncompile.py: Fix
names for <program> -V
2016-05-14 rocky <rocky@gnu.org>
* ChangeLog, __pkginfo__.py, uncompyle6/version.py: Fix botched
entry point names Get ready for relase 2.3.6
2016-05-14 rocky <rocky@gnu.org>

View File

@@ -1,6 +1,4 @@
This is the changelog from *decompyle*'s release 2.4 passed on by Dan Pascu
Yikes - uncompyle's version number should be higher so as to put this
in the past!
release 2.4 (Dan Pascu)

View File

@@ -4,7 +4,8 @@ There have been a number of people who have worked on this. I am awed
by the amount of work, number of people who have contributed to this,
and the cleverness in the code.
The below is an annotated history from my reading of the sources cited.
The below is an annotated history from talking to participants
involved and my reading of the code and sources cited.
In 1998, John Aycock first wrote a grammar parser in Python,
eventually called SPARK, that was usable inside a Python program. This
@@ -64,7 +65,8 @@ time, various JUMP instructions were classifed as going backwards, and
COME FROM instructions were reintroduced. See
RELEASE-2.4-CHANGELOG.txt for more details here. There wasn't a public
release of RELEASE-2.4 and bytecodes other than Python 2.4 weren't
supported.
supported. Dan says the Python 2.3 version could verify the entire
python library.
Next we get to ["uncompyle" and
PyPI](https://pypi.python.org/pypi/uncompyle/1.1) and the era of
@@ -95,7 +97,7 @@ This project, uncompyle6, however owes its existence to the fork of
uncompyle2 by Myst herie (Mysterie) whose first commit picks up at
2012. I chose this since it seemed to have been at that time the most
actively, if briefly, worked on. Also starting around 2012 is Dark
Fenx's uncompyle3 which I used for inspiration for Python3.
Fenx's uncompyle3 which I used for inspiration for Python3 support.
I started working on this late 2015, mostly to add fragment support.
In that, I decided to make this runnable on Python 3.2+ and Python 2.6+

17
NEWS
View File

@@ -1,4 +1,19 @@
uncompyle6 2.3.5 2016-05-14
uncompyle6 2.4.0 2016-05-18
- Many Python 3 bugs fixed:
* Python 3.2 to 3.5 libaries largely
uncompyle and most verify
- pydisassembler:
* disassembles all code objects in a file
* can select showing bytecode before
or after uncompyle mangling, option -U
- DRY scanner code (but more is desired)
- Some code cleanup (but more is desired)
- Misc Bugs fixed:
* handle complex number unmarshaling
* Running on Python 2 to works on Python 3.5 bytecodes now
uncompyle6 2.3.5 and 2.3.6 2016-05-14
- Python 2 class decorator fix (thanks to Tey)
- Fix fragment parsing bugs

View File

@@ -11,7 +11,7 @@ Introduction
------------
*uncompyle6* translates Python bytecode back into equivalent Python
source code. It accepts bytecodes from Python version 2.5 to 3.4 or
source code. It accepts bytecodes from Python version 2.5 to 3.5 or
so. The code requires Python 2.6 or later and has been tested on Python
running versions 2.6, 2.7, 3.2, 3.3, 3.4 and 3.5.
@@ -92,11 +92,16 @@ for usage help.
Known Bugs/Restrictions
-----------------------
Python 2 deparsing decompiles all of the Python 2.7.10 library and as
such is probably a little better than uncompyle2. Python 3 deparsing
is okay, sometimes. More work is needed to decompile all of its
library. Python 3.5 is missing some of new opcodes added, but still
often works.
Python 2 deparsing decompiles about the first 140 or so of the Python
2.7.10 and 2.7.11 standard library files and all but less that 10%
verify. So as such, it is probably a little better than uncompyle2.
Other Python 2 versions do worse.
Python 3 deparsing before 3.5 is okay, but even there, more work is needed to
decompile all of its library. Python 3.5 is missing some of new
opcodes and idioms added, but it still often works.
There is lots to do, so please dig in and help.
See Also
--------

View File

@@ -44,9 +44,11 @@ test_options = {
'2.1': (os.path.join(lib_prefix, 'python2.1'), PYC, 'python-lib2.1'),
'2.2': (os.path.join(lib_prefix, 'python2.2'), PYC, 'python-lib2.2'),
'2.5': (os.path.join(lib_prefix, 'python2.5'), PYC, 'python-lib2.5'),
'2.6.9': (os.path.join(lib_prefix, '2.6.9', 'python2.6'), PYC, 'python-lib2.6'),
'2.6.9': (os.path.join(lib_prefix, '2.6.9', 'lib', 'python2.6'), PYC, 'python-lib2.6'),
'2.7.10': (os.path.join(lib_prefix, '2.7.10', 'lib', 'python2.7'), PYC, 'python-lib2.7'),
'2.7.11': (os.path.join(lib_prefix, '2.7.11', 'lib', 'python2.7'), PYC, 'python-lib2.7'),
'3.2.6': (os.path.join(lib_prefix, '3.2.6', 'lib', 'python3.2'), PYC, 'python-lib3.2'),
'3.3.5': (os.path.join(lib_prefix, '3.3.5', 'lib', 'python3.3'), PYC, 'python-lib3.3'),
'3.4.2': (os.path.join(lib_prefix, '3.4.2', 'lib', 'python3.4'), PYC, 'python-lib3.4')
}
@@ -86,6 +88,12 @@ def do_tests(src_dir, patterns, target_dir, start_with=None, do_verify=False):
except ValueError:
pass
if len(files) > 200:
files = [file for file in files if not 'site-packages' in file]
files = [file for file in files if not 'test' in file]
if len(files) > 200:
files = files[:200]
print(time.ctime())
main.main(src_dir, target_dir, files, [], do_verify=do_verify)
print(time.ctime())
@@ -120,7 +128,7 @@ if __name__ == '__main__':
shutil.rmtree(target_dir, ignore_errors=1)
do_tests(src_dir, pattern, target_dir, start_with, do_verify)
else:
print('### skipping', src_dir)
print("### Path %s doesn't exist; skipping" % src_dir)
# python 1.5:

View File

@@ -1,3 +1,3 @@
# This file is suitable for sourcing inside bash as
# well as importing into Python
VERSION='2.3.6'
VERSION='2.4.0'