From 6f2cdc164d25ae998971ceee5bdef15146f23373 Mon Sep 17 00:00:00 2001 From: rocky Date: Tue, 30 Aug 2016 00:39:50 -0400 Subject: [PATCH] Handle Python 2 vs 3 raise syntax change raise_stmt ::= "raise" expression "," expression becomes: raise_stmt ::= "raise" expression from expression raise expr, expr -> raise --- NEWS | 7 +++++++ test/bytecode_2.6/03_raise_from.pyc | Bin 0 -> 257 bytes test/bytecode_3.4/03_raise_from.pyc | Bin 0 -> 253 bytes test/simple_source/bug26/03_raise_from.py | 9 +++++++++ test/simple_source/bug33/03_raise_from.py | 9 +++++++++ uncompyle6/semantics/pysource.py | 12 ++++++++++-- 6 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 test/bytecode_2.6/03_raise_from.pyc create mode 100644 test/bytecode_3.4/03_raise_from.pyc create mode 100644 test/simple_source/bug26/03_raise_from.py create mode 100644 test/simple_source/bug33/03_raise_from.py diff --git a/NEWS b/NEWS index 3f675882..2e5ff654 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +uncompyle6 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 - Add Python 2.2 decompilation diff --git a/test/bytecode_2.6/03_raise_from.pyc b/test/bytecode_2.6/03_raise_from.pyc new file mode 100644 index 0000000000000000000000000000000000000000..97dc8aebf6177f1bf89a7b053f1536b20c68b544 GIT binary patch literal 257 zcmYL>u}T9$5QhJ`i=qb+E3v#H#Z^WONhP9%txbeTnj^`MVMFfroZSVl)%Wmid;nj? zCvX-82j=^knScJT?_u#V{9J7CR|l%M+J36&3m9MtEZPwUOxP80=O9{UAkJY3?*z{9 zmZ8! JkW)dY^aCpoHckKl literal 0 HcmV?d00001 diff --git a/test/bytecode_3.4/03_raise_from.pyc b/test/bytecode_3.4/03_raise_from.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e56e114f402699b453d72655d9127173a52ed5d GIT binary patch literal 253 zcmYj~ze)o^5XQgR3!+C95wSiHgfuzfEJb3G)+WNmSR9EvhQ-_;XK%qvsV`#dgZL8L zTG{vjR&KO$_~yra4ByOGe>Z;ZzvssUeBfX0hj|p*jsv