Compare commits

...

525 Commits

Author SHA1 Message Date
rocky
60d96b6a5a Merge branch 'master' into python-2.4 2019-05-19 17:11:30 -04:00
rocky
8fe6309650 Get ready for release 3.3.3 2019-05-19 16:55:52 -04:00
R. Bernstein
4c4aa393df Update HISTORY.md 2019-05-17 10:24:13 -04:00
R. Bernstein
a8b8c2908c Update README.rst 2019-05-15 03:25:06 -04:00
R. Bernstein
cb406e2581 Update README.rst 2019-05-15 03:24:33 -04:00
R. Bernstein
20b16c44ff Update README.rst 2019-05-15 03:22:05 -04:00
rocky
3abe8d11d3 3.7 handling of 4-level attribute import
Fixes #239
2019-05-14 12:09:38 -04:00
R. Bernstein
26140934da Merge pull request #237 from rocky/for-iter-come-from
Less dishonest COME_FROMs in 3.6+ code
2019-05-14 09:31:27 -04:00
x0ret
b62752eca1 2 more 3.7 chained comparison rule 2019-05-14 17:51:51 +04:30
rocky
9db446d928 Another 3.7 chained comparison rule 2019-05-14 07:26:18 -04:00
rocky
46acb74745 Only add forward-jumping COME_FROM in 3.6+
Is this a repeat commit?
2019-05-14 06:28:29 -04:00
rocky
44e1288e2f Less dishonest COME_FROMs
Addresses all of the problems seen in 3.7 datetime.py.

However we limit COME_FROMs only to forward jumps, not back (which in the case of Python code right now means looping) jumps.
2019-05-13 23:15:55 -04:00
R. Bernstein
ce9270dda0 Merge pull request #236 from x0ret/master
Python 3.7 decompiling full 3.7.3 library without error #235
2019-05-13 11:53:07 -04:00
x0ret
3d732db3cc fix chained compare parse error 2019-05-13 19:57:24 +04:30
x0ret
009a74da7d fix UnboundLocalError 2019-05-13 19:41:42 +04:30
R. Bernstein
251eb6da1b Merge pull request #233 from rocky/fstring
Revise format string handling
2019-05-13 09:43:47 -04:00
rocky
8b5e0f49f8 Handle {{ }} escape, but when appropriate 2019-05-13 09:41:16 -04:00
rocky
1cc08d9598 Make precedence table top-bottom order reference...
in https://docs.python.org/2/reference/expressions.html#operator-precedence or
https://docs.python.org/3/reference/expressions.html#operator-precedence
.
2019-05-13 09:41:16 -04:00
x0ret
d99e78d46d set precedences value for format strings 2019-05-13 09:41:09 -04:00
rocky
b94cce7b12 Revise format string handling
fstring_single{1,2} -> format_value{1,2} to match Python AST names
better
2019-05-13 09:40:32 -04:00
R. Bernstein
fe786b2b95 Merge pull request #232 from x0ret/master
handling LOAD_CONST in build_tuple and multiple call_ex_kw(s) issues
2019-05-12 06:11:11 -04:00
x0ret
bf56fbeeec enhance call_ex_kw(s) positional args handling 2019-05-12 13:11:31 +04:30
rocky
6d8d9fd83b Go over precedence in calls 2019-05-11 23:32:24 -04:00
rocky
78ca6a0c1f Add 3.7 testcase for ex_kw call 2019-05-11 19:37:44 -04:00
rocky
86dd321256 Accept x0ret's suggestion for 3.6+ if detection..
in the presense of a try block.

Fixes #229
2019-05-10 19:36:16 -04:00
rocky
4db364f701 And another tweak. 2019-05-10 17:29:03 -04:00
rocky
c03b039714 Small tweaks to last commit 2019-05-10 17:25:25 -04:00
R. Bernstein
d97509495e Merge pull request #230 from x0ret/master
implements n_call_ex_kw as discussed in #227
2019-05-10 16:57:44 -04:00
x0ret
4d793ba1b2 implements n_call_ex_kw as discussed in #227 2019-05-10 23:55:47 +04:30
R. Bernstein
590d2f44f1 Update README.rst 2019-05-10 09:29:47 -04:00
rocky
e875b79a75 Fix 3.6. call_ex_kw semantic action
Was missing positional args parameter in template. Fix submited by @x0ret

Fixes #227
2019-05-09 09:27:10 -04:00
rocky
b57ca392a2 2.7 confusion around "and" vs comprehension "if"
Fixes #225
2019-05-08 16:27:41 -04:00
rocky
a132e2ace6 Better 3.6+ async detection 2019-05-08 13:50:57 -04:00
rocky
f9bb0b0a46 Merge branch 'master' into python-2.4 2019-05-08 08:57:59 -04:00
rocky
b05500dd49 More 3.6+ fstring bugs 2019-05-08 08:57:30 -04:00
rocky
325bba5be5 Merge branch 'master' into python-2.4 2019-05-08 07:00:54 -04:00
rocky
65307f257c Administrivia 2019-05-08 06:06:53 -04:00
rocky
715bf9cbab Merge branch 'master' into python-2.4 2019-05-08 06:05:28 -04:00
rocky
8909fe8d37 Merge branch 'master' of github.com:rocky/python-uncompyle6 2019-05-08 06:04:11 -04:00
rocky
733a44e22f Revise and hopefully improve 3.6+ fstring handling 2019-05-08 06:03:39 -04:00
rocky
8187fdf4a6 Merge branch 'master' into python-2.4 2019-05-05 16:10:44 -04:00
rocky
f2f17740ee 2.7 if_expr_true restriction ...
condition_true -> if_expr_true
condition_lambda -> if_expr_lambda

These correspond to the Python AST names better.
2019-05-05 16:09:10 -04:00
rocky
393e5c9303 IfExp precidence handling in 2.6...
2.7 still has a bug
2019-05-05 09:48:20 -04:00
rocky
8c611476fe ifexpr -> if_expr (to track better AST camelcase) 2019-05-05 08:20:21 -04:00
rocky
6df65a87bc Fix precidence between list_if and if_expr in 3.x 2019-05-05 08:16:29 -04:00
rocky
bb94c7f5bc Ned custom 3.7+ IfExp rules 2019-05-04 22:57:06 -04:00
rocky
8e9ce0be31 3.7: if <expr> and not <expr> else <expr> 2019-05-04 22:14:07 -04:00
rocky
bc49469704 delete_subscr -> delete_subscript ...
to better (but not exactly) match the Python AST
2019-05-04 19:43:00 -04:00
rocky
5905cce1de Python 3.7 ifelse handling 2019-05-04 19:38:37 -04:00
rocky
af816c9e60 Administrivia 2019-05-03 23:25:25 -04:00
rocky
900a0980c1 Administrivia Add 2.6 back into older dist 2019-05-03 23:23:37 -04:00
rocky
da44660a72 2.6 doesn't have print_function 2019-05-03 23:22:01 -04:00
rocky
76c2883f62 Merge branch 'master' into python-2.4 2019-05-03 23:14:28 -04:00
rocky
82a3419eb2 Administrivia: bump testing versions 2019-05-03 23:11:42 -04:00
rocky
46ca21596f Get ready for release 3.3.2 2019-05-03 22:52:53 -04:00
rocky
6e753b8743 Handle 3.7 format_value tuples 2019-05-03 22:38:09 -04:00
rocky
0007abf827 Fix 3.6+ format string interpolation 2019-05-03 19:00:25 -04:00
rocky
7ecfb74e9a testtrue expr check nuked because of 3.7 2019-05-02 14:01:51 -04:00
rocky
2813e2212f tidy "not" precedence. 2019-05-02 11:44:20 -04:00
rocky
e2c5a79346 Add pypy3.6 scanner 2019-05-02 06:46:07 -04:00
rocky
293e7b0367 store_subscript precedence fix and...
Allow format specifier "%p" to indicate a nonterminal name,
like "%c" allows.

