Commit Graph

2065 Commits

Author SHA1 Message Date
rocky
f8ae674890 Split out comprehension code..
sync with decompile a little better
2022-04-17 10:52:56 -04:00
rocky
420d22c094 Correct for pypy 3.7 2022-04-15 08:36:42 -04:00
rocky
a26ac79d0f Sync up decompyle3 customize37 somewhat 2022-04-15 08:22:45 -04:00
rocky
04510ac2f8 lambda formatting in f-string
In a formatted string using "lambda',  we should not add "\n".
For example in:
  f'{(lambda x:x)("8")!r}'

Adding a "\n" after "lambda x: x" will give an error message:
  SyntaxError: f-string expression part cannot include a backslash
2022-04-12 16:49:58 -04:00
rocky
a1fe069c8c Handle walrus operator
Or rather set precedence on call_stmt and expr_stmt

Adjust pytest test_single_compile so it works now
2022-04-12 05:21:13 -04:00
rocky
83ab85353b Remove a reference to an unset local variable
See also https://github.com/rocky/python-uncompyle6/pull/388
2022-04-09 02:29:44 -04:00
rocky
9735453283 Small changes
test code for pysource and bump lastest testing Python versions
2022-04-01 03:11:59 -04:00
rocky
3d24de7ce5 __init__.py lint 2022-03-09 12:16:38 -05:00
rocky
82456c15e1 Reduce check type for 2.5 and update bug reporting 2022-03-05 04:55:11 -05:00
rocky
3490389a66 Correct some Python 2.6 chain compare bugs 2022-03-05 04:03:27 -05:00
rocky
d366248b47 Some small variable-name changes 2022-03-04 04:47:38 -05:00
rocky
6f112ec5b2 Ensure no parens on subscript slice 2022-03-03 21:05:47 -05:00
rocky
219cb0606a MAKE_FUNCTION_8 -> MAKE_FUNCTION_CLOSURE
Clarity is important.
2022-02-27 10:29:53 -05:00
rocky
ce5207333f Remove TABLE_R0 - it hasn't been used in a while 2022-02-27 10:18:57 -05:00
rocky
f2a70a2758 Sync with decompyle3 for async "for"
More work is needed though
2022-01-18 15:25:51 -05:00
rocky
5b5fa310d9 Partial 3.8 async "for" fixes 2022-01-18 13:08:17 -05:00
rocky
88c0c03ee4 setcomprehension_walk3 -> closure_walk 2022-01-14 07:50:39 -05:00
rocky
a381b4663b Adapt for recent options changes in
-T option structure changed.
2022-01-09 16:01:32 -05:00
lostBeta
415cba6978 Fix version check comparison 2022-01-09 18:52:48 +02:00
rocky
15761acd0d Revise options processing. Sync with decompyle3
We should now handle passing assembly options or functions and
subroutines more properly.

The "%P" and "%p" specifiers now allow lists of nonterminals like "%c"
and "%C" do.

version was bumped because top-level main parameter args change slightly.
2022-01-09 04:11:09 -05:00
rocky
deea74b6a8 ret_expr -> return_expr
This matches Python's AST a little more closely
2022-01-03 21:56:07 -05:00
rocky
3d5b6f4654 return_lambda -> return_expr_lambda
Except those places in 2.6ish code where it is simple a fancy RETURN_VALUE
2022-01-01 21:45:51 -05:00
rocky
203139eafa Add tests, comment what's up with change..
and use isinstance()
2021-12-31 11:27:15 -05:00
dkw72n
d9de4ea245 Fix #377 2021-12-31 16:11:27 +08:00
rocky
165115289a dict_unmap -> dict_unpack matches Python AST better 2021-12-26 19:03:58 -05:00
rocky
3234673422 mklambda -> lambda_body matches Python AST better
Note: we can't use "lambda" since that is a reserved word
2021-12-26 18:48:51 -05:00
rocky
23551ea70f unmap_dict -> dict_doublestar ...
This matches Python's AST (Dict) better. Variations or specializations
of an AST name, e.g. "unmap" should come at the end, not the beginning.
2021-12-23 22:57:15 -05:00
rocky
30aad42aae Sync with other versions 2021-12-23 16:46:25 -05:00
rocky
a3bc9bb32b Add operator precedence to -T output 2021-12-23 16:11:25 -05:00
rocky
b3aaff0201 Sync pysource with decompyle3 2021-12-18 03:03:50 -05:00
rocky
da2314f5ae Part of the decompye3 loop "continue" fixes 2021-12-17 16:13:09 -05:00
rocky
16c900ff1d Propagate show_asm debug option down to functions 2021-12-17 06:07:18 -05:00
rocky
2c4acecc9d Start PyPy 3.8 support 2021-11-23 16:45:01 -05:00
rocky
223b9e1d88 Extent METHOD_CALL_KW to PyPy 3.8 2021-11-23 07:23:23 -05:00
rocky
211c74c240 Better 3.7 CALL_METHOD_KW handling
- Handles positional args now
2021-11-23 05:06:48 -05:00
rocky
3a63847d22 Tweak last commit 2021-11-22 09:27:16 -05:00
rocky
2ed211e0d4 Some PyPY 3.7 support
* Handle CALL_METHOD_KW
* adjust PyPY 3.7 assert stmts
* misc administrivia
2021-11-21 14:04:34 -05:00
rocky
d752f63d12 PyPy 3.7 scanner bug 2021-11-21 00:06:45 -05:00
rocky
69387c4173 Tidy scanner more 2021-11-03 05:03:53 -04:00
rocky
22baad273f Sync with decompyle start using types more. 2021-11-03 04:58:41 -04:00
rocky
8094f3bb12 Remove PYTHON3 2021-11-03 03:00:43 -04:00
rocky
f6f0e344d0 Python 3.6+ specialization 2021-11-03 02:23:19 -04:00
rocky
ed34bf9d4a use xdis.PYTHON3 not uncompyle.PYTHON3 2021-11-02 06:53:11 -04:00
rocky
7fd1cea877 Start PyPY 3.7 and 3.8 decompilation support 2021-11-02 06:05:09 -04:00
rocky
4911d85237 Get ready for release 3.8.0 2021-10-29 22:17:17 -04:00
rocky
32c4b84458 Better handling of bytecode errors 2021-10-28 18:37:54 -04:00
rocky
d0ca7b0363 Loosen check to allow running from 2.4-3.10
We still only can *decompile* 2.4-3.8
2021-10-26 06:21:51 -04:00
rocky
ea26084e6d Modernize and sync with decompyle3 better 2021-10-25 09:13:47 -04:00
rocky
fa203af665 Better messages when xdis not handling Python x.y 2021-10-24 23:22:41 -04:00
rocky
51ac72ba1f Sync with decompile3 2021-10-24 01:52:23 -04:00