Commit Graph

132 Commits

Author SHA1 Message Date
rocky
2286aa5320 Get ready for release 2.3.3 2016-05-03 03:02:36 -04:00
rocky
a8c5f71cfe Merge branch 'master' of github.com:rocky/python-uncompyle6 2016-05-02 21:25:35 -04:00
rocky
feec241da8 Misc: long lists, DRY 2/3 grammars, '%' count
parse{2,3,r}.py: DRY Python expressions between Python 2 and 3
pysource.py, fragment.py, parser.py: handle long lists by grouping in chunks of 32
and 256
bin/uncompyle6: count %s properly
2016-05-02 21:25:16 -04:00
rocky
bfe8357f52 Trivial spacing change 2016-05-02 10:44:48 -04:00
rocky
ceb47aba9c Add -V | --version and simplfy changing it 2016-05-02 04:09:51 -04:00
rocky
08720474bf Expose uncompyle_file 2016-05-01 23:11:48 -04:00
rocky
119bb9bb26 Bug 2016-05-01 21:14:25 -04:00
rocky
dcbf8d2cf7 Bug in 3.5 constant map parsing 2016-05-01 20:54:42 -04:00
rocky
b52baddab6 Export module load and fns load_file, load_module 2016-05-01 13:27:00 -04:00
rocky
03bb54f8ea License is MIT
marsh.py: remove unused import
2016-05-01 11:58:46 -04:00
rocky
313e468bdc Forgot to define Python3ParserSingle 2016-05-01 07:18:29 -04:00
rocky
dc80b140c6 Start to DRY Python2 and Python3 grammars
Separate out 3.2, and 3.5+ specific grammar code
2016-05-01 07:13:36 -04:00
rocky
0a32a16d88 Python 3.0..3.2 bug in LOAD_FAST/STORE_LOCAL
LOAD_FAST         '__locals__'
STORE_LOCALS      ''

Also have to adjust doc constants for this crap

astnode.py: minor format change
2016-04-30 09:12:03 -04:00
rocky
f3a4e6ee54 Pevious commit grammar change is Python 3.5 and up 2016-04-30 04:03:38 -04:00
rocky
43f5c5dcca Python 3.5 if statments decompyle
Sometimes it doesn't need JUMP_FORWARD _come_from _come_from

For example:

def handle2(module):
    if module == 'foo':
        try:
            module = 1
        except ImportError as exc:
            module = exc

    return module

And:

if __name__:
    for i in (1, 2):
        x = 3
2016-04-30 03:51:54 -04:00
rocky
3e49aa56bb spark -> spark_parser 2016-04-28 19:03:51 -04:00
rocky
9cc9fc99c2 Really remove spark - Use external package instead 2016-04-28 02:12:30 -04:00
rocky
40badefe9d Use external spark now. 2016-04-27 23:04:31 -04:00
rocky
76768c889a Start to DRY Python 2 and Python 3 grammar code
Move common code to parser.py
2016-04-18 05:32:30 -04:00
rocky
8ae7e22f2e Add simgle-mode compilation 2016-04-18 05:14:47 -04:00
rocky
7e0526d627 Towards single compilation 2016-04-17 22:47:03 -04:00
rocky
9f7d36f8fb Handle Ternary "or". Remove mention of uncompyle3
uncompyle3 removed per Mysterie's request
[Fixes Issue #5]
2016-04-07 07:18:46 -04:00
rocky
31ebe88b38 Start to DRY opcode code. Limited support for decopyling Python 3.5 2016-01-02 22:59:02 -05:00
rocky
f0cc2df543 Track recent source class semantic actions in fragment actions 2016-01-02 13:11:19 -05:00
rocky
52da6f4a8f Make ScannerXX() initialization the same on Python 2.x and 3.x 2016-01-02 07:54:21 -05:00
rocky
54a0af733b Verify 3.4 bytecode. verify API call bug fixed. 2016-01-02 07:50:09 -05:00
rocky
2927921856 Python 3 class deparsing. stop earlier in uncompyle6 on a syntax error. 2016-01-02 05:38:22 -05:00
rocky
cd480c8670 Fix make_closure compilation from 2.x of 3.3 bytecode 2016-01-01 22:17:53 -05:00
rocky
7d42329c31 Work on MAKE_CLOSURE rules for Python 3.3 2016-01-01 21:55:14 -05:00
rocky
b89177d234 track source deparsing superclass bug fix 2015-12-31 15:24:24 -05:00
rocky
8d90e33832 Handle Python 3.3 > dotted class names 2015-12-31 10:56:12 -05:00
rocky
b82a8b90d5 Allow Python 3.5 to decomplyle other versions. No Python 3.5
bytecode support just yet though.
2015-12-30 23:46:29 -05:00
rocky
d3a32b6877 Show details on parsing assert failures. 2015-12-30 23:17:57 -05:00
rocky
21e51004ae Remove accidental schmutz. Try using pattr on 3.4 to get fn names 2015-12-30 20:18:20 -05:00
rocky
d5b023aec4 Parses another variation of Python3 try/except. Reinstate some tests 2015-12-30 19:05:58 -05:00
rocky
2e91de8355 Start using our replacement for inspect.iscode 2015-12-30 18:44:27 -05:00
rocky
5bbe2c4a45 Doc changes. 2015-12-30 18:20:50 -05:00
rocky
6ffd2fca90 document GenericASTTraversal.preorder and default. 2015-12-30 17:27:45 -05:00
rocky
b3ede4b64b Walker->SourceWalker Traverser->FragmentsWalker 2015-12-30 17:04:18 -05:00
rocky
1785113045 Tidy parse3 grammer a little 2015-12-30 10:26:07 -05:00
rocky
657eeb7de8 Towards Python3 getting try/except working more often. 2015-12-30 09:46:52 -05:00
rocky
313a8578b3 Fix another cross-version bug: eliminate version-specific library 'dis'
and use corresponding version-indepent routine instead.
2015-12-29 22:23:50 -05:00
rocky
a30f3625ac Fix Python 2 cross deparsing pythond bytecode tuples co_consts,
co_names, co_varnames. Reinstate cross Python 2-3 uncompiling
2015-12-29 22:11:45 -05:00
rocky
e17d94f28f Syntax error typo 2015-12-29 17:35:49 -05:00
rocky
16af79f042 Make sure internObjects is (re)initialized 2015-12-29 17:33:54 -05:00
rocky
116263dd8c inspect.iscode -> hasattr for now until we write a cross-version iscode 2015-12-29 17:05:48 -05:00
rocky
34841abe14 scanner3: Python 2.6 compatibility: change set initializations. Get rid
of * import
opcode_*: only a little of the much-needed larger cleanup
Makefile: remove 3.x bytecode checking from Python 2.x for now. DRY
Makefile a little bit (but more is needed)
2015-12-29 08:30:49 -05:00
rocky
226f3c7e63 Python 2.6.9 compatibility 2015-12-28 23:55:03 -05:00
rocky
f77c4b53c4 Marshal loading of = >python 3.4 from Python < 3.4 2015-12-28 14:56:53 -05:00
rocky
6f0a252693 Add Python3 marshal codes and start to handle cross-version Python code
object types, introducing scan.Code3
2015-12-28 14:17:28 -05:00