store_subscr -> store_subscript to match Python AST a little closer.
2019-05-02 06:43:53 -04:00
rocky
32bc017e2e Fix wrong node slot in 3.6 for except_handler 2019-05-01 14:23:00 -04:00
rocky
ce7015f382 Improve 3.x while1 reduction elimination 2019-05-01 11:10:16 -04:00
rocky
4cc53f2307 Python 3.6+ try/else with no trailing END_FINALLY 2019-05-01 09:46:56 -04:00
rocky
d2fccfe357 Merge branch 'master' into python-2.4 2019-05-01 09:18:12 -04:00
rocky
257bbc892f Better 3.6+ format specification handling 2019-05-01 09:17:35 -04:00
rocky
23b7e6db18 Better 3.6 FORMAT_VALUE handling 2019-04-30 23:09:26 -04:00
rocky
1727977828 Merge branch 'master' into python-2.4 2019-04-30 23:09:07 -04:00
rocky
fac365f216 Better fstring handling for FORMAT_VALUE | 0x4 2019-04-30 23:05:47 -04:00
rocky
f54cf20d9d Hacky handling of 3.6 format string 'X'. 2019-04-30 20:06:36 -04:00
rocky
03d23328eb 3.6 constant tuples in call 2019-04-30 16:25:48 -04:00
rocky
c074107504 Parser fix for 3.6 having long while loops 2019-04-30 15:46:00 -04:00
rocky
7fed369e88 Merge branch 'master' into python-2.4 2019-04-30 05:17:58 -04:00
rocky
a981db884c Pypy 3.6 tolerance 2019-04-30 05:12:42 -04:00
rocky
81bbb81a42 Merge branch 'master' into python-2.4 2019-04-27 04:41:14 -04:00
rocky
c5d7944e65 3.x while/else can now sometime have COME_FROMs 2019-04-27 04:37:24 -04:00
rocky
43dbf9b878 More 3.0 COME_FROMs 2019-04-23 19:31:27 -04:00
rocky
3fa444a98d Merge branch 'master' into python-2.4 2019-04-23 19:12:59 -04:00
rocky
efa964f7c9 del handling in 3.0 and add tests 2019-04-23 19:12:12 -04:00
rocky
5c58a4816f Fix 2.x delete statements expression confusion 2019-04-23 15:48:14 -04:00
rocky
5475934c0d Fix 2.x delete statements expression confusion 2019-04-23 15:44:05 -04:00
rocky
132a9acdb4 Was mssing 2.5 cond3 semantic rule 2019-04-23 13:09:14 -04:00
rocky
636257f879 Was mssing 2.5 cond3 semantic rule 2019-04-23 13:07:30 -04:00
rocky
c6bdfdd592 Merge branch 'master' into python-2.4 2019-04-23 11:54:58 -04:00
rocky
9186a3fc44 Fixes for pypy testing 2019-04-23 11:52:26 -04:00
rocky
05db6194ec Use up right 3.x opcodes in jump detection...
A small but pervasive, and I guess important change. More correct COME_FROMs
are now coming out. A number of grammar changes then in 3.0, 3.5, and 3.8
2019-04-23 05:14:29 -04:00
rocky
3730946a1a Add semantic rule for 3.x "conditionalnot" 2019-04-22 21:18:17 -04:00
rocky
f1b69a8a28 Add rule for 3.x comp_for 2019-04-22 18:42:21 -04:00
rocky
5a089c311a Merge branch 'master' into python-2.4 2019-04-19 06:03:07 -04:00
rocky
0e5eb954b2 Adminstrivia 2019-04-19 06:01:06 -04:00
rocky
7d9286b353 Get ready for release 3.3.1 2019-04-19 05:51:05 -04:00
rocky
0de99e5d44 Scale back "try" vs. "tryelse" reduction test on 3.6+ 2019-04-18 16:45:44 -04:00
rocky
52af2ba32a 3.6+ lambda parameter handling 2019-04-18 14:21:52 -04:00
rocky
bd0db6c539 Extend annotate test to 3.7 2019-04-18 09:47:54 -04:00
rocky
8663b4ca52 Fix bugs caused by last commit 2019-04-18 07:31:16 -04:00
rocky
b2dd58a85e Hacky attemp to add more 3.x annotate information in 2019-04-18 02:26:50 -04:00
rocky
97cb193a71 3.7 chained comparison grammar 2019-04-17 23:41:41 -04:00
rocky
e6e60cb49d 3.6 Chained compare 2019-04-17 15:44:33 -04:00
rocky
6c3639aef2 Merge branch 'master' into python-2.4 2019-04-16 10:41:17 -04:00
rocky
2ea8c3b1b1 3.7 and 3.8 chained compare fixups 2019-04-16 10:19:16 -04:00
rocky
701d2af54e Improve Python 2.7 generator handling 2019-04-15 23:14:44 -04:00
rocky
37ac0a3665 Merge branch 'master' into python-2.4 2019-04-15 20:35:01 -04:00
rocky
8a4189bc0e Python 2.6-2.7ish generator handling 2019-04-15 20:32:15 -04:00
rocky
40b910e4e2 Merge branch 'master' into python-2.4 2019-04-15 12:08:35 -04:00
rocky
0c4ab699b5 3.4+ while handling with returns ...
these while loops don't have a JUMP_BACK in them
2019-04-15 12:03:11 -04:00
rocky
8e11c53064 More cleanup from recent refactoring 2019-04-15 08:18:31 -04:00
rocky
b4c66d4307 Was missing some 3.7 and 3.7 semantic actions...
Possibly some as a result of the last refactor?
2019-04-15 08:11:31 -04:00
rocky
53968e535f Split up version-specific semantic action code more 2019-04-14 21:47:16 -04:00
rocky
d2381fbe11 Update dates and version numbers 2019-04-14 19:54:53 -04:00
rocky
e058377214 Merge branch 'master' into python-2.4 2019-04-14 19:29:52 -04:00
rocky
d413ebe0e1 Split out semantic actions per version ...
In version 3.5..3.8 there are quite hefty changes.
2019-04-14 19:25:56 -04:00
rocky
f96522e18e Add 3.8 try else 2019-04-14 19:01:33 -04:00
rocky
50d50af2ee Doc typo 2019-04-14 07:45:06 -04:00
rocky
57185d17fd 2.4-branch uncompyle6 doesn't support -c 2019-04-14 07:11:59 -04:00
rocky
f2e2bc7fa1 Merge branch 'master' into python-2.4 2019-04-14 07:11:10 -04:00
rocky
4dc2897cdc One last new item update 2019-04-14 07:10:30 -04:00
rocky
47fb80494d Get ready for release 3.3.0 2019-04-14 07:03:07 -04:00
rocky
830e19e3e6 Get ready for release 3.3.0 2019-04-14 06:59:49 -04:00
rocky
950035db9c Merge branch 'master' into python-2.4 2019-04-14 06:54:32 -04:00
rocky
c5cfd36a61 Start 3.8 async for/else 2019-04-14 06:54:08 -04:00
rocky
f36c11d9d7 Merge branch 'master' into python-2.4 2019-04-14 06:13:25 -04:00
rocky
9b550b9dda PEP E225 with a nod to Deepcommit 2019-04-14 06:11:16 -04:00
rocky
64a4b75ed9 Merge branch 'master' into python-2.4 2019-04-13 23:40:40 -04:00
rocky
400943bb6a 3.8 async for/with...
More is needed though.
2019-04-13 22:22:37 -04:00
rocky
f89ba40147 Adjust while True grammar rule 2019-04-13 20:46:13 -04:00
rocky
32c611a315 Adjust 3.8 while-stmt rules 2019-04-13 20:35:26 -04:00
rocky
5d91e96358 3.6-3.8 "async for" handling...
And add an if_stmt rule for 3.8. My want to extend it back to
other versions.
2019-04-13 18:31:40 -04:00
rocky
44edf1d7db 3.8 try/except handling - again (and more to come) 2019-04-12 03:20:13 -04:00
rocky
a891aa0706 More 3.8 try blocks 2019-04-11 16:42:28 -04:00
rocky
5e1340a2fc 3.8 exception handling 2019-04-11 12:09:24 -04:00
rocky
94eff282f8 3.8 try/except 2019-04-11 07:44:32 -04:00
rocky
7f65a8a6dd 3.8 SETUP_EXCEPT removal workaround; reinstate option -c | --compile 2019-04-11 07:19:35 -04:00
rocky
cfe7feed4d Fix 3.8 pytests 2019-04-10 22:58:15 -04:00
rocky
b3a20896b2 Remove dup pypy test 2019-04-10 12:35:26 -04:00
rocky
adc7e5242c More run tests 2019-04-10 12:32:34 -04:00
rocky
612a813c7c Merge branch 'master' into python-2.4 2019-04-10 12:03:39 -04:00
R. Bernstein
1425476018 Merge pull request #222 from rocky/python-3.8
Python 3.8
2019-04-10 12:00:03 -04:00
rocky
59c77f103d More self-checking run tests 2019-04-10 11:49:27 -04:00
rocky
726045a05e Basic 3.8+ "for" loop handling...
More Makefile mangling
2019-04-10 11:26:58 -04:00
rocky
49e354375e More run tests 2019-04-10 11:05:46 -04:00
rocky
f3d86e0708 Bang on Python 3.8 2019-04-10 07:22:43 -04:00
rocky
820283827f 3.8 "for" block ...
pysource: Tag older semantics for blocks with "expr" and "for_block"
2019-04-10 06:00:16 -04:00
rocky
8b65cc7275 Small changes - bump required xdis version 2019-04-09 21:45:28 -04:00
rocky
1e47f47527 Allow for newer xdis 2019-04-05 16:30:28 -04:00
rocky
19a95be3ef WIP - more 3.8 grammar stuff 2019-03-30 00:27:48 -04:00
rocky
5a6550b353 Administrivia: require xdis 3.9.1 or greater 2019-03-28 20:56:49 -04:00
rocky
82fb9426af [WIP] - move forward a tad on Python 3.8 2019-03-28 12:10:08 -04:00
rocky
199ba86984 Merge branch 'master' into python-2.4 2019-03-28 11:22:28 -04:00
rocky
98b91db8e6 Another 3.6->3.7 typo (in comment this time) 2019-03-28 11:22:07 -04:00
rocky
ce3f815b08 opcode import typo 2019-03-28 11:16:06 -04:00
rocky
c447b9cfa9 Note use of releases 2019-03-26 12:41:12 -04:00
rocky
a4ae9a39af Merge branch 'master' into python-2.4 2019-03-23 18:26:47 -04:00
rocky
053270483c Get ready for release 3.2.6 2019-03-23 18:17:53 -04:00
rocky
4a354269bc Adjust 3.7 chained compare for adjusted grammar
Add test for last change
2019-03-23 17:06:50 -04:00
rocky
cd64156708 Fix else detection bug in Python 3.6+ 2019-03-23 08:57:34 -04:00
rocky
ddf73b653c Use Python 2.7, not 3.7 2019-03-10 14:17:59 -04:00
rocky
83773846d6 Merge branch 'master' into python-2.4 2019-03-10 14:12:23 -04:00
rocky
3d49b499fb Move 3.6 return_if_lambda rule back to 3.5 2019-03-10 14:01:57 -04:00
rocky
dcad6cf6ce Fix if return boundary in 3.6+
Fixes #209
2019-03-10 05:59:15 -04:00
rocky
bfceeac6c8 2.7 can have two JUMP_BACKs at the end of a while loop
Fixes #215
2019-01-27 21:41:17 -05:00
rocky
8246f54831 Python 2.5. tolerance 2019-01-26 18:50:17 -05:00
rocky
92d6b62d56 Merge branch 'master' into python-2.4 2019-01-26 18:33:39 -05:00
rocky
47448e7ce4 Merge branch 'master' of github.com:rocky/python-uncompyle6 2019-01-26 18:19:12 -05:00
rocky
e1628d4d3a Possibly addresses issue #215 2019-01-26 18:18:21 -05:00
R. Bernstein
3328ed494e Merge pull request #211 from byehack/master
support utf-8 chars
2019-01-17 13:35:22 -05:00
byehack
0c5f0dfc7a support utf-8 in py3 2019-01-17 18:52:40 +03:30
byehack
138b2ac5ee support utf-8 encoding for PYTHON>=3 2019-01-17 18:43:13 +03:30
byehack
ceae035c70 support utf-8 chars 2019-01-16 19:36:13 +03:30
rocky
763c599c16 I said use Python 2.7.11 2019-01-14 22:28:26 -05:00
rocky
14111d9341 Need hypothesis 3.0.0? 2019-01-14 22:21:59 -05:00
rocky
739ba48f61 Go with Python 2.7.11 which seems to be installed already 2019-01-14 22:18:52 -05:00
rocky
9f1a7fa7ff Go with Python 2.7.11 which seems to be installed already 2019-01-14 22:18:07 -05:00
rocky
fb117713cf Let's try Python 2.7.15 on CI 2019-01-14 22:10:20 -05:00
rocky
43646b3c71 Comma placement in 3.6 and 3.7 **kwargs
fixes #208
2019-01-14 17:41:54 -05:00
rocky
9a14db567b Merge branch 'master' of github.com:rocky/python-uncompyle6 2019-01-13 19:39:54 -05:00
rocky
a97d4003c7 Python 3.7 changes chained comparison code
fixes #206
2019-01-13 19:37:41 -05:00
R. Bernstein
acb96deba5 Merge pull request #205 from cclauss/patch-1
Travis CI: Run more f-string tests on Python 3.7
2019-01-12 17:40:12 -05:00
cclauss
6cbaef4ba5 Travis CI: Run more f-string tests on Python 3.7 2019-01-12 20:24:08 +01:00
R. Bernstein
7c9691b5a7 Merge pull request #204 from rocky/python-3.7-testing
Python 3.7 testing
2019-01-12 11:57:48 -05:00
rocky
0fa45301fa Python 3.7 testing fixes 2019-01-12 11:51:01 -05:00
cclauss
3b43801067 Travis CI: Add Python 3.7 to the testing
Also, [Travis are now recommending removing the __sudo__ tag](https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration).
2019-01-09 19:52:56 +01:00
R. Bernstein
e41ef897d1 Merge pull request #202 from rocky/assert-fix
Better handling of AssertError.  I expect fewer asserts to be recognized in favor of if AssertError. Also, this fixes one thing but breaks 04_assert_continue.pyc
2019-01-05 16:59:00 -05:00
rocky
d0dc26caf7 Another test 2019-01-05 16:48:55 -05:00
rocky
df105fbfb2 Fixed one thing in Python 2.7 and break another.
We'll go with this until we get to a more serious refactoring.
2019-01-05 16:38:07 -05:00
Yiming Wang
fbf51a0ae3 Fix when offset like 47_0 2019-01-05 13:33:31 -05:00
Yiming Wang
5d99322078 Better assert and AssertionError determine for Python 2.7 2019-01-05 13:32:08 -05:00
rocky
1a70f75ffc Pypy 2.7 fixes
* pypy doesn't seem to grok sys.stdout.flush() sometimes?
* pypy has extra come_froms for return_if_stmt
2019-01-05 13:28:29 -05:00
rocky
37750814b9 Adjust grammar checking...
More conditional rules were added
2019-01-01 23:03:17 -05:00
rocky
a2321773d7 Fix Python 3.x try/else detection
Fixes #155
2019-01-01 22:50:28 -05:00
rocky
acd0e5fea6 Note weirdness in try/else 2019-01-01 09:40:59 -05:00
rocky
d443295df6 Check range of _come_froms on ifelsestmt reduction
Fixes #200
2018-12-31 08:39:08 -05:00
rocky
296a2129eb Bump 3.2.6 version 2018-12-30 12:35:25 -05:00
rocky
bff171897a Merge branch 'master' into python-2.4 2018-12-30 12:28:02 -05:00
rocky
84e8542248 Get ready for release 3.2.5 2018-12-30 12:15:57 -05:00
rocky
fe9beb2fd1 Use raw string in regexp with "\d"...
Bump python versions used in testing
2018-12-26 19:06:21 -05:00
rocky
7de893730d main.main parameter "codes" is not used. Note that. 2018-12-25 12:55:40 -05:00
rocky
189d7c6562 Merge branch 'master' into python-2.4 2018-12-16 02:28:09 -05:00
rocky
a7ceedb62c Python 3.6+ control flow 2018-12-15 09:17:54 -05:00
rocky
49999b2633 Merge branch 'master' of github.com:rocky/python-uncompyle6 2018-12-15 09:12:35 -05:00
rocky
ffad6ae6d5 Some more typos 2018-12-15 09:11:41 -05:00
rocky
d250d38b39 Typo 2018-12-15 05:15:37 -05:00
rocky
4a76a4f591 Add karma section 2018-12-15 05:11:50 -05:00
rocky
a54a558a44 Merge branch 'master' into python-2.4 2018-12-10 06:40:41 -05:00
rocky
f5448b371c More complete fragment parsing for imports 2018-12-10 06:40:14 -05:00
rocky
55a73d5a29 CI runtest skips 2018-11-12 11:03:15 -05:00
rocky
dc0b243938 CI runtest skips 2018-11-12 10:51:17 -05:00
rocky
99fc7f9873 runtests on CI again 2018-11-12 10:34:30 -05:00
rocky
6443257e60 Merge branch 'master' into python-2.4 2018-11-12 10:29:40 -05:00
rocky
3b7c8cf092 runtests on CI again 2018-11-12 10:29:22 -05:00
rocky
5abfe7c85a Typo in last test name 2018-11-12 09:50:46 -05:00
rocky
7fa21d0db4 More stdlib test removal 2018-11-12 09:19:46 -05:00
rocky
d422f28d2e Another test bites the dust due to control flow complexity 2018-11-12 07:32:33 -05:00
rocky
f3cd1ee3f3 Add FIXME not for attribute parenthesis 2018-11-12 03:48:44 -05:00
rocky
de6dec6ecd Control flow bits again 2018-11-11 14:11:23 -05:00
rocky
fbcf91954e Correct the last release date 2018-10-27 13:03:59 -04:00
rocky
343f01cb8f Merge branch 'master' into python-2.4 2018-10-27 11:31:32 -04:00
rocky
87d0b6e3fb Merge branch 'master' into python-2.4 2018-09-20 17:40:46 -04:00
rocky
eb317480d8 Merge branch 'master' into python-2.4 2018-09-19 15:46:08 -04:00
rocky
663b6ca50f Merge branch 'master' into python-2.4 2018-08-12 06:48:10 -04:00
rocky
908dea4a23 Merge branch 'master' into python-2.4 2018-07-15 12:40:27 -04:00
rocky
309ccb8734 Merge branch 'master' into python-2.4 2018-07-05 21:50:13 -04:00
rocky
d687b44f70 Merge branch 'master' into python-2.4 2018-07-03 15:46:12 -04:00
rocky
b94d67e99a Remove CircleCI 1.1 2018-06-26 22:36:31 -04:00
rocky
1f8a5dfa06 Another CircleCI 2.0 try 2018-06-25 16:53:25 -04:00
rocky
d420b2864e Fix CircleCI testing? 2018-06-25 16:40:36 -04:00
rocky
12e46504f3 Another CircleCI 2.0 try 2018-06-25 13:33:36 -04:00
rocky
d3bd73c281 More CircleCI 2.0 config 2018-06-25 13:29:28 -04:00
rocky
86e29eaac8 More CircleCI 2.0 config 2018-06-25 13:28:39 -04:00
rocky
e934d79170 More CircleCI 2.0 config 2018-06-25 13:27:23 -04:00
rocky
398981e887 Try CircleCI 2.0 2018-06-25 13:17:14 -04:00
rocky
96c9a67554 Merge branch 'master' into python-2.4 2018-06-25 13:14:24 -04:00
rocky
44ffb04ee1 Merge branch 'master' into python-2.4 2018-06-23 23:09:43 -04:00
rocky
c78f9a3b7d Merge branch 'master' into python-2.4 2018-06-23 12:25:03 -04:00
rocky
f088ded236 Merge branch 'master' into python-2.4 2018-06-23 05:48:49 -04:00
rocky
beaedc7ca1 Merge branch 'master' into python-2.4 2018-06-22 21:10:20 -04:00
rocky
f9392ed908 Merge branch 'master' into python-2.4 2018-06-22 14:33:22 -04:00
rocky
eb30181e51 Merge branch 'master' into python-2.4 2018-06-19 12:28:58 -04:00
rocky
9edeb84adc Merge branch 'master' into python-2.4 2018-06-13 13:37:52 -04:00
rocky
f7a8aabdee Realign make_function3 with master 2018-06-13 13:21:46 -04:00
rocky
214f5f32a3 Merge branch 'master' into python-2.4 2018-06-13 13:13:05 -04:00
rocky
53b471a3df Merge branch 'master' into python-2.4 2018-06-12 15:05:40 -04:00
rocky
2b730628d5 Merge branch 'master' into python-2.4 2018-06-12 08:31:13 -04:00
rocky
48006ab350 Merge branch 'master' into python-2.4 2018-06-11 12:01:52 -04:00
rocky
b3642094b2 Now allow 3.0 2018-06-11 11:39:01 -04:00
rocky
a574168ca8 Merge branch 'master' into python-2.4 2018-06-11 11:38:19 -04:00
rocky
263b4b5653 Merge branch 'master' into python-2.4 2018-06-10 16:49:29 -04:00
rocky
19818ae632 Merge branch 'master' into python-2.4 2018-06-04 15:35:31 -04:00
rocky
477d73c71d Merge branch 'master' into python-2.4 2018-06-04 15:29:40 -04:00
rocky
7272ac4a60 Merge branch 'master' into python-2.4 2018-06-04 10:59:56 -04:00
rocky
7659277c5c Past fix of conditional_not bleed into 2.5...
and it shouldn't have
2018-05-19 12:58:45 -04:00
rocky
761eee7ae7 Merge branch 'master' into python-2.4 2018-05-19 12:36:34 -04:00
rocky
600cee26d9 Properly resolve a merge conflict 2018-05-11 10:25:35 -04:00
rocky
61466808f5 Merge branch 'master' into python-2.4 2018-05-08 09:18:32 -04:00
rocky
de25c5f003 Merge branch 'master' into python-2.4 2018-05-01 03:17:49 -04:00
rocky
8880568045 Merge branch 'master' into python-2.4 2018-04-29 10:09:03 -04:00
rocky
3c7d460036 Merge branch 'master' into python-2.4 2018-04-22 04:51:07 -04:00
rocky
ee3f2446f9 Merge branch 'master' into python-2.4 2018-04-16 13:10:16 -04:00
rocky
0b24eca8d7 Merge branch 'master' into python-2.4 2018-04-08 05:39:28 -04:00
rocky
3116ac8323 Merge branch 'master' into python-2.4 2018-04-08 05:27:16 -04:00
rocky
19bb16270d Merge conflicts 2018-04-03 10:56:27 -04:00
rocky
35c41f8065 Merge branch 'master' into python-2.4 2018-04-03 10:55:51 -04:00
rocky
9d36e7742e Merge branch 'master' into python-2.4 2018-04-01 15:17:37 -04:00
rocky
75f3624f31 Merge branch 'master' into python-2.4 2018-04-01 13:48:16 -04:00
rocky
2e78c007ee Merge branch 'master' into python-2.4 2018-03-27 04:10:47 -04:00
rocky
f5a10ed5d0 Merge branch 'master' into python-2.4 2018-03-26 19:41:20 -04:00
rocky
de75849ae3 Merge branch 'master' into python-2.4 2018-03-26 14:52:01 -04:00
rocky
30d6dcdd69 Merge branch 'master' into python-2.4 2018-03-26 12:56:54 -04:00
rocky
c48345a5c0 More grammar coverage work 2018-03-26 08:14:15 -04:00
rocky
a1cdc5e40c Grammar testing 2018-03-26 08:13:17 -04:00
rocky
661bfd4e52 Merge branch 'master' into python-2.4 2018-03-26 08:04:32 -04:00
rocky
6ac48bb0e1 Merge branch 'master' into python-2.4 2018-03-25 17:57:26 -04:00
rocky
a18b4b1505 Merge branch 'master' into python-2.4 2018-03-25 17:37:04 -04:00
rocky
b2c832e19f Merge branch 'master' into python-2.4 2018-03-24 10:55:43 -04:00
rocky
1462a8beb0 simply since we don't do 3.0 in this branch 2018-03-21 20:43:11 -04:00
rocky
f877e65919 Merge branch 'master' into python-2.4 2018-03-21 20:19:32 -04:00
rocky
78898ed187 Add PYTHON3 import 2018-03-21 19:59:35 -04:00
rocky
ef03d78c4d Merge branch 'master' into python-2.4 2018-03-21 19:57:59 -04:00
rocky
48b251273a Merge branch 'master' into python-2.4 2018-03-07 11:48:50 -05:00
rocky
c91b5e1164 Need additional try vs try/else checks 2018-03-07 07:37:13 -05:00
rocky
f8fd474b55 Merge branch 'master' into python-2.4 2018-03-07 07:36:41 -05:00
rocky
bc5f43ab05 Merge branch 'master' into python-2.4 2018-03-06 09:55:15 -05:00
rocky
1da2118e13 Merge branch 'master' into python-2.4 2018-03-05 12:26:45 -05:00
rocky
67e8f5d1a7 Merge branch 'master' into python-2.4 2018-03-05 07:55:17 -05:00
rocky
2a76013ed5 Merge branch 'master' into python-2.4 2018-03-04 21:46:46 -05:00
rocky
681bbd616b Merge branch 'master' into python-2.4 2018-03-02 11:14:01 -05:00
rocky
46390a161e Merge branch 'master' into python-2.4 2018-03-02 10:07:20 -05:00
rocky
28d0ec7a2a Merge branch 'master' into python-2.4 2018-03-02 08:06:53 -05:00
rocky
8a842c57d3 Omit empty parens in 2.4 2018-03-01 18:17:11 -05:00
rocky
fb333f1505 Merge branch 'master' into python-2.4 2018-03-01 17:22:45 -05:00
rocky
ab257dc7ce Merge branch 'master' into python-2.4 2018-02-27 17:49:22 -05:00
rocky
e3d8751338 Sync with master + lint 2018-02-27 10:41:46 -05:00
rocky
a1532bbfea Merge branch 'master' into python-2.4 2018-02-27 10:40:40 -05:00
rocky
128963d2e9 yield before 2.4 may need "None" 2018-02-22 22:23:57 -05:00
rocky
1cb9fc8b43 I hate conflicted merges 2018-02-22 21:46:05 -05:00
rocky
b9147b7872 Distingish 2.4-2.6 try from try/else 2018-02-22 20:24:21 -05:00
rocky
5496271000 Merge branch 'master' into python-2.4 2018-02-22 20:15:45 -05:00
rocky
16b5df4ba4 2.4 test_types was fixed by prior commit 2018-02-22 19:16:41 -05:00
rocky
fee6114d74 Merge branch 'master' into python-2.4 2018-02-22 19:15:24 -05:00
rocky
b14655dd43 == -> is 2018-02-21 18:08:27 -05:00
rocky
3de2890050 Merge branch 'master' into python-2.4 2018-02-21 17:43:37 -05:00
rocky
90ae3e42f6 Merge branch 'python-2.4' of github.com:rocky/python-uncompyle6 into python-2.4 2018-02-21 07:54:17 -05:00
rocky
158a1886fe Fix 2.4/2.5 try/else detection bug...
in a hacky way
2018-02-21 04:13:57 -05:00
rocky
d2285f0d61 remove a 2.7 runtest.sh exception 2018-02-21 02:54:40 -05:00
rocky
2e44ac25a1 Merge branch 'master' into python-2.4 2018-02-19 17:07:11 -05:00
rocky
9d425039a2 Merge branch 'master' into python-2.4 2018-02-17 11:28:45 -05:00
rocky
832f04a486 Merge branch 'master' into python-2.4 2018-02-15 10:47:14 -05:00
rocky
657d5ef024 pydisasm fixes 2018-02-15 07:33:51 -05:00
rocky
e92c2503d1 Merge branch 'master' into python-2.4 2018-02-15 07:31:11 -05:00
rocky
b74662cf3d Merge branch 'master' into python-2.4 2018-02-05 06:27:33 -05:00
rocky
ed3b0e81b9 Remove schmutz from merge 2018-01-31 16:52:43 -05:00
rocky
75755c8cfc Merge branch 'master' into python-2.4 2018-01-31 16:46:04 -05:00
rocky
4ce769399f Correct Python versions in CircleCI tests 2018-01-29 15:44:34 -05:00
rocky
d0dfdcfcde Add Some run tests 2018-01-29 15:41:19 -05:00
rocky
4e949a798d Merge branch 'master' into python-2.4 2018-01-29 15:41:14 -05:00
rocky
4fb379afb4 Get ready for release 2.15.0 2018-01-27 12:26:22 -05:00
rocky
eb7484c671 Merge branch 'master' into python-2.4 2018-01-27 11:47:57 -05:00
rocky
79470ffff7 Merge branch 'master' into python-2.4 2018-01-20 15:30:45 -05:00
rocky
44af6c42a2 Merge branch 'master' into python-2.4 2018-01-19 03:33:29 -05:00
rocky
d7380dc549 Merge branch 'master' into python-2.4 2018-01-19 03:18:23 -05:00
rocky
b2f6e1cf1a Merge branch 'master' into python-2.4 2018-01-18 19:05:19 -05:00
rocky
7c9437f0a9 Merge branch 'master' into python-2.4 2018-01-18 01:27:52 -05:00
rocky
162bb0a85f Merge branch 'master' into python-2.4 2018-01-13 01:05:38 -05:00
rocky
e44ccd5787 Merge branch 'master' into python-2.4 2018-01-12 20:57:10 -05:00
rocky
c4612b7484 Fix ok status on --weak-verify 2018-01-12 09:57:32 -05:00
rocky
731c5a2092 Merge branch 'master' into python-2.4 2018-01-12 09:57:17 -05:00
rocky
7efbd55b69 Merge branch 'master' into python-2.4 2018-01-11 21:55:43 -05:00
rocky
5dbec5b383 Merge branch 'master' into python-2.4 2018-01-11 10:35:49 -05:00
rocky
f28ad69c38 Merge branch 'master' into python-2.4 2018-01-11 01:48:28 -05:00
rocky
49a71819a1 Correct Python 2.5- decorator parsing 2018-01-10 11:02:54 -05:00
rocky
ed7d11525a Check Python version in setup.py ...
to make the code is compatible. Fixes #146
2018-01-10 09:49:39 -05:00
rocky
5b1dcccddc Merge branch 'master' into python-2.4 2018-01-10 09:39:39 -05:00
rocky
992a08f5ce Check Python version in setup.py ...
to make sure we are running a compatible version.
2018-01-10 09:38:55 -05:00
rocky
49ef408699 Reinstates run tests that now work 2018-01-09 08:48:57 -05:00
rocky
0487f2fb7a Merge branch 'master' into python-2.4 2018-01-09 08:40:31 -05:00
rocky
e43c8acd30 Merge branch 'master' into python-2.4 2018-01-09 03:19:48 -05:00
rocky
97604a93dd Small typo 2018-01-09 00:28:04 -05:00
rocky
d266e9e123 Merge branch 'master' into python-2.4 2018-01-09 00:23:33 -05:00
rocky
7ac8bf91df Merge branch 'master' into python-2.4 2018-01-08 23:21:24 -05:00
rocky
772d36015c 2.4-compatiblity for next iteration 2018-01-08 22:18:59 -05:00
rocky
f381211291 Merge branch 'master' into python-2.4 2018-01-08 22:13:05 -05:00
rocky
aca4cb233d Merge branch 'master' into python-2.4 2018-01-08 12:24:59 -05:00
rocky
01ef3b774f Merge branch 'master' into python-2.4 2018-01-08 11:44:11 -05:00
rocky
9041dead7f Merge branch 'master' into python-2.4 2018-01-07 21:36:19 -05:00
rocky
4ea308f75a Fix another 2.5- try/else bug (in a loop) 2018-01-07 08:36:17 -05:00
rocky
e5f06eb551 Fix bug 2.5- in try/else inside ifelsestmt 2018-01-06 22:10:05 -05:00
rocky
c68030e9fa Merge branch 'master' into python-2.4 2017-12-15 19:21:59 -05:00
rocky
fd95839701 Merge branch 'master' into python-2.4 2017-12-15 08:26:03 -05:00
rocky
6305023219 Handl 2.4- try/finally properly 2017-12-14 19:20:57 -05:00
rocky
c7dda72a84 Merge branch 'master' into python-2.4 2017-12-14 17:58:03 -05:00
rocky
7caedcb50d Merge branch 'master' into python-2.4 2017-12-14 09:51:50 -05:00
rocky
1856e09a0c 2.4 tolerance 2017-12-14 08:45:13 -05:00
rocky
e47568e147 Merge branch 'master' into python-2.4 2017-12-14 08:40:43 -05:00
rocky
c702ce3802 runtests for 2.4 and 2.5 2017-12-13 18:06:56 -05:00
rocky
a37f403410 Fix runtests.sh 2017-12-13 17:44:19 -05:00
rocky
9248a954bd Merge branch 'master' into python-2.4 2017-12-13 17:43:44 -05:00
rocky
89a7ad6f81 Update docs and failed decompiles (for 2.5) 2017-12-13 10:02:30 -05:00
rocky
f432f4f698 Update runtest failures 2017-12-13 09:24:59 -05:00
rocky
5ef2d5cd9f Merge branch 'master' into python-2.4 2017-12-13 08:58:18 -05:00
rocky
204612ca85 Merge branch 'master' into python-2.4 2017-12-12 11:05:20 -05:00
rocky
df8c092212 Merge branch 'master' into python-2.4 2017-12-10 18:12:14 -05:00
rocky
55d2e598db Merge branch 'master' into python-2.4 2017-12-10 18:11:13 -05:00
rocky
3c67c7b32c Administrivia 2017-12-10 18:10:51 -05:00
rocky
5264ffc0e5 Merge branch 'master' into python-2.4 2017-12-10 18:02:23 -05:00
rocky
27b217a4ed Merge branch 'master' into python-2.4 2017-12-09 04:53:21 -05:00
rocky
d756548ac3 Correct 10_del.py syntax 2017-12-05 22:44:33 -05:00
rocky
0171e4d899 remove from exclusion those stdlib test that now work 2017-12-05 18:21:15 -05:00
rocky
a2054fb7dd Merge branch 'master' into python-2.4 2017-12-05 18:14:03 -05:00
rocky
f07c9c6dcf Merge branch 'master' into python-2.4 2017-12-05 08:32:31 -05:00
rocky
c677c946ea Merge branch 'master' into python-2.4 2017-12-05 05:59:50 -05:00
rocky
87063851be Merge branch 'master' into python-2.4 2017-12-05 05:44:59 -05:00
rocky
516c1a7910 Merge branch 'master' into python-2.4 2017-12-05 00:13:59 -05:00
rocky
2293f77841 Make 2.4 compatible 2017-12-04 14:18:39 -05:00
rocky
212771244a Merge branch 'master' into python-2.4 2017-12-04 14:15:30 -05:00
rocky
5fc33aeef5 Merge branch 'master' into python-2.4 2017-12-04 09:41:49 -05:00
rocky
fff0d1c988 Include weird 2.6 bugs in 2.5 2017-12-03 20:22:29 -05:00
rocky
987b5a2290 Merge branch 'master' into python-2.4 2017-12-03 19:57:26 -05:00
rocky
910d210e52 Merge branch 'master' into python-2.4 2017-12-03 13:03:28 -05:00
rocky
b719a0ee35 Merge branch 'master' into python-2.4 2017-12-03 12:29:05 -05:00
rocky
25329d2752 Update runtest failures 2017-12-03 11:20:06 -05:00
rocky
df4d80ff26 Merge branch 'master' into python-2.4 2017-12-03 11:19:48 -05:00
rocky
13ab06ecb1 Fix bug in 2.6- except_cond3 2017-12-03 06:10:37 -05:00
rocky
72e2d1a2bf One more _come_from -> _come_froms 2017-12-03 05:19:20 -05:00
rocky
c90210c063 Grammar "COME_FROM"_from cleanups ...
tryelse constructs in 2.x fixed up
_come_from -> _come_froms (COME_FROM*)
consolidate come_froms rule into sincle parser.py

