From 245deb093107c9889bbc13f67547c21d94dc60cd Mon Sep 17 00:00:00 2001 From: rocky Date: Mon, 16 Apr 2018 12:40:08 -0400 Subject: [PATCH] Get ready for release 3.8.1 ... and more 3.7 grammar customization --- pytest/test_grammar.py | 12 +++++------- test/bytecode_3.7/01_while_if_then.pyc | Bin 0 -> 484 bytes .../02_build_map_unpack_with_call.pyc | Bin 0 -> 159 bytes test/bytecode_3.7/02_genexpr.pyc | Bin 0 -> 389 bytes uncompyle6/parsers/parse3.py | 5 +++++ uncompyle6/parsers/parse37.py | 1 + uncompyle6/version.py | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 test/bytecode_3.7/01_while_if_then.pyc create mode 100644 test/bytecode_3.7/02_build_map_unpack_with_call.pyc create mode 100644 test/bytecode_3.7/02_genexpr.pyc diff --git a/pytest/test_grammar.py b/pytest/test_grammar.py index e492218f..e43a1fb3 100644 --- a/pytest/test_grammar.py +++ b/pytest/test_grammar.py @@ -41,14 +41,12 @@ def test_grammar(): expect_lhs.add("annotate_arg") expect_lhs.add("annotate_tuple") unused_rhs.add("mkfunc_annotate") - unused_rhs.add('call') + if PYTHON_VERSION < 3.7: + unused_rhs.add('call') unused_rhs.add("dict_comp") unused_rhs.add("classdefdeco1") - if PYTHON_VERSION < 3.6: - # 3.6 has at least one non-custom call rule - # the others don't - unused_rhs.add('call') - if PYTHON_VERSION == 3.5: + if PYTHON_VERSION != 3.6: + if PYTHON_VERSION in (3.5, 3.7): expect_right_recursive.add((('l_stmts', ('lastl_stmt', 'come_froms', 'l_stmts')))) pass @@ -61,7 +59,7 @@ def test_grammar(): pass else: expect_lhs.add('kwarg') - unused_rhs.add('call') + # unused_rhs.add('call') assert expect_lhs == set(lhs) assert unused_rhs == set(rhs) diff --git a/test/bytecode_3.7/01_while_if_then.pyc b/test/bytecode_3.7/01_while_if_then.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4e69d6b30789382a470c4f9f5b826fe1504a00e7 GIT binary patch literal 484 zcmYjOy-ve05I#F@h)^p~)qy7fWoh}{5CS3AE(}OsqSSV2O4=lLsun5Tcp2V=XUNLb zS73p=L9hCSwamgZ2P2{qbRc16< zJzrdnPS2wCEWvCtjmnu>4)fQ#o7+qo=OU`;<5hQv04!iW6O5z#EZ}wzbBfUp8b$JE z-^SgSG)`EM&FNaTzyVwm?PeAWd9pmd5sxxc~v$;@r|Vjl;Hu YhWxurlC~ANUSxWenww?@ddr~u1E}U-n*aa+ literal 0 HcmV?d00001 diff --git a/test/bytecode_3.7/02_build_map_unpack_with_call.pyc b/test/bytecode_3.7/02_build_map_unpack_with_call.pyc new file mode 100644 index 0000000000000000000000000000000000000000..444e1dabebacbbbf71e66059ad5ac4fa072bbbca GIT binary patch literal 159 zcmZ?d<>g`k0@jxcqIiJxV-N=hSbz)%ATAaH5~&Pn45^H%Ow*bA7#SH-7=jrz8T~Yw zZ!xCbVobcnn6#3i2&5iN{4y!d%q_@CjW5nGElN(+Pby6}Hq|#Uicc!d%t?vQO)Q8n m%_~Su&Wp?NjlvhG&?eLM2vR52x^iugID#N7^%3#DWpg^{IHc*n32eFL2ed!s9t0+z16E z!|V+rQHyw3<08VkUEE%3YuRdZ;1. # This file is suitable for sourcing inside bash as # well as importing into Python -VERSION='3.1.2' +VERSION='3.1.3'