sync unit/test_grammar.py
2017-12-03 05:04:06 -05:00
rocky
21a8726a47 Merge branch 'master' into python-2.4 2017-12-03 03:34:50 -05:00
rocky
ca7f267103 Merge branch 'master' into python-2.4 2017-12-02 21:18:00 -05:00
rocky
7b15e54b7d Add "global" in functions that just read 2017-12-02 19:11:11 -05:00
rocky
ccd007355c Merge branch 'master' into python-2.4 2017-12-02 17:10:10 -05:00
rocky
36aba02093 Correct Python 2.4 importmultiple rule 2017-12-02 14:17:59 -05:00
rocky
a5dd330218 Merge branch 'master' into python-2.4 2017-12-02 13:23:07 -05:00
rocky
fc0eb87620 Python 2.4 compatability 2017-12-02 10:01:33 -05:00
rocky
0b9fca2263 Sync with master 2017-12-02 09:51:15 -05:00
rocky
0d9464bb92 Merge branch 'master' into python-2.4 2017-11-29 05:09:22 -05:00
rocky
ff435227e9 2.5 test for UNARY_CONVERT 2017-11-28 10:01:24 -05:00
rocky
fcdc3f67af Python 2.4 doesn't do "with" 2017-11-28 09:55:25 -05:00
rocky
299936e554 Merge branch 'master' into python-2.4 2017-11-28 09:22:24 -05:00
rocky
2e192f0467 2.3- import statement fixes 2017-11-27 22:16:36 -05:00
rocky
9062f19a97 2.4 grammar reduction 2017-11-27 21:55:26 -05:00
rocky
f51e40a1de Merge branch 'master' into python-2.4 2017-11-27 21:41:01 -05:00
rocky
e411024696 Merge hell 2017-11-27 19:44:47 -05:00
rocky
01a27e22b4 2.5 grammar reduction and increase coverage 2017-11-27 19:39:37 -05:00
rocky
7553c4aed9 Add UNARY_INVERT_OP test 2017-11-27 12:49:39 -05:00
rocky
593304bc43 Administrivia 2017-11-27 12:40:44 -05:00
rocky
a9ca30fe34 Reduce Python 2.5- grammar rules 2017-11-27 12:17:10 -05:00
rocky
6030730870 Merge branch 'master' into python-2.4 2017-11-27 07:33:23 -05:00
rocky
b9436e4851 Merge branch 'master' into python-2.4 2017-11-26 19:24:24 -05:00
rocky
b0a7452d48 2.7 tryfinally grammar rule removal 2017-11-26 15:34:00 -05:00
rocky
5e05e521d9 Merge branch 'master' into python-2.4 2017-11-26 10:08:59 -05:00
rocky
7a052c349a Merge branch 'master' into python-2.4 2017-11-26 09:33:25 -05:00
rocky
35aca37557 Isolate kv, kv2, and kdv3 better 2017-11-26 06:53:22 -05:00
rocky
57fe56d72e localize kv 2017-11-26 01:35:03 -05:00
rocky
218e73540a Merge branch 'master' into python-2.4 2017-11-26 01:27:56 -05:00
rocky
0965e2cc96 Localize kv 2017-11-26 01:26:57 -05:00
rocky
5cf4f0a82f Merge hell 2017-11-25 23:15:07 -05:00
rocky
9b0225db60 Merge branch 'master' into python-2.4 2017-11-25 23:15:01 -05:00
rocky
8c0959de42 inf and nan tests 2017-11-25 23:11:27 -05:00
rocky
ccd71c857f Regularze grammar coverage rules 2017-11-24 22:44:22 -05:00
rocky
b89dbb0ee7 Merge hell 2017-11-24 21:48:24 -05:00
rocky
a5bdc1acd0 Merge branch 'master' into python-2.4 2017-11-24 21:48:14 -05:00
rocky
a279784d8d Merge branch 'master' into python-2.4 2017-11-23 17:17:54 -05:00
rocky
3a9f4f2984 Merge branch 'master' into python-2.4 2017-11-23 12:37:00 -05:00
rocky
51ae8313cf Merge branch 'master' into python-2.4 2017-11-22 14:45:16 -05:00
rocky
38f04f0073 More complete grammar coverage 2017-11-22 11:15:39 -05:00
rocky
f3da5d770d Merge hell 2017-11-22 06:26:20 -05:00
rocky
24fb13cf23 Merge branch 'master' into python-2.4 2017-11-22 06:25:52 -05:00
rocky
524e8c8410 Python 2.5 "with". isolate 2.5-2.7 grammar better 2017-11-16 09:18:26 -05:00
rocky
52d1e44560 Merge branch 'master' into python-2.4 2017-11-16 09:18:19 -05:00
rocky
6055c5e165 Get ready for release python-2.4- 2017-11-13 10:58:46 -05:00
rocky
e0ed187ea6 2.4isms...
Need print without parens. Handle old-style classes more properly?
2017-11-13 10:52:43 -05:00
rocky
eafe048c7e Get ready for release python-2.4-2.13.3 2017-11-13 10:12:27 -05:00
rocky
c0e553dbb5 Merge branch 'master' into python-2.4 2017-11-13 10:11:00 -05:00
rocky
7e59987af7 Merge branch 'master' into python-2.4 2017-10-12 07:31:19 -04:00
rocky
1f012f7c46 Merge conflicts 2017-10-12 07:18:11 -04:00
rocky
d1a3d42ab8 Sync 2017-10-12 07:08:58 -04:00
rocky
05fd992c48 Update news 2017-10-12 07:06:19 -04:00
rocky
47f1d888eb Merge branch 'master' into python-2.4 2017-10-12 07:05:34 -04:00
rocky
ca9c227837 More administrivia 2017-10-11 22:17:50 -04:00
rocky
5df384bb71 Some admin tools I use 2017-10-11 21:16:35 -04:00
rocky
e80b36347a Remove creaping Python 2.6ism 2017-10-11 20:43:17 -04:00
rocky
9e37495493 Sync with master 2017-10-10 23:06:22 -04:00
rocky
77b93c5f21 Sync with master 2017-10-10 23:04:25 -04:00
rocky
0b198ee881 Sync with master 2017-10-10 23:02:20 -04:00
rocky
9e0c65881d Sync with master 2017-10-10 22:52:07 -04:00
rocky
c796d6a799 Merge commit '1d7a3c6444eab5a02d899f789f2a57cfdcbc5a84' into python-2.4 2017-10-10 22:50:28 -04:00
rocky
3892fb533a Misc bugs 2017-10-10 16:12:02 -04:00
rocky
2ea7487ca7 One more test 2017-10-05 11:19:36 -04:00
rocky
d4f6cec3d0 Sync with master 2017-10-05 11:17:49 -04:00
rocky
b1705e283d handle newer parser reduction behavior 2017-10-03 11:54:24 -04:00
rocky
eee751e22a Go over table-semantics description yet again 2017-10-03 05:44:55 -04:00
rocky
2b0fefb95f Sync with master 2017-10-02 03:12:26 -04:00
rocky
1a627ba207 Annotation field can be unicode...
When deparsing Python 3.x from Python 2.
2017-09-26 09:53:26 -04:00
rocky
ea75bcf47e Require xdis 3.6.0 or greater 2017-09-25 20:11:53 -04:00
rocky
6c6dcab857 Merge branch 'python-2.4' of github.com:rocky/python-uncompyle6 into python-2.4 2017-09-25 20:09:04 -04:00
rocky
0654aed6c8 Get ready for release 2.12.0 2017-09-25 20:08:50 -04:00
rocky
3447ca0767 Unit test for format-specifiers 2017-09-21 11:29:17 -04:00
rocky
1e858efafd Tidy pysource and fragments 2017-09-20 19:08:41 -04:00
rocky
ce88a72ea1 Tidy/regularize table entry formatting 2017-09-20 17:52:48 -04:00
rocky
7725b8e7de small fixes...
test_pythonlib.py: it is sys.exit not exit
pysource.py: restore node type on async_call function
2017-09-20 11:30:50 -04:00
rocky
62ddbe320d Start pysource unit test 2017-09-20 01:15:37 -04:00
rocky
a694601264 emgine -> template_engine 2017-09-17 12:03:49 -04:00
rocky
e06f88043f Merge branch 'master' into python-2.4 2017-08-31 09:54:23 -04:00
rocky
8fc3fd146f Merge branch 'master' into python-2.4 2017-08-31 09:47:02 -04:00
rocky
ce5066bddb Merge branch 'master' into python-2.4 2017-08-15 11:12:20 -04:00
rocky
93f18e2449 Allow version to be string...
in get_python_parser and get_scanner
2017-08-13 09:23:27 -04:00
rocky
783e62f3ca Merge branch 'python-2.4' of github.com:rocky/python-uncompyle6 into python-2.4 2017-08-10 09:45:11 -04:00
rocky
c38dc61021 xdis "is not" is now "is-not" 2017-08-09 22:07:32 -04:00
rocky
45782bbb39 Get ready for release 2.11.3 2017-08-09 21:46:27 -04:00
rocky
4c9cd5657e Merge branch 'master' into python-2.4 2017-08-09 21:45:50 -04:00
rocky
dc627d13b8 Get ready for release 2.11.3 2017-08-09 21:33:01 -04:00
rocky
ddc3489991 Python 2.4 comptiability and ...
exception match -> exception-match
2017-08-03 03:48:57 -04:00
rocky
5b24c20331 Bump xdis 2017-08-02 08:37:50 -04:00
rocky
8bb01143d8 Remove six from python 2.4/2.5 2017-08-02 08:28:08 -04:00
rocky
a9635da96a in xdis "exception match" is now "exception-match" 2017-08-02 06:36:40 -04:00
rocky
e790cb75fd Python 2.4 doesn't do six 2017-08-02 06:20:07 -04:00
rocky
348afeebbf Python 2.4 compatibility 2017-08-01 22:32:43 -04:00
rocky
6888553773 Merge branch 'master' into python-2.4 2017-06-25 18:56:31 -04:00
rocky
0f489672b9 More merge fixups from master 2017-06-18 16:05:22 -04:00
rocky
b7d8cbfaf5 Merge branch 'master' into python-2.4 2017-06-18 15:40:40 -04:00
rocky
df8d253f78 2.4 doesn't do six 2017-06-03 06:00:47 -04:00
rocky
89b42e3696 Nope it (appveyor) doesn't. 2017-06-03 05:55:21 -04:00
rocky
22e5a4a283 Administrivia
See if appveyor will handle 2.5
2017-06-03 05:53:41 -04:00
rocky
61810172d1 Merge branch 'master' into python-2.4 2017-06-03 05:50:42 -04:00
rocky
658c8b4be7 No decorators in Python < 2.6 2017-05-30 02:30:56 -04:00
rocky
d4dab54c7b Merge branch 'master' into python-2.4 2017-05-30 02:18:57 -04:00
rocky
5566b9ba6c Get ready for release 2.9.11 2017-05-06 07:49:09 -04:00
rocky
e56ab2dcd5 Sync with master 2017-05-06 07:17:04 -04:00
rocky
d6c45979ba Merge branch 'master' into python-2.4 2017-05-06 07:16:39 -04:00
rocky
a06e9bf32e Merge branch 'master' into python-2.4 2017-04-14 05:45:53 -04:00
rocky
7e8f7ba674 namedtuple25 -> namedtuple24 2017-04-14 05:42:44 -04:00
rocky
09eb7f7f78 Merge branch 'master' into python-2.4 2017-04-10 00:48:04 -04:00
rocky
f7a910ec66 Merge branch 'master' into python-2.4 2017-03-01 05:55:26 -05:00
rocky
6d6a73eea7 Merge branch 'master' into python-2.4 2017-02-25 21:02:12 -05:00
rocky
e4a7641927 Python <= 2.6 grammar fixes 2017-02-25 05:13:19 -05:00
rocky
b24b46d48c Merge branch 'master' into python-2.4 2017-02-25 04:48:06 -05:00
rocky
a65d7dce5b Python 2.5 was missing try else stmt 2017-02-22 05:30:07 -05:00
rocky
718a0a5d34 Merge branch 'master' into python-2.4 2017-02-22 05:29:49 -05:00
rocky
ea9e3ab3f5 Group coverage Makefile targets 2017-02-10 01:00:26 -05:00
rocky
770e988ff8 Changes based on coverage information 2017-01-29 22:54:30 -05:00
rocky
0fa0641974 Merge branch 'master' into python-2.4 2017-01-29 22:05:55 -05:00
rocky
c13e23cdae Get ready for release 2.9.9 2017-01-11 21:52:20 -05:00
rocky
fab4ebb768 Merge changes ...
* str() in Python 2.4 doesn't detect unicode.
* index() doesn't work on tuples
* ifelse change
2017-01-11 19:34:28 -05:00
rocky
89429339fa Merge branch 'master' into python-2.4 2017-01-11 19:25:44 -05:00
rocky
6ed129bd7a 2.4 verify hacks 2017-01-02 07:15:46 -05:00
rocky
c4fde6b53e Merge branch 'master' into python-2.4 2017-01-02 05:39:50 -05:00
rocky
a7d93e88b4 Merge branch 'master' into python-2.4 2017-01-02 05:39:13 -05:00
rocky
9891494142 We are version 2.9.9 2016-12-31 18:16:23 -05:00
rocky
f8544dfbbe 2.7->2.4 conversion 2016-12-31 10:56:43 -05:00
rocky
b00651d428 Merge master branche
Handle 2.2 list_if
2016-12-31 05:19:21 -05:00
rocky
da8dccbaca Merge branch 'master' into python-2.4 2016-12-29 02:08:12 -05:00
rocky
37272ae827 Merge commit '9b1dd0f' into python-2.4 2016-12-27 10:32:25 -05:00
rocky
7f2bee46b7 Bug in using python2 ast checking in python 2.5 2016-12-26 01:55:16 -05:00
rocky
c8a4dcf72b Removing NAME_MODULE, lint and bug fixes
scanner*.py: show_asm param is optional
verify.py: call correct scanners
main.py, verify.py: Use older Python print statements
2016-12-25 09:16:04 -05:00
rocky
012ff91cfb Merge branch 'master' into python-2.4 2016-12-25 07:57:17 -05:00
rocky
e690ddd50a Merge branch 'master' into python-2.4 2016-12-18 07:43:15 -05:00
rocky
45b7c1948c show-asm on python2.5 is optional
Make scanner2 a little more like scanner3.
2016-12-17 07:57:31 -05:00
rocky
e2fb7ca3d2 Python 2.6/2.7 tolerance in Python 2.4 branch 2016-12-17 06:51:47 -05:00
rocky
b3bda76582 Merge branch 'master' into python-2.4 2016-12-16 22:56:07 -05:00
rocky
ab6d322eca Get ready for release 2.9.7 2016-12-04 14:09:53 -05:00
rocky
1a8a0df107 Merge branch 'master' into python-2.4 2016-12-04 13:40:06 -05:00
rocky
0a37709b0a CircleCI build 2016-11-24 05:41:31 -05:00
rocky
98cd1417df Remove dup Python 3 grammar rule 2016-11-24 05:36:43 -05:00
rocky
460069ceaa Bug in 2.4 "if" dectection and...
Wrong language used in old-style exceptions: use "except Error,e" not
"except Error(e)""
2016-11-24 05:15:35 -05:00
rocky
316aa44f23 Python 2.6 grammary bug and..
__pkginfo.py__: Bump spark_parser version for parse_flags 'dups'
2016-11-24 04:09:32 -05:00
rocky
7133540c23 Make work on 2.4 2016-11-23 08:26:12 -05:00
rocky
590231741d Merge branch 'come-from-type' into python-2.4 2016-11-23 07:54:18 -05:00
rocky
a9349b8f3d Making it run on Python 2.4 and 2.5 2016-11-23 07:53:51 -05:00
268 changed files with 3627 additions and 1936 deletions

View File

@@ -42,7 +42,7 @@ jobs:
# This is based on your 1.0 configuration file or project settings
- run:
working_directory: ~/rocky/python-uncompyle6
command: pyenv install 2.7.13 && pyenv local 2.7.13 && pyenv rehash && pip install virtualenv && pip install nose && pip install pep8 && pip install six && pyenv rehash
command: pyenv install 2.4.6 && pyenv local 2.4.6 && pyenv rehash && easy_install nose && pyenv rehash
# Dependencies
# This would typically go in either a build or a build-and-test job when using workflows
# Restore the dependency cache
@@ -55,9 +55,7 @@ jobs:
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
- v1-dep-
# This is based on your 1.0 configuration file or project settings
- run: pip install --upgrade setuptools
- run: pip install -e .
- run: pip install pytest==3.2.5 hypothesis
- run: easy_install spark_parser==1.8.5 && easy_install xdis==3.8.4
# Save dependency cache
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
@@ -75,8 +73,8 @@ jobs:
# Test
# This would typically be a build job when using workflows, possibly combined with build
# This is based on your 1.0 configuration file or project settings
- run: python ./setup.py develop && make check-2.7
- run: cd ./test/stdlib && pyenv local 2.7.13 && bash ./runtests.sh 'test_[p-z]*.py'
- run: python ./setup.py develop && make check-2.4
- run: cd ./test/stdlib && pyenv local 2.4.6 && bash ./runtests.sh 'test_[p-z]*.py'
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results

View File

@@ -1,13 +1,12 @@
language: python
sudo: false
python:
- '3.5'
- '2.7'
- '2.6'
- '3.4'
- '3.6'
- '2.7' # this is a cheat here because travis doesn't do 2.4-2.6
matrix:
include:
- python: '2.7'
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
install:
- pip install -e .

View File

@@ -115,7 +115,7 @@ mechanisms and addressed problems and extensions by some other means.
Specifically, in `uncompyle`, decompilation of python bytecode 2.5 &
2.6 is done by transforming the byte code into a pseudo-2.7 Python
bytecode and is based on code from Eloi Vanderbeken. A bit of this
could have bene easily added by modifying grammar rules.
could have been easily added by modifying grammar rules.
This project, `uncompyle6`, abandons that approach for various
reasons. Having a grammar per Python version is much cleaner and it

View File

@@ -1,6 +1,21 @@
# How to report a Bug
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents**
## The difficulty of the problem
- [The difficulty of the problem](#the-difficulty-of-the-problem)
- [Is it really a bug?](#is-it-really-a-bug)
- [Do you have valid bytecode?](#do-you-have-valid-bytecode)
- [Semantic equivalence vs. exact source code](#semantic-equivalence-vs-exact-source-code)
- [What to send (minimum requirements)](#what-to-send-minimum-requirements)
- [What to send (additional helpful information)](#what-to-send-additional-helpful-information)
- [But I don't *have* the source code!](#but-i-dont-have-the-source-code)
- [But I don't *have* the source code and am incapable of figuring how how to do a hand disassembly!](#but-i-dont-have-the-source-code-and-am-incapable-of-figuring-how-how-to-do-a-hand-disassembly)
- [Narrowing the problem](#narrowing-the-problem)
- [Karma](#karma)
- [Confidentiality of Bug Reports](#confidentiality-of-bug-reports)
- [Ethics](#ethics)
<!-- markdown-toc end -->
# The difficulty of the problem
This decompiler is a constant work in progress: Python keeps
changing, and so does its code generation.
@@ -41,10 +56,10 @@ bugs you may have an interest in. If you require decompiling bytecode
immediately, consider using a decompilation service, listed further
down in this document.
## Is it really a bug?
# Is it really a bug?
### Do you have valid bytecode?
## Do you have valid bytecode?
As mentioned in README.rst, this project doesn't handle obfuscated
code. See README.rst for suggestions for how to remove some kinds of
@@ -55,11 +70,11 @@ Python comes with a disassembly module called `dis`. A prerequisite
module for this package, `xdis` has a cross-python version
disassembler called `pydisasm`.
### Semantic equivalence vs. exact source code
## Semantic equivalence vs. exact source code
Consider how Python compiles something like "(x*y) + 5". Early on
Python creates an "abstract syntax tree" (AST) for this. And this is
"abstract" in the sense that unimportant, redundant or unnecceary
"abstract" in the sense that unimportant, redundant or unnecessary
items have been removed. Here, this means that any notion that you
wrote "x+y" in parenthesis is lost, since in this context they are
unneeded. Also lost is the fact that the multiplication didn't have
@@ -132,7 +147,7 @@ Python will eliminate the entire "if" statement.
So just because the text isn't the same, does not
necessarily mean there's a bug.
## What to send (minimum requirements)
# What to send (minimum requirements)
The basic requirement is pretty simple:
@@ -146,7 +161,7 @@ sending is too large.
Also try to narrow the bug. See below.
## What to send (additional helpful information)
# What to send (additional helpful information)
Some kind folks also give the invocation they used and the output
which usually includes an error message produced. This is
@@ -159,7 +174,7 @@ provide the input command and the output from that, please give:
* Python interpreter version used
### But I don't *have* the source code!
## But I don't *have* the source code!
Sure, I get it. No problem. There is Python assembly code on parse
errors, so simply by hand decompile that. To get a full disassembly,
@@ -167,7 +182,7 @@ use `pydisasm` from the [xdis](https://pypi.python.org/pypi/xdis)
package. Opcodes are described in the documentation for
the [dis](https://docs.python.org/3.6/library/dis.html) module.
### But I don't *have* the source code and am incapable of figuring how how to do a hand disassembly!
### But I don't *have* the source code and am incapable of figuring how to do a hand disassembly!
Well, you could learn. No one is born into this world knowing how to
disassemble Python bytecode. And as Richard Feynman once said, "What
@@ -179,7 +194,7 @@ Compilers](http://www.crazy-compilers.com/decompyle/) offers a
byte-code decompiler service for versions of Python up to 2.6. (If
there are others around let me know and I'll list them here.)
## Narrowing the problem
# Narrowing the problem
I don't need or want the entire source code base for the file(s) or
module(s) can't be decompiled. I just need those file(s) or module(s).
@@ -197,22 +212,53 @@ what doesn't. That is useful. Or maybe the same file will decompile
properly on a neighboring version of Python. That is helpful too.
In sum, the more you can isolate or narrow the problem, the more
likley the problem will be fixed and fixed sooner.
likely the problem will be fixed and fixed sooner.
## Confidentiality of Bug Reports
# Karma
I realize that following the instructions given herein puts a bit of
burden on the bug reporter. In my opinion, this is justified as
attempts to balance somewhat the burden and effort needed to fix the
bug and the attempts to balance number of would-be bug reporters with
the number of bug fixers. Better bug reporters are more likely to move
in the category of bug fixers.
The barrier to reporting a big is pretty small: all you really need is
a github account, and the ability to type something after clicking
some buttons. So the reality is that many people just don't bother to
read these instructions, let alone follow it to any simulacrum.
And the reality is also that bugs sometimes get fixed even though
these instructions are not followed.
So one factors I may take into consideration is the bug reporter's karma.
* Have you demonstrably contributed to open source? I may look at your
github profile to see what contributions you have made, how popular
those contributions are, or how popular you are.
* How appreciative are you? Have you starred this project that you are
seeking help from? Have you starred _any_ github project? And the above
two kind of feed into ...
* Attitude. Some people feel that they are doing me and the world a
great favor by just pointing out that there is a problem whose solution
would greatly benefit them. Perhaps this is why they feel that
instructions are not to be followed by them, nor any need for
showing evidence gratitude when help is offered them.
# Confidentiality of Bug Reports
When you report a bug, you are giving up confidentiality to the source
code and the byte code. However, I would imagine that if you have
narrowed the problem sufficiently, confidentiality of the little that
remains would not be an issue.
However feel free to remove any commments, and modify variable names
However feel free to remove any comments, and modify variable names
or constants in the source code.
## Ethics
# Ethics
I do not condone using this program for unethical or illegal purposes.
More detestful, at least to me, is asking for help to assist you in
More detestable, at least to me, is asking for help to assist you in
something that might not legitimate.
Don't use the issue tracker for such solicitations. To try to stave

View File

@@ -40,6 +40,10 @@ check-3.0 check-3.1 check-3.2 check-3.6:
check-3.7: pytest
$(MAKE) -C test check
#:Tests for Python 2.4-2.5 (don't have pytest)
check-2.4 check-2.5:
$(MAKE) -C test $@
#:PyPy 2.6.1 PyPy 5.0.1, or PyPy 5.8.0-beta0
# Skip for now
2.6 5.0 5.3 5.6 5.8:

View File

@@ -1,36 +1,138 @@
uncompyle6 3.2.4 2018-06-04 7x9 release
3.3.3 2019-05-19 Henry and Lewis
================================
As before, decomplation bugs fixed. The focus has primarily been on
Python 3.7. But with this release, releases will be put on hold,as a
better control-flow detection is worked on . Tis has been needed for a
while, and is long overdue. It will probably also take a while to get
done as good as what we have now.
However this work will be done in a new project
[decompyle3](https://github.com/rocky/python-decompile3). In contrast
to _uncompyle6_ the code wil be written assuming a modern Python 3,
e.g. 3.7. It is originally intended to decompile Python version 3.7
and greater.
* A number of Python 3.7+ chained comparisons were fixed
* Revise Python 3.6ish format string handling
* Go over operator precedence, e.g. for AST IfExp
Reported Bug Fixes
------------------
* [#239: 3.7 handling of 4-level attribute import](https://github.com/rocky/python-uncompyle6/issues/239),
* [#229: Inconsistent if block in python3.6](https://github.com/rocky/python-uncompyle6/issues/229),
* [#227: Args not appearing in decompiled src when kwargs is specified explicitly (call_ex_kw)](https://github.com/rocky/python-uncompyle6/issues/227)
2.7 confusion around "and" versus comprehension "if"
* [#225: 2.7 confusion around "and" vs comprehension "if"](https://github.com/rocky/python-uncompyle6/issues/225)
3.3.2 2019-05-03 Better Friday
==============================
As before, lots of decomplation bugs fixed. The focus has primarily
been on Python 3.6. We can now parse the entire 3.6.8 Python library
and verify that without an error. The same is true for 3.5.8. A number
of the bugs fixed though are not contained to these versions. In fact
some span back as far as 2.x
But as before, many more remain in the 3.7 and 3.8 range which will
get addressed in future releases
Pypy 3.6 support was started. Pypy 3.x detection fixed (via xdis)
3.3.1 2019-04-19 Good Friday
==========================
Lots of decomplation bugs, especially in the 3.x series fixed. Don't worry though, many more remain.
* Add annotation return values in 3.6+
* Fix 3.6+ lambda parameter handling decompilation
* Fix 3.7+ chained comparision decompilation
* split out semantic-action customization into more separate files
* Add 3.8 try/else
* Fix 2.7 generator decompilation
* Fix some parser failures fixes in 3.4+ using test_pyenvlib
* Add more run tests
3.3.0 2019-04-14 Holy Week
==========================
* First cut at Python 3.8 (many bug remain)
* The usual smattering of bug and doc fixes
3.2.6 2019-03-23 Mueller Report
=======================================
Mostly more of the same: bug fixes and pull requests.
Bug Fixes
-----------
* [#221: Wrong grammar for nested ifelsestmt (in Python 3.7 at least)](https://github.com/rocky/python-uncompyle6/issues/221)
* [#215: 2.7 can have two JUMP_BACKs at the end of a while loop](https://github.com/rocky/python-uncompyle6/issues/215)
* [#209: Fix "if" return boundary in 3.6+](https://github.com/rocky/python-uncompyle6/issues/209),
* [#208: Comma placement in 3.6 and 3.7 **kwargs](https://github.com/rocky/python-uncompyle6/issues/208),
* [#200: Python 3 bug in not detecting end bounds of an "if" ... "elif"](https://github.com/rocky/python-uncompyle6/issues/200),
* [#155: Python 3.x bytecode confusing "try/else" with "try" in a loop](https://github.com/rocky/python-uncompyle6/issues/155),
Pull Requests
----------------
* [#202: Better "assert" statement detemination in Python 2.7](https://github.com/rocky/python-uncompyle6/pull/211)
* [#204: Python 3.7 testing](https://github.com/rocky/python-uncompyle6/pull/204)
* [#205: Run more f-string tests on Python 3.7](https://github.com/rocky/python-uncompyle6/pull/205)
* [#211: support utf-8 chars in Python 3 sourcecode](https://github.com/rocky/python-uncompyle6/pull/202)
3.2.5 2018-12-30 Clearout sale
======================================
- 3.7.2 Remove deprecation warning on regexp string that isn't raw
- main.main() parameter `codes` is not used - note that
- Improve Python 3.6+ control flow detection
- More complete fragment instruction annotation for `imports`
3.2.4 2018-10-27 7x9 release
===================================
- Bug fixes #180, #182, #187, #192
- Enhancements #189
- Internal improvements
uncompyle6 3.2.3 2018-06-04 Michael Cohen flips and Fleetwood Redux
3.2.3 2018-06-04 Michael Cohen flips and Fleetwood Redux
======================================================================
- Python 1.3 support 3.0 bug and
- fix botched parameter ordering of 3.x in last release
uncompyle6 3.2.2 2018-06-04 When I'm 64
3.2.2 2018-06-04 When I'm 64
===================================
- Python 3.0 support and bug fixes
uncompyle6 3.2.1 2018-06-04 MF
3.2.1 2018-06-04 MF
=======================
- Python 1.4 and 1.5 bug fixes
uncompyle6 3.2.0 2018-05-19 Rocket Scientist
3.2.0 2018-05-19 Rocket Scientist
=========================================
- Add rudimentary 1.4 support (still a bit buggy)
- add --tree+ option to show formatting rule, when it is constant
- Python 2.7.15candidate1 support (via xdis)
- bug fixes, especially for 3.7 (but 2.7 and 3.6 and others as well)
uncompyle6 3.1.3 2018-04-16
3.1.3 2018-04-16
====================
- Add some Python 3.7 rules, such as for handling LOAD_METHOD (not complete)
- Fix some fragment bugs
- small doc changes
uncompyle6 3.1.2 2018-04-08 Eastern Orthodox Easter
3.1.2 2018-04-08 Eastern Orthodox Easter
==================================================
- Python 3.x subclass and call parsing fixes
- Allow/note running on Python 3.1
@@ -38,7 +140,8 @@ uncompyle6 3.1.2 2018-04-08 Eastern Orthodox Easter
- DRY instruction building code between 2.x and 3.x
- expand testing
uncompyle6 3.1.1 2018-04-01 Easter April Fool's
3.1.1 2018-04-01 Easter April Fool's
=============================================
Jesus on Friday's New York Times puzzle: "I'm stuck on 2A"
@@ -51,7 +154,8 @@ Jesus on Friday's New York Times puzzle: "I'm stuck on 2A"
- more runtime testing of decompiled code
- more removal of parenthesis around calls via setting precidence
uncompyle6 3.1.0 2018-03-21 Equinox
3.1.0 2018-03-21 Equinox
==============================
- Add code_deparse_with_offset() fragment function.
- Correct paramenter call fragment deparse_code()
@@ -59,7 +163,8 @@ uncompyle6 3.1.0 2018-03-21 Equinox
About 5% of 3.6 fail parsing now. But
semantics still needs much to be desired.
uncompyle6 3.0.1 2018-02-17
3.0.1 2018-02-17
====================
- All Python 2.6.9 standard library files weakly verify
- Many 3.6 fixes. 84% of the first 200 standard library files weakly compile.
@@ -69,7 +174,8 @@ uncompyle6 3.0.1 2018-02-17
- And more add tests target previous existing bugs more completely
- sync recent license changes in metadata
uncompyle6 3.0.0 2018-02-17
3.0.0 2018-02-17
====================
- deparse_code() and lookalikes from the various semantic actions are
now deprecated. Instead use new API code_deparse() which makes the
@@ -91,7 +197,8 @@ A bit more work is still needed for 3.6 especially in the area of
function calls and definitions.
uncompyle6 2.16.0 2018-02-17
2.16.0 2018-02-17
=====================
- API additions:
- add fragments.op_at_code_loc() and
@@ -103,18 +210,21 @@ uncompyle6 2.16.0 2018-02-17
- Fix Python 3.5+ CALL_FUNCTION_VAR and BUILD_LIST_UNPACK in call; with this
we can can handle 3.5+ f(a, b, *c, *d, *e) now
uncompyle6 2.15.1 2018-02-05
2.15.1 2018-02-05
=====================
- More bug fixes and revert an improper bug fix in 2.15.0
uncompyle6 2.15.0 2018-02-05 pycon2018.co
2.15.0 2018-02-05 pycon2018.co
=====================================
- Bug fixes
- Code fragment improvements
- Code cleanups
- Expand testing
uncompyle6 2.15.1 2018-01-27
2.15.1 2018-01-27
=====================
- Add --linemap option to give line correspondences
between original source lines and reconstructed line sources.
@@ -126,7 +236,8 @@ uncompyle6 2.15.1 2018-01-27
- Correct 3.6+ calls with kwargs
- Describe the difficulty of 3.6 in README
uncompyle6 2.14.3 2018-01-19
2.14.3 2018-01-19
=====================
- Fix bug in 3.5+ await stmt
- Better version to magic handling; handle 3.5.2 .. 3.5.4 versions
@@ -138,7 +249,8 @@ uncompyle6 2.14.3 2018-01-19
- better tests in setup.py for running the right version of Python
- Fix 2.6- parsing of "for .. try/else" ... with "continue" inside
uncompyle6 2.14.2 2018-01-09 Samish
2.14.2 2018-01-09 Samish
==============================
Decompilation bug fixes, mostly 3.6 and pre 2.7
@@ -156,7 +268,8 @@ Decompilation bug fixes, mostly 3.6 and pre 2.7
Python versions
- Match Python AST names more closely when possible
uncompyle6 2.14.1 2017-12-10 Dr. Gecko
2.14.1 2017-12-10 Dr. Gecko
===================================
- Many decompilation bugfixes
- Grammar rule reduction and version isolation
@@ -164,7 +277,8 @@ uncompyle6 2.14.1 2017-12-10 Dr. Gecko
with Python AST
- Start automated Python stdlib testing - full round trip
uncompyle6 2.14.0 2017-11-26 johnnybamazing
2.14.0 2017-11-26 johnnybamazing
=========================================
- Start to isolate grammar rules between versions
and remove used grammar rules
@@ -172,7 +286,8 @@ uncompyle6 2.14.0 2017-11-26 johnnybamazing
(many more remain)
- Add stdlib/runtests.sh for even more rigorous testing
uncompyle6 2.13.3 2017-11-13
2.13.3 2017-11-13
=====================
Overall: better 3.6 decompiling and some much needed code refactoring and cleanup
@@ -198,22 +313,26 @@ Overall: better 3.6 decompiling and some much needed code refactoring and cleanu
- reinstate some bytecode tests since decompiling has gotten better
- Revise how to report a bug
uncompyle6 2.13.2 2017-10-12
2.13.2 2017-10-12
=====================
- Re-release using a more automated approach
uncompyle6 2.13.1 2017-10-11
2.13.1 2017-10-11
=====================
- Re-release because Python 2.4 source uploaded rather than 2.6-3.6
uncompyle6 2.13.0 2017-10-10
2.13.0 2017-10-10
=====================
- Fixes in deparsing lambda expressions
- Improve table-semantics descriptions
- Document hacky customize arg count better (until we can remove it)
- Update to use xdis 3.7.0 or greater
uncompyle6 2.12.0 2017-09-26
2.12.0 2017-09-26
=====================
- Use xdis 3.6.0 or greater now
- Small semantic table cleanups
@@ -221,11 +340,13 @@ uncompyle6 2.12.0 2017-09-26
- Slightly more Python 3.7, but still failing a lot
- Cross Python 2/3 compatibility with annotation arguments
uncompyle6 2.11.5 2017-08-31
2.11.5 2017-08-31
=====================
- Skeletal support for Python 3.7
uncompyle6 2.11.4 2017-08-15
2.11.4 2017-08-15
=====================
* scanner and parser now allow 3-part version string lookups,
e.g. 2.7.1 We allow a float here, but if passed a string like '2.7'. or
@@ -237,7 +358,8 @@ uncompyle6 2.11.4 2017-08-15
* Some PyPy tolerance in validate testing.
* Some pyston tolerance
uncompyle6 2.11.3 2017-08-09
2.11.3 2017-08-09
=====================
Very minor changes
@@ -246,20 +368,24 @@ Very minor changes
- use xdis opcode sets
- xdis "exception match" is now "exception-match"
uncompyle6 2.11.2 2017-07-09
2.11.2 2017-07-09
=====================
- Start supporting Pypy 3.5 (5.7.1-beta)
- use xdis 3.5.0's opcode sets and require xdis 3.5.0
- Correct some Python 2.4-2.6 loop detection
- guard against badly formatted bytecode
uncompyle6 2.11.1 2017-06-25
2.11.1 2017-06-25
=====================
- Python 3.x annotation and function signature fixes
- Bump xdis version
- Small pysource bug fixes
uncompyle6 2.11.0 2017-06-18 Fleetwood
2.11.0 2017-06-18 Fleetwood
==================================
- Major improvements in fragment tracking
* Add nonterminal node in extractInfo
* tag more offsets in expressions
@@ -269,14 +395,16 @@ uncompyle6 2.11.0 2017-06-18 Fleetwood
- Fixes yet again for make_function node handling; document what's up here
- Fix bug in snowflake Python 3.5 *args kwargs
uncompyle6 2.10.1 2017-06-3 Marylin Frankel
2.10.1 2017-06-3 Marylin Frankel
========================================
- fix some fragments parsing bugs
- was returning the wrong type sometimes in deparse_code_around_offset()
- capture function name in offsets
- track changes to ifelstrmtr node from pysource into fragments
uncompyle6 2.10.0 2017-05-30 Elaine Gordon
2.10.0 2017-05-30 Elaine Gordon
=======================================
- Add fuzzy offset deparse look up
- 3.6 bug fixes
@@ -296,19 +424,21 @@ uncompyle6 2.10.0 2017-05-30 Elaine Gordon
- 2.3, 2.4 "if 1 .." fixes
- 3.x annotation fixes
uncompyle6 2.9.11 2017-04-06
2.9.11 2017-04-06
=====================
- Better support for Python 3.5+ BUILD_MAP_UNPACK
- Start 3.6 CALL_FUNCTION_EX support
- Many decompilation bug fixes. (Many more remain). See ChangeLog
uncompyle6 2.9.10 2017-02-25
2.9.10 2017-02-25
=====================
- Python grammar rule fixes
- Add ability to get grammar coverage on runs
- Handle Python 3.6 opcode BUILD_CONST_KEYMAP
uncompyle6 2.9.9 2016-12-16
2.9.9 2016-12-16
- Remaining Python 3.5 ops handled
(this also means more Python 3.6 ops are handled)
@@ -318,7 +448,8 @@ uncompyle6 2.9.9 2016-12-16
- Better control-flow detection
- Code cleanups and misc bug fixes
uncompyle6 2.9.8 2016-12-16
2.9.8 2016-12-16
====================
- Better control-flow detection
- pseudo instruction THEN in 2.x
@@ -331,7 +462,8 @@ uncompyle6 2.9.8 2016-12-16
- verify call fixes for Python <= 2.4
- more Python lint
uncompyle6 2.9.7 2016-12-16
2.9.7 2016-12-16
====================
- Start to handle 3.5/3.6 build_map_unpack_with_call
- Some Python 3.6 bytecode to wordcode conversion fixes
@@ -341,7 +473,8 @@ uncompyle6 2.9.7 2016-12-16
- some 3.2 compatibility
- Better Python 3 control flow detection by adding Pseudo ELSE opcodes
uncompyle6 2.9.6 2016-12-04
2.9.6 2016-12-04
====================
- Shorten Python3 grammars with + and *
this requires spark parser 1.5.1
@@ -349,7 +482,8 @@ uncompyle6 2.9.6 2016-12-04
decompile accuracy. This too requires
spark parser 1.5.1
uncompyle6 2.9.6 2016-11-20
2.9.6 2016-11-20
====================
- Correct MANIFEST.in
- More AST grammar checking
@@ -366,7 +500,8 @@ uncompyle6 2.9.6 2016-11-20
- Python 2 and 3 detect structure code is more similar
- Handle Docstrings with embedded triple quotes (""")
uncompyle6 2.9.5 2016-11-13
2.9.5 2016-11-13
====================
- Fix Python 3 bugs:
* improper while 1 else
@@ -376,13 +511,15 @@ uncompyle6 2.9.5 2016-11-13
- Start grammar misparse checking
uncompyle6 2.9.4 2016-11-02
2.9.4 2016-11-02
====================
- Handle Python 3.x function annotations
- track def keyword-parameter line-splitting in source code better
- bump min xdis version to mask previous xdis bug
uncompyle6 2.9.3 2016-10-26
2.9.3 2016-10-26
====================
Release forced by incompatibility change in xdis 3.2.0.
@@ -397,7 +534,8 @@ Release forced by incompatibility change in xdis 3.2.0.
* Handle 3.6 handle single and multiple fstring better
uncompyle6 2.9.2 2016-10-15
2.9.2 2016-10-15
====================
- use source-code line breaks to assist in where to break
in tuples and maps
@@ -405,12 +543,14 @@ uncompyle6 2.9.2 2016-10-15
- Fix some Python 2.6 and below bugs
- DRY fragments.py code a little
uncompyle6 2.9.1 2016-10-09
2.9.1 2016-10-09
====================
- Improved Python 1.5 decompiling
- Handle old-style pre Python 2.2 classes
uncompyle6 2.9.0 2016-10-09
2.9.0 2016-10-09
====================
- Use xdis 3.0.0 protocol load_module.
this Forces change in requirements.txt and _pkg_info_.py
@@ -420,7 +560,8 @@ uncompyle6 2.9.0 2016-10-09
- Fix bug with -t ... Wasn't showing source text when -t option was given
- Fix 2.1-2.6 bug in list comprehension
uncompyle6 2.8.4 2016-10-08
2.8.4 2016-10-08
====================
- Python 3 disassembly bug fixes
- Python 3.6 fstring bug fixes (from moagstar)
@@ -428,7 +569,8 @@ uncompyle6 2.8.4 2016-10-08
- COME_FROM suffixes added in Python3
- use .py extension in verification disassembly
uncompyle6 2.8.3 2016-09-11 live from NYC!
2.8.3 2016-09-11 live from NYC!
=======================================
NOTE: this is possibly the last release before a major reworking of
control-flow structure detection is done.
@@ -456,14 +598,16 @@ control-flow structure detection is done.
- bump xdis requirement so we can deparse dropbox 2.5 code
- Added H. Goebel's changes before 2.4 in DECOMPYLE-2.4-CHANGELOG.txt
uncompyle6 2.8.2 2016-08-29
2.8.2 2016-08-29
====================
- Handle Python 3.6 format string conversions !r, !s, !a
- Start to handle 3.1 bytecode
- Fix some PyPy translation bugs
- We now only handle 3.6.0a3+ since that is incompatible with 3.6 before that
uncompyle6 2.8.1 2016-08-20
2.8.1 2016-08-20
====================
- Add Python 2.2 decompilation
@@ -471,7 +615,8 @@ uncompyle6 2.8.1 2016-08-20
* PyPy LOOKUP_METHOD bug
* Python 3.6 FORMAT_VALUE handles expressions now
uncompyle6 2.8.0 2016-08-03
2.8.0 2016-08-03
====================
- Start Python 3.6 support (moagstar)
more work on PEP 498 needed
@@ -482,20 +627,23 @@ uncompyle6 2.8.0 2016-08-03
- better grammar and semantic action segregation based
on python bytecode version
uncompyle6 2.7.1 2016-07-26
2.7.1 2016-07-26
====================
- PyPy bytecodes for 2.7 and 3.2 added
- Instruction formatting improved slightly
- 2.7 bytecode "continue" bug fixed
uncompyle6 2.7.0 2016-07-15
2.7.0 2016-07-15
====================
- Many Syntax and verification bugs removed
tested on standard libraries from 2.3.7 to 3.5.1
and they all decompile and verify fine.
I'm sure there are more bugs though.
uncompyle6 2.6.2 2016-07-11 Manhattenhenge
2.6.2 2016-07-11 Manhattenhenge
=======================================
- Extend bytecodes back to 2.3
- Fix bugs:
@@ -504,13 +652,15 @@ uncompyle6 2.6.2 2016-07-11 Manhattenhenge
* continue statements
- DRY and segregate grammar more
uncompyle6 2.6.1 2016-07-08
2.6.1 2016-07-08
====================
- Go over Python 2.5 bytecode deparsing
all library programs now deparse
- Fix a couple bugs in 2.6 deparsing
uncompyle6 2.6.0 2016-07-07
2.6.0 2016-07-07
====================
- Improve Python 2.6 bytecode deparsing:
stdlib now will deparse something
@@ -519,7 +669,8 @@ uncompyle6 2.6.0 2016-07-07
- Fix bug in installing uncompyle6 script
- Doc improvements
uncompyle6 2.5.0 2016-06-22 Summer Solstice
2.5.0 2016-06-22 Summer Solstice
========================================
- Much better Python 3.2-3.5 coverage.
3.4.6 is probably the best;3.2 and 3.5 are weaker
@@ -528,7 +679,8 @@ uncompyle6 2.5.0 2016-06-22 Summer Solstice
- Better fragment offset tracking
- Some (much-needed) code refactoring
uncompyle6 2.4.0 2016-05-18 (in memory of Lewis Bernstein)
2.4.0 2016-05-18 (in memory of Lewis Bernstein)
===========================================================
- Many Python 3 bugs fixed:
* Python 3.2 to 3.5 libraries largely
@@ -543,7 +695,8 @@ uncompyle6 2.4.0 2016-05-18 (in memory of Lewis Bernstein)
* 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
2.3.5 and 2.3.6 2016-05-14
=================================
- Python 2 class decorator fix (thanks to Tey)
- Fix fragment parsing bugs
@@ -555,20 +708,23 @@ uncompyle6 2.3.5 and 2.3.6 2016-05-14
- Correct history based on info from Dan Pascu
- Fix up pip packaging, ugh.
uncompyle6 2.3.4 2016-05-5
2.3.4 2016-05-5
===================
- More Python 3.5 parsing bugs addressed
- decompiling Python 3.5 from other Python versions works
- test from Python 3.2
- remove "__module__ = __name__" in 3.0 <= Python 3.2
uncompyle6 2.3.3 2016-05-3
2.3.3 2016-05-3
===================
- Fix bug in running uncompyle6 script on Python 3
- Speed up performance on deparsing long lists by grouping in chunks of 32 and 256 items
- DRY Python expressions between Python 2 and 3
uncompyle6 2.3.2 2016-05-1
2.3.2 2016-05-1
===================
- Add --version option standalone scripts
- Correct License information in package
@@ -577,17 +733,20 @@ uncompyle6 2.3.2 2016-05-1
specific grammar code
- Fix bug in 3.5+ constant map parsing
uncompyle6 2.3.0, 2.3.1 2016-04-30
2.3.0, 2.3.1 2016-04-30
=============================
- Require spark_parser >= 1.1.0
uncompyle6 2.2.0 2016-04-30
2.2.0 2016-04-30
====================
- Spark is no longer here but pulled separate package spark_parse
- Python 3 parsing fixes
- More tests
uncompyle6 2.2.0 2016-04-02
2.2.0 2016-04-02
====================
- Support single-mode (in addition to exec-mode) compilation
- Start to DRY Python 2 and Python 3 grammars
@@ -595,7 +754,8 @@ uncompyle6 2.2.0 2016-04-02
- Fix bug in uncomplye6 -d and -r options (via lelicopter)
uncompyle6 2.1.3 2016-01-02
2.1.3 2016-01-02
====================
- Limited support for decompiling Python 3.5
- Improve Python 3 class deparsing
@@ -604,18 +764,21 @@ uncompyle6 2.1.3 2016-01-02
- increase test coverage
- fix misc small bugs and some improvements
uncompyle6 2.1.2 2015-12-31
2.1.2 2015-12-31
====================
- Fix cross-version Marshal loading
- Handle Python 3.3 . dotted class names
- Limited 3.5 support: allows deparsing other versions
- Refactor code more, misc bug fixes
uncompyle6 2.1.1 2015-12-27
2.1.1 2015-12-27
====================
- packaging issues
uncompyle6 2.1.0 2015-12-27
2.1.0 2015-12-27
====================
- Python 3.x deparsing much more solid
- Better cross-version deparsing
@@ -624,7 +787,8 @@ Some bugs squashed while other run rampant. Some code cleanup while
much more is yet needed. More tests added, but many more are needed.
uncompyle6 2.0.0 2015-12-11
2.0.0 2015-12-11
====================
Changes from uncompyle2

View File

@@ -12,7 +12,7 @@ Introduction
*uncompyle6* translates Python bytecode back into equivalent Python
source code. It accepts bytecodes from Python version 1.3 to version
3.7, spanning over 22 years of Python releases. We include Dropbox's
3.8, spanning over 24 years of Python releases. We include Dropbox's
Python 2.5 bytecode and some PyPy bytecode.
Why this?
@@ -76,7 +76,7 @@ Requirements
The code here can be run on Python versions 2.6 or later, PyPy 3-2.4,
or PyPy-5.0.1. Python versions 2.4-2.7 are supported in the
python-2.4 branch. The bytecode files it can read have been tested on
Python bytecodes from versions 1.4, 2.1-2.7, and 3.0-3.6 and the
Python bytecodes from versions 1.4, 2.1-2.7, and 3.0-3.8 and the
above-mentioned PyPy versions.
Installation
@@ -152,7 +152,7 @@ for that bytecode version. Having done this the bytecode produced
could be compared with the original bytecode. However as Python's code
generation got better, this is no longer feasible.
There verification that we use that doesn't check bytecode for
The verification that we use that doesn't check bytecode for
equivalence but does check to see if the resulting decompiled source
is a valid Python program by running the Python interpreter. Because
the Python language has changed so much, for best results you should
@@ -194,8 +194,12 @@ Between Python 3.5, 3.6 and 3.7 there have been major changes to the
Currently not all Python magic numbers are supported. Specifically in
some versions of Python, notably Python 3.6, the magic number has
changes several times within a version. We support only the released
magic. There are also customized Python interpreters, notably Dropbox,
changes several times within a version.
**We support only released versions, not candidate versions.** Note however
that the magic of a released version is usually the same as the *last* candidate version prior to release.
There are also customized Python interpreters, notably Dropbox,
which use their own magic and encrypt bytcode. With the exception of
the Dropbox's old Python 2.5 interpreter this kind of thing is not
handled.
@@ -226,7 +230,7 @@ See Also
* https://github.com/rocky/python-uncompyle6/wiki : Wiki Documents which describe the code and aspects of it in more detail
.. _trepan: https://pypi.python.org/pypi/trepan2
.. _trepan: https://pypi.python.org/pypi/trepan2g
.. _compiler: https://pypi.python.org/pypi/spark_parser
.. _HISTORY: https://github.com/rocky/python-uncompyle6/blob/master/HISTORY.md
.. _debuggers: https://pypi.python.org/pypi/trepan3k

View File

@@ -23,7 +23,7 @@
# Things that change more often go here.
copyright = """
Copyright (C) 2015-2018 Rocky Bernstein <rb@dustyfeet.com>.
Copyright (C) 2015-2019 Rocky Bernstein <rb@dustyfeet.com>.
"""
classifiers = ['Development Status :: 5 - Production/Stable',
@@ -43,6 +43,7 @@ classifiers = ['Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Debuggers',
'Topic :: Software Development :: Libraries :: Python Modules',
]
@@ -57,7 +58,7 @@ entry_points = {
]}
ftp_url = None
install_requires = ['spark-parser >= 1.8.7, < 1.9.0',
'xdis >= 3.8.8, < 3.9.0']
'xdis >= 4.0.1, < 4.1.0']
license = 'GPL3'
mailing_list = 'python-debugger@googlegroups.com'

0
admin-tools/check-newer-versions.sh Executable file → Normal file
View File

0
admin-tools/check-older-versions.sh Executable file → Normal file
View File

View File

@@ -30,9 +30,9 @@
$ make ChangeLog
# Update NEWS from ChangeLog:
# Update NEWS.md from ChangeLog:
$ emacs NEWS
$ emacs NEWS.md
$ make check
$ git commit --amend .
$ git push # get CI testing going early
@@ -58,7 +58,8 @@
$ git tag release-python-2.4-$VERSION
$ . ./admin-tools/make-dist-newer.sh
$ git tag release-$VERSION
Goto https://github.com/rocky/python-uncompyle6/releases
# Upload single package and look at Rst Formating

View File

@@ -0,0 +1,46 @@
git pull
Change version in uncompyle6/version.py
source uncompyle6/version.py
echo $VERSION
git commit -m"Get ready for release $VERSION" .
Update ChangeLog:
make ChangeLog
Update NEWS from ChangeLog
make check
git commit --amend .
git push
Make sure pyenv is running
# Pyenv
source admin-tools/check-newer-versions.sh
# Switch to python-2.4 and build that first...
source admin-tools/setup-python-2.4
rm ChangeLog
git merge master
Update NEWS from master branch
git commit -m"Get ready for release $VERSION" .
source admin-tools/check-older-versions.sh
source admin-tools/check-newer-versions.sh
make-dist-older.sh
git tag release-python-2.4-$VERSION
./make-dist-newer.sh
git tag release-$VERSION
twine upload dist/uncompyle6-${VERSION}*

View File

@@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='3.5.5 3.6.6 3.7.1 2.6.9 3.3.7 2.7.15 3.2.6 3.1.5 3.4.8'
export PYVERSIONS='3.6.8 3.7.3 2.6.9 3.3.7 2.7.16 3.2.6 3.1.5 3.4.8'

View File

@@ -6,4 +6,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='2.4.6 2.5.6'
export PYVERSIONS='2.4.6 2.5.6 2.6.9'

2
admin-tools/setup-master.sh Executable file → Normal file
View File

@@ -1,5 +1,5 @@
#!/bin/bash
PYTHON_VERSION=3.6.5
PYTHON_VERSION=3.6.8
# FIXME put some of the below in a common routine
function finish {

0
admin-tools/setup-python-2.4.sh Executable file → Normal file
View File

3
admin-tools/update-sources.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
cd $(dirname ${BASH_SOURCE[0]})/..
git pull

View File

@@ -30,7 +30,7 @@ def list_comp():
[y for y in range(3)]
def get_parsed_for_fn(fn):
code = fn.__code__ if PYTHON3 else fn.func_code
code = fn.func_code
return deparse(code, version=PYTHON_VERSION)
def check_expect(expect, parsed, fn_name):

View File

@@ -10,7 +10,7 @@ else:
maxint = sys.maxint
from uncompyle6.semantics.helper import print_docstring
class PrintFake():
class PrintFake:
def __init__(self):
self.pending_newlines = 0
self.f = StringIO()
@@ -47,7 +47,7 @@ class PrintFake():
out = out[:-self.pending_newlines]
self.f.write(out)
def println(self, *data):
if data and not(len(data) == 1 and data[0] ==''):
if data and not(len(data) == 1 and data[0] == ''):
self.write(*data)
self.pending_newlines = max(self.pending_newlines, 1)
return

View File

@@ -20,7 +20,7 @@ def bug_loop(disassemble, tb=None):
disassemble(tb)
def test_if_in_for():
code = bug.__code__
code = bug.func_code
scan = get_scanner(PYTHON_VERSION)
if 2.7 <= PYTHON_VERSION <= 3.0 and not IS_PYPY:
scan.build_instructions(code)

View File

@@ -1,154 +0,0 @@
# std
# test
from uncompyle6 import PYTHON_VERSION, deparse_code
import pytest
pytestmark = pytest.mark.skipif(PYTHON_VERSION <= 2.6,
reason='hypothesis needs 2.7 or later')
if PYTHON_VERSION > 2.6:
import hypothesis
from hypothesis import strategies as st
# uncompyle6
@st.composite
def expressions(draw):
# todo : would be nice to generate expressions using hypothesis however
# this is pretty involved so for now just use a corpus of expressions
# from which to select.
return draw(st.sampled_from((
'abc',
'len(items)',
'x + 1',
'lineno',
'container',
'self.attribute',
'self.method()',
# These expressions are failing, I think these are control
# flow problems rather than problems with FORMAT_VALUE,
# however I need to confirm this...
#'sorted(items, key=lambda x: x.name)',
#'func(*args, **kwargs)',
#'text or default',
#'43 if life_the_universe and everything else None'
)))
@st.composite
def format_specifiers(draw):
"""
Generate a valid format specifier using the rules:
format_spec ::= [[fill]align][sign][#][0][width][,][.precision][type]
fill ::= <any character>
align ::= "<" | ">" | "=" | "^"
sign ::= "+" | "-" | " "
width ::= integer
precision ::= integer
type ::= "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%"
See https://docs.python.org/2/library/string.html
:param draw: Let hypothesis draw from other strategies.
:return: An example format_specifier.
"""
alphabet_strategy = st.characters(min_codepoint=ord('a'), max_codepoint=ord('z'))
fill = draw(st.one_of(alphabet_strategy, st.none()))
align = draw(st.sampled_from(list('<>=^')))
fill_align = (fill + align or '') if fill else ''
type_ = draw(st.sampled_from('bcdeEfFgGnosxX%'))
can_have_sign = type_ in 'deEfFgGnoxX%'
can_have_comma = type_ in 'deEfFgG%'
can_have_precision = type_ in 'fFgG'
can_have_pound = type_ in 'boxX%'
can_have_zero = type_ in 'oxX'
sign = draw(st.sampled_from(list('+- ') + [''])) if can_have_sign else ''
pound = draw(st.sampled_from(('#', '',))) if can_have_pound else ''
zero = draw(st.sampled_from(('0', '',))) if can_have_zero else ''
int_strategy = st.integers(min_value=1, max_value=1000)
width = draw(st.one_of(int_strategy, st.none()))
width = str(width) if width is not None else ''
comma = draw(st.sampled_from((',', '',))) if can_have_comma else ''
if can_have_precision:
precision = draw(st.one_of(int_strategy, st.none()))
precision = '.' + str(precision) if precision else ''
else:
precision = ''
return ''.join((fill_align, sign, pound, zero, width, comma, precision, type_,))
@st.composite
def fstrings(draw):
"""
Generate a valid f-string.
See https://www.python.org/dev/peps/pep-0498/#specification
:param draw: Let hypothsis draw from other strategies.
:return: A valid f-string.
"""
character_strategy = st.characters(
blacklist_characters='\r\n\'\\s{}',
min_codepoint=1,
max_codepoint=1000,
)
is_raw = draw(st.booleans())
integer_strategy = st.integers(min_value=0, max_value=3)
expression_count = draw(integer_strategy)
content = []
for _ in range(expression_count):
expression = draw(expressions())
conversion = draw(st.sampled_from(('', '!s', '!r', '!a',)))
has_specifier = draw(st.booleans())
specifier = ':' + draw(format_specifiers()) if has_specifier else ''
content.append('{{{}{}}}'.format(expression, conversion, specifier))
content.append(draw(st.text(character_strategy)))
content = ''.join(content)
return "f{}'{}'".format('r' if is_raw else '', content)
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need at least python 3.6')
@hypothesis.given(format_specifiers())
def test_format_specifiers(format_specifier):
"""Verify that format_specifiers generates valid specifiers"""
try:
exec('"{:' + format_specifier + '}".format(0)')
except ValueError as e:
if 'Unknown format code' not in str(e):
raise
def run_test(text):
hypothesis.assume(len(text))
hypothesis.assume("f'{" in text)
expr = text + '\n'
code = compile(expr, '<string>', 'single')
deparsed = deparse_code(PYTHON_VERSION, code, compile_mode='single')
recompiled = compile(deparsed.text, '<string>', 'single')
if recompiled != code:
assert 'dis(' + deparsed.text.strip('\n') + ')' == 'dis(' + expr.strip('\n') + ')'
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need at least python 3.6')
@hypothesis.given(fstrings())
def test_uncompyle_fstring(fstring):
"""Verify uncompyling fstring bytecode"""
run_test(fstring)
@pytest.mark.skipif(PYTHON_VERSION < 3.6, reason='need at least python 3.6')
@pytest.mark.parametrize('fstring', [
"f'{abc}{abc!s}'",
"f'{abc}0'",
])
def test_uncompyle_direct(fstring):
"""useful for debugging"""
run_test(fstring)

View File

@@ -1,185 +0,0 @@
import string
from uncompyle6 import PYTHON_VERSION
import pytest
pytestmark = pytest.mark.skip(PYTHON_VERSION < 2.7,
reason="need at least Python 2.7")
if PYTHON_VERSION > 2.6:
from hypothesis import given, assume, example, settings, strategies as st
from validate import validate_uncompyle
from test_fstring import expressions
alpha = st.sampled_from(string.ascii_lowercase)
numbers = st.sampled_from(string.digits)
alphanum = st.sampled_from(string.ascii_lowercase + string.digits)
@st.composite
def function_calls(draw,
min_keyword_args=0, max_keyword_args=5,
min_positional_args=0, max_positional_args=5,
min_star_args=0, max_star_args=1,
min_double_star_args=0, max_double_star_args=1):
"""
Strategy factory for generating function calls.
:param draw: Callable which draws examples from other strategies.
:return: The function call text.
"""
st_positional_args = st.lists(
alpha,
min_size=min_positional_args,
max_size=max_positional_args
)
st_keyword_args = st.lists(
alpha,
min_size=min_keyword_args,
max_size=max_keyword_args
)
st_star_args = st.lists(
alpha,
min_size=min_star_args,
max_size=max_star_args
)
st_double_star_args = st.lists(
alpha,
min_size=min_double_star_args,
max_size=max_double_star_args
)
positional_args = draw(st_positional_args)
keyword_args = draw(st_keyword_args)
st_values = st.lists(
expressions(),
min_size=len(keyword_args),
max_size=len(keyword_args)
)
keyword_args = [
x + '=' + e
for x, e in
zip(keyword_args, draw(st_values))
]
star_args = ['*' + x for x in draw(st_star_args)]
double_star_args = ['**' + x for x in draw(st_double_star_args)]
arguments = positional_args + keyword_args + star_args + double_star_args
draw(st.randoms()).shuffle(arguments)
arguments = ','.join(arguments)
function_call = 'fn({arguments})'.format(arguments=arguments)
try:
# TODO: Figure out the exact rules for ordering of positional, keyword,
# star args, double star args and in which versions the various
# types of arguments are supported so we don't need to check that the
# expression compiles like this.
compile(function_call, '<string>', 'single')
except:
assume(False)
return function_call
def test_function_no_args():
validate_uncompyle("fn()")
@pytest.mark.skipif(PYTHON_VERSION < 2.7,
reason="need at least Python 2.7")
def isolated_function_calls(which):
"""
Returns a strategy for generating function calls, but isolated to
particular types of arguments, for example only positional arguments.
This can help reason about debugging errors in specific types of function
calls.
:param which: One of 'keyword', 'positional', 'star', 'double_star'
:return: Strategy for generating an function call isolated to specific
argument types.
"""
kwargs = dict(
max_keyword_args=0,
max_positional_args=0,
max_star_args=0,
max_double_star_args=0,
)
kwargs['_'.join(('min', which, 'args'))] = 1
kwargs['_'.join(('max', which, 'args'))] = 5 if 'star' not in which else 1
return function_calls(**kwargs)
with settings(max_examples=25):
@pytest.mark.skipif(PYTHON_VERSION < 2.7,
reason="need at least Python 2.7")
@given(isolated_function_calls('positional'))
@example("fn(0)")
def test_function_positional_only(expr):
validate_uncompyle(expr)
@pytest.mark.skipif(PYTHON_VERSION < 2.7,
reason="need at least Python 2.7")
@given(isolated_function_calls('keyword'))
@example("fn(a=0)")
def test_function_call_keyword_only(expr):
validate_uncompyle(expr)
@pytest.mark.skipif(PYTHON_VERSION < 2.7,
reason="need at least Python 2.7")
@given(isolated_function_calls('star'))
@example("fn(*items)")
def test_function_call_star_only(expr):
validate_uncompyle(expr)
@pytest.mark.skipif(PYTHON_VERSION < 2.7,
reason="need at least Python 2.7")
@given(isolated_function_calls('double_star'))
@example("fn(**{})")
def test_function_call_double_star_only(expr):
validate_uncompyle(expr)
@pytest.mark.xfail()
def test_BUILD_CONST_KEY_MAP_BUILD_MAP_UNPACK_WITH_CALL_BUILD_TUPLE_CALL_FUNCTION_EX():
validate_uncompyle("fn(w=0,m=0,**v)")
@pytest.mark.xfail()
def test_BUILD_MAP_BUILD_MAP_UNPACK_WITH_CALL_BUILD_TUPLE_CALL_FUNCTION_EX():
validate_uncompyle("fn(a=0,**g)")
@pytest.mark.xfail()
def test_CALL_FUNCTION_EX():
validate_uncompyle("fn(*g,**j)")
@pytest.mark.xfail()
def test_BUILD_MAP_CALL_FUNCTION_EX():
validate_uncompyle("fn(*z,u=0)")
@pytest.mark.xfail()
def test_BUILD_TUPLE_CALL_FUNCTION_EX():
validate_uncompyle("fn(**a)")
@pytest.mark.xfail()
def test_BUILD_MAP_BUILD_TUPLE_BUILD_TUPLE_UNPACK_WITH_CALL_CALL_FUNCTION_EX():
validate_uncompyle("fn(b,b,b=0,*a)")
@pytest.mark.xfail()
def test_BUILD_TUPLE_BUILD_TUPLE_UNPACK_WITH_CALL_CALL_FUNCTION_EX():
validate_uncompyle("fn(*c,v)")
@pytest.mark.xfail()
def test_BUILD_CONST_KEY_MAP_CALL_FUNCTION_EX():
validate_uncompyle("fn(i=0,y=0,*p)")
@pytest.mark.skip(reason='skipping property based test until all individual tests are passing')
@given(function_calls())
def test_function_call(function_call):
validate_uncompyle(function_call)

View File

@@ -7,7 +7,7 @@ def test_grammar():
def check_tokens(tokens, opcode_set):
remain_tokens = set(tokens) - opcode_set
remain_tokens = set([re.sub('_\d+$','', t) for t in remain_tokens])
remain_tokens = set([re.sub(r'_\d+$','', t) for t in remain_tokens])
remain_tokens = set([re.sub('_CONT$','', t) for t in remain_tokens])
remain_tokens = set(remain_tokens) - opcode_set
assert remain_tokens == set([]), \
@@ -18,15 +18,19 @@ def test_grammar():
right_recursive, dup_rhs) = p.check_sets()
# We have custom rules that create the below
expect_lhs = set(['pos_arg', 'get_iter', 'attribute'])
expect_lhs = set(['pos_arg', 'attribute'])
if PYTHON_VERSION < 3.8:
expect_lhs.add('get_iter')
unused_rhs = set(['list', 'mkfunc',
'mklambda',
'unpack',])
expect_right_recursive = set([('designList',
('store', 'DUP_TOP', 'designList'))])
if PYTHON_VERSION != 3.7:
if PYTHON_VERSION < 3.7:
unused_rhs.add('call')
if PYTHON_VERSION > 2.6:
@@ -46,6 +50,7 @@ def test_grammar():
unused_rhs.add("mkfunc_annotate")
unused_rhs.add("dict_comp")
unused_rhs.add("classdefdeco1")
unused_rhs.add("tryelsestmtl")
if PYTHON_VERSION >= 3.5:
expect_right_recursive.add((('l_stmts',
('lastl_stmt', 'come_froms', 'l_stmts'))))
@@ -60,7 +65,11 @@ def test_grammar():
expect_lhs.add('kwarg')
assert expect_lhs == set(lhs)
assert unused_rhs == set(rhs)
# FIXME
if PYTHON_VERSION != 3.8:
assert unused_rhs == set(rhs)
assert expect_right_recursive == right_recursive
expect_dup_rhs = frozenset([('COME_FROM',), ('CONTINUE',), ('JUMP_ABSOLUTE',),

View File

@@ -8,12 +8,8 @@ from uncompyle6.semantics.consts import (
if PYTHON3:
from io import StringIO
def iteritems(d):
return d.items()
else:
from StringIO import StringIO
def iteritems(d):
return d.iteritems()
from uncompyle6.semantics.pysource import SourceWalker as SourceWalker
@@ -30,7 +26,7 @@ def test_template_engine():
# FIXME: and so on...
from uncompyle6.semantics.consts import (
TABLE_DIRECT, TABLE_R,
TABLE_R, TABLE_DIRECT,
)
from uncompyle6.semantics.fragments import (
@@ -44,7 +40,7 @@ def test_tables():
(TABLE_DIRECT, 'TABLE_DIRECT', False),
(TABLE_R, 'TABLE_R', False),
(TABLE_DIRECT_FRAGMENT, 'TABLE_DIRECT_FRAGMENT', True)):
for k, entry in iteritems(t):
for k, entry in t.iteritems():
if k in skip_for_now:
continue
fmt = entry[0]
@@ -127,11 +123,17 @@ def test_tables():
"Full entry: %s" %
(name, k, arg, typ, entry[arg], type(entry[arg]), entry)
)
assert len(tup) == 2
assert 2 <= len(tup) <= 3
for j, x in enumerate(tup):
assert isinstance(x, int), (
"%s[%s][%d][%d] type '%s' is '%s should be an int but is %s. Full entry: %s" %
(name, k, arg, j, typ, x, type(x), entry)
if len(tup) == 3 and j == 1:
assert isinstance(x, str), (
"%s[%s][%d][%d] type '%s' is '%s should be an string but is %s. Full entry: %s" %
(name, k, arg, j, typ, x, type(x), entry)
)
else:
assert isinstance(x, int), (
"%s[%s][%d][%d] type '%s' is '%s should be an int but is %s. Full entry: %s" %
(name, k, arg, j, typ, x, type(x), entry)
)
pass
arg += 1

View File

@@ -1,7 +1,4 @@
import pytest
from uncompyle6 import PYTHON_VERSION, code_deparse
pytestmark = pytest.mark.skip(PYTHON_VERSION < 2.7,
reason="need at least Python 2.7")
if PYTHON_VERSION > 2.6:
def test_single_mode():

View File

@@ -9,4 +9,4 @@
12 JUMP_FORWARD 0 'to 15'
15_0 COME_FROM 12 '12'
15 LOAD_CONST 0 None
18 RETURN_VALUE
18 RETURN_VALUE

View File

@@ -12,4 +12,4 @@
18 STORE_NAME 2 'd'
21_0 COME_FROM 12 '12'
21 LOAD_CONST 2 None
24 RETURN_VALUE
24 RETURN_VALUE

View File

@@ -1,28 +1,25 @@
# future
from __future__ import print_function
# std
import os
import difflib
import subprocess
import tempfile
import functools
from StringIO import StringIO
# uncompyle6 / xdis
from uncompyle6 import PYTHON_VERSION, PYTHON3, IS_PYPY, deparse_code
from uncompyle6 import PYTHON_VERSION, IS_PYPY, deparse_code
# TODO : I think we can get xdis to support the dis api (python 3 version) by doing something like this there
from xdis.bytecode import Bytecode
from xdis.main import get_opcode
opc = get_opcode(PYTHON_VERSION, IS_PYPY)
Bytecode = functools.partial(Bytecode, opc=opc)
import six
if PYTHON3:
from io import StringIO
else:
from StringIO import StringIO
def _dis_to_text(co):
return Bytecode(co).dis()
from StringIO import StringIO
try:
import functools
Bytecode = functools.partial(Bytecode, opc=opc)
def _dis_to_text(co):
return Bytecode(co).dis()
except:
pass
def print_diff(original, uncompyled):
"""
@@ -45,8 +42,11 @@ def print_diff(original, uncompyled):
print('\nTo display diff highlighting run:\n pip install BeautifulSoup4')
diff = difflib.HtmlDiff().make_table(*args)
with tempfile.NamedTemporaryFile(delete=False) as f:
f = tempfile.NamedTemporaryFile(delete=False)
try:
f.write(str(diff).encode('utf-8'))
finally:
f.close()
try:
print()
@@ -63,8 +63,7 @@ def print_diff(original, uncompyled):
print('\nFor side by side diff install elinks')
diff = difflib.Differ().compare(original_lines, uncompyled_lines)
print('\n'.join(diff))
finally:
os.unlink(f.name)
os.unlink(f.name)
def are_instructions_equal(i1, i2):
@@ -80,7 +79,7 @@ def are_instructions_equal(i1, i2):
:return: True if the two instructions are approximately equal, otherwise False.
"""
result = (1==1
result = (1 == 1
and i1.opname == i2.opname
and i1.opcode == i2.opcode
and i1.arg == i2.arg
@@ -126,8 +125,9 @@ def validate_uncompyle(text, mode='exec'):
original_text = text
deparsed = deparse_code(PYTHON_VERSION, original_code,
compile_mode=mode,
out=six.StringIO(),
out=StringIO(),
is_pypy=IS_PYPY)
uncompyled_text = deparsed.text
uncompyled_code = compile(uncompyled_text, '<string>', 'exec')

View File

@@ -1,16 +1,16 @@
#!/usr/bin/env python
import sys
"""Setup script for the 'uncompyle6' distribution."""
import sys
SYS_VERSION = sys.version_info[0:2]
if not ((2, 6) <= SYS_VERSION <= (3, 7)):
mess = "Python Release 2.6 .. 3.7 are supported in this code branch."
if ((2, 4) <= SYS_VERSION <= (2, 7)):
mess += ("\nFor your Python, version %s, use the python-2.4 code/branch." %
if not ((2, 4) <= SYS_VERSION <= (2, 7)):
mess = "Python Release 2.4 .. 2.7 are supported in this code branch."
if ((3, 2) <= SYS_VERSION <= (3, 8)):
mess += ("\nFor your Python, version %s, use the master code/branch." %
sys.version[0:3])
elif SYS_VERSION < (2, 4):
mess += ("\nThis package is not supported for Python version %s."
else:
mess += ("\nThis package is not supported before Python 2.4. Your Python version is %s."
% sys.version[0:3])
print(mess)
raise Exception(mess)

55
test-unit/test_grammar.py Normal file
View File

@@ -0,0 +1,55 @@
import re
import unittest
from uncompyle6 import PYTHON_VERSION, IS_PYPY # , PYTHON_VERSION
from uncompyle6.parser import get_python_parser, python_parser
class TestGrammar(unittest.TestCase):
def test_grammar(self):
def check_tokens(tokens, opcode_set):
remain_tokens = set(tokens) - opcode_set
remain_tokens = set([re.sub('_\d+$','', t) for t in remain_tokens])
remain_tokens = set([re.sub('_CONT$','', t) for t in remain_tokens])
remain_tokens = set(remain_tokens) - opcode_set
self.assertEqual(remain_tokens, set([]),
"Remaining tokens %s\n====\n%s" % (remain_tokens, p.dump_grammar()))
p = get_python_parser(PYTHON_VERSION, is_pypy=IS_PYPY)
(lhs, rhs, tokens,
right_recursive, dup_rhs) = p.check_sets()
expect_lhs = set(['expr1024', 'pos_arg'])
unused_rhs = set(['list', 'call', 'mkfunc',
'mklambda',
'unpack',])
expect_right_recursive = frozenset([('designList',
('store', 'DUP_TOP', 'designList'))])
expect_lhs.add('kwarg')
self.assertEqual(expect_lhs, set(lhs))
self.assertEqual(unused_rhs, set(rhs))
self.assertEqual(expect_right_recursive, right_recursive)
expect_dup_rhs = frozenset([('COME_FROM',), ('CONTINUE',), ('JUMP_ABSOLUTE',),
('LOAD_CONST',),
('JUMP_BACK',), ('JUMP_FORWARD',)])
reduced_dup_rhs = {}
for k in dup_rhs:
if k not in expect_dup_rhs:
reduced_dup_rhs[k] = dup_rhs[k]
pass
pass
for k in reduced_dup_rhs:
print(k, reduced_dup_rhs[k])
# assert not reduced_dup_rhs, reduced_dup_rhs
def test_dup_rule(self):
import inspect
python_parser(PYTHON_VERSION, inspect.currentframe().f_code,
is_pypy=IS_PYPY,
parser_debug={
'dups': True, 'transition': False, 'reduce': False,
'rules': False, 'errorstack': None, 'context': True})
if __name__ == '__main__':
unittest.main()

View File

@@ -29,46 +29,53 @@ check:
$(MAKE) check-$(PYTHON_VERSION)
#: Run working tests from Python 2.6 or 2.7
check-2.6 check-2.7: check-bytecode-2 check-bytecode-3 check-bytecode-1 check-native-short
check-2.4 check-2.5 check-2.6 check-2.7: check-bytecode-2 check-bytecode-3 check-bytecode-1 check-native-short
#: Run working tests from Python 3.0
check-3.0: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.0 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.0-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.0 --weak-verify $(COMPILE)
#: Run working tests from Python 3.1
check-3.1: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.1 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.1-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.1 --weak-verify $(COMPILE)
#: Run working tests from Python 3.2
check-3.2: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.2-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify $(COMPILE)
#: Run working tests from Python 3.3
check-3.3: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.3 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.3-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.3 --weak-verify $(COMPILE)
#: Run working tests from Python 3.4
check-3.4: check-bytecode check-3.4-ok check-2.7-ok
$(PYTHON) test_pythonlib.py --bytecode-3.4 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.4-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.4 --weak-verify $(COMPILE)
#: Run working tests from Python 3.5
check-3.5: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.5 --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-3.5-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.5 --weak-verify $(COMPILE)
#: Run working tests from Python 3.6
check-3.6: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.6-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.6 --weak-verify $(COMPILE)
#: Run working tests from Python 3.7
check-3.7: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.7-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.7 --weak-verify $(COMPILE)
#: Run working tests from Python 3.8
check-3.8: check-bytecode
$(PYTHON) test_pythonlib.py --bytecode-3.8-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.8 --weak-verify $(COMPILE)
# FIXME
#: this is called when running under pypy3.5-5.8.0 or pypy2-5.6.0
5.8 5.6:
@@ -89,8 +96,10 @@ check-bytecode-2:
#: Check deparsing bytecode 3.x only
check-bytecode-3:
$(PYTHON) test_pythonlib.py --bytecode-3.0 \
--bytecode-3.1 --bytecode-3.2 --bytecode-3.3 \
--bytecode-3.4 --bytecode-3.5 --bytecode-3.6 --bytecode-pypy3.2
--bytecode-3.1 --bytecode-3.2 --bytecode-3.3 \
--bytecode-3.4 --bytecode-3.5 --bytecode-3.6 \
--bytecode-3.7 --bytecode-3.8 \
--bytecode-pypy3.2
#: Check deparsing on selected bytecode 3.x
check-bytecode-3-short:
@@ -139,6 +148,7 @@ check-bytecode-2.3:
#: Check deparsing Python 2.4
check-bytecode-2.4:
$(PYTHON) test_pythonlib.py --bytecode-2.4-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-2.4
#: Check deparsing Python 2.5
@@ -214,58 +224,68 @@ grammar-coverage-3.6:
#: Check deparsing Python 2.6
check-bytecode-2.6:
$(PYTHON) test_pythonlib.py --bytecode-2.6 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-2.6-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-2.6 --weak-verify
#: Check deparsing Python 2.7
check-bytecode-2.7:
$(PYTHON) test_pythonlib.py --bytecode-2.7 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-2.7-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-2.7 --weak-verify
#: Check deparsing Python 3.0
check-bytecode-3.0:
$(PYTHON) test_pythonlib.py --bytecode-3.0 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-3.0-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.0 --weak-verify
#: Check deparsing Python 3.1
check-bytecode-3.1:
$(PYTHON) test_pythonlib.py --bytecode-3.1 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-3.1-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.1 --weak-verify
#: Check deparsing Python 3.2
check-bytecode-3.2:
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-3.2-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.2 --weak-verify
#: Check deparsing Python 3.3
check-bytecode-3.3:
$(PYTHON) test_pythonlib.py --bytecode-3.3 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-3.3-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.3 --weak-verify
#: Check deparsing Python 3.4
check-bytecode-3.4:
$(PYTHON) test_pythonlib.py --bytecode-3.4 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-3.4-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.4 --weak-verify
#: Check deparsing Python 3.5
check-bytecode-3.5:
$(PYTHON) test_pythonlib.py --bytecode-3.5 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-3.5-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.5 --weak-verify
#: Check deparsing Python 3.6
check-bytecode-3.6:
$(PYTHON) test_pythonlib.py --bytecode-3.6 --weak-verify
$(PYTHON) test_pythonlib.py --bytecode-3.6-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.6 --weak-verify
#: Check deparsing Python 3.7
check-bytecode-3.7:
$(PYTHON) test_pythonlib.py --bytecode-3.7-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.7 --weak-verify
#: Check deparsing Python 3.8
check-bytecode-3.8:
$(PYTHON) test_pythonlib.py --bytecode-3.8-run --verify-run
$(PYTHON) test_pythonlib.py --bytecode-3.8 --weak-verify
#: short tests for bytecodes only for this version of Python
check-native-short:
$(PYTHON) test_pythonlib.py --bytecode-$(PYTHON_VERSION) --weak-verify $(COMPILE)
$(PYTHON) test_pythonlib.py --bytecode-$(PYTHON_VERSION)-run --verify-run $(COMPILE)
#: Run longer Python 2.6's lib files known to be okay
check-2.4-ok:
$(PYTHON) test_pythonlib.py --ok-2.4 --verify $(COMPILE)
#: Run longer Python 2.6's lib files known to be okay
check-2.6-ok:
$(PYTHON) test_pythonlib.py --ok-2.6 --weak-verify $(COMPILE)
@@ -294,6 +314,12 @@ pypy-2.7 5.0 5.3 6.0:
pypy-3.2 2.4:
$(PYTHON) test_pythonlib.py --bytecode-pypy3.2 --verify
#: PyPy 5.0.x with Python 3.6 ...
7.1:
$(PYTHON) test_pythonlib.py --bytecode-pypy3.6 --verify
clean: clean-py-dis clean-dis clean-unverified
clean-dis:

View File

@@ -4,12 +4,19 @@
import os, sys, py_compile
assert len(sys.argv) >= 2
version = sys.version[0:3]
for path in sys.argv[1:]:
if sys.argv[1] == '--run':
suffix = '_run'
py_source = sys.argv[2:]
else:
suffix = ''
py_source = sys.argv[1:]
for path in py_source:
short = os.path.basename(path)
if hasattr(sys, 'pypy_version_info'):
cfile = "bytecode_pypy%s/%s" % (version, short) + 'c'
cfile = "bytecode_pypy%s%s/%s" % (version, suffix, short) + 'c'
else:
cfile = "bytecode_%s/%s" % (version, short) + 'c'
cfile = "bytecode_%s%s/%s" % (version, suffix, short) + 'c'
print("byte-compiling %s to %s" % (path, cfile))
py_compile.compile(path, cfile)
if isinstance(version, str) or version >= (2, 6, 0):

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More