Hello community, here is the log from the commit of package python-xdis for openSUSE:Leap:15.2 checked in at 2020-03-27 16:44:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-xdis (Old) and /work/SRC/openSUSE:Leap:15.2/.python-xdis.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-xdis" Fri Mar 27 16:44:08 2020 rev:4 rq:788289 version:4.2.3 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-xdis/python-xdis.changes 2020-03-10 17:13:06.545410676 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-xdis.new.3160/python-xdis.changes 2020-03-27 16:46:22.967871941 +0100 @@ -1,0 +2,11 @@ +Tue Mar 24 15:22:55 UTC 2020 - [email protected] + +- version update to 4.2.3 + * Add Python versions: 3.7.7, 3.8.2, and 3.9.0alpha1, + * Create a class for "STORE" instructions + * facilitate code type freezing (PR #57) + * Warn about cross-decompilation problems for byte types +- deleted patches + - py382.patch (upstreamed) + +------------------------------------------------------------------- Old: ---- 4.2.2.tar.gz py382.patch New: ---- 4.2.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-xdis.spec ++++++ --- /var/tmp/diff_new_pack.Oy2hLK/_old 2020-03-27 16:46:23.359872171 +0100 +++ /var/tmp/diff_new_pack.Oy2hLK/_new 2020-03-27 16:46:23.367872176 +0100 @@ -18,16 +18,16 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-xdis -Version: 4.2.2 +Version: 4.2.3 Release: 0 Summary: Python cross-version byte-code disassembler and marshal routines License: GPL-2.0-only -Patch0: py382.patch URL: https://github.com/rocky/python-xdis/ Source: https://github.com/rocky/python-xdis/archive/%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-setuptools BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module pytest} @@ -40,7 +40,6 @@ %prep %setup -q -%patch0 -p1 # test fails for weird order reasons rm pytest/test_disasm.py ++++++ 4.2.2.tar.gz -> 4.2.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/NEWS.md new/python-xdis-4.2.3/NEWS.md --- old/python-xdis-4.2.2/NEWS.md 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/NEWS.md 2020-03-16 19:28:04.000000000 +0100 @@ -1,3 +1,11 @@ +4.2.3 2020-03-16 post ides-of-march +=================================== + +* Add Python versions: 3.7.7, 3.8.2, and 3.9.0alpha1, +* Create a class for "STORE" instructions +* facilitate code type freezing (PR #57) +* Warn about cross-decompilation problems for byte types + 4.2.2 2019-12-24 christmas + hannukah ===================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/__pkginfo__.py new/python-xdis-4.2.3/__pkginfo__.py --- old/python-xdis-4.2.2/__pkginfo__.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/__pkginfo__.py 2020-03-16 19:28:04.000000000 +0100 @@ -9,7 +9,7 @@ # Things that change more often go here. copyright = """ -Copyright (C) 2015-2019 Rocky Bernstein <[email protected]>. +Copyright (C) 2015-2020 Rocky Bernstein <[email protected]>. """ classifiers = [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/admin-tools/README.md new/python-xdis-4.2.3/admin-tools/README.md --- old/python-xdis-4.2.2/admin-tools/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/python-xdis-4.2.3/admin-tools/README.md 2020-03-16 19:28:04.000000000 +0100 @@ -0,0 +1,12 @@ +This directory contains administrative tools for testing and making packages. + +Since this project uses python over a wide variety of release, some versions +of projects that should be used for specific Python versions + +for 3.2.6: + pytest==2.9.2 + +for 3.1.5 + pytset==2.1.0 + py=1.8.0 and comment out line 10 of _builtin.py # callable = callable + six==1.10.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/admin-tools/how-to-make-a-release.md new/python-xdis-4.2.3/admin-tools/how-to-make-a-release.md --- old/python-xdis-4.2.2/admin-tools/how-to-make-a-release.md 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/admin-tools/how-to-make-a-release.md 2020-03-16 19:28:04.000000000 +0100 @@ -63,7 +63,7 @@ # Make packages and tag $ . ./admin-tools/make-dist-older.sh - $ pyenv local 3.8.0 + $ pyenv local 3.8.2 $ twine check dist/xdis-$VERSION* $ git tag release-python-2.4-$VERSION $ . ./admin-tools/make-dist-newer.sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/admin-tools/pyenv-newer-versions new/python-xdis-4.2.3/admin-tools/pyenv-newer-versions --- old/python-xdis-4.2.2/admin-tools/pyenv-newer-versions 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/admin-tools/pyenv-newer-versions 2020-03-16 19:28:04.000000000 +0100 @@ -5,4 +5,4 @@ echo "This script should be *sourced* rather than run directly through bash" exit 1 fi -export PYVERSIONS='3.5.9 3.6.9 2.6.9 3.3.7 2.7.17 3.2.6 3.1.5 3.4.10 3.7.6 3.8.1' +export PYVERSIONS='3.5.9 3.6.10 2.6.9 3.3.7 2.7.17 3.2.6 3.1.5 3.4.10 3.7.7 3.8.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/admin-tools/setup-master.sh new/python-xdis-4.2.3/admin-tools/setup-master.sh --- old/python-xdis-4.2.2/admin-tools/setup-master.sh 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/admin-tools/setup-master.sh 2020-03-16 19:28:04.000000000 +0100 @@ -1,5 +1,5 @@ #!/bin/bash -PYTHON_VERSION=3.7.5 +PYTHON_VERSION=3.7.6 if [[ $0 == $${BASH_SOURCE[0]} ]] ; then echo "This script should be *sourced* rather than run directly through bash" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/code.py new/python-xdis-4.2.3/xdis/code.py --- old/python-xdis-4.2.2/xdis/code.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/code.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2017-2019 by Rocky Bernstein +# (C) Copyright 2017-2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -from xdis import PYTHON3 +from xdis import PYTHON3, PYTHON_VERSION import inspect, types diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/magics.py new/python-xdis-4.2.3/xdis/magics.py --- old/python-xdis-4.2.2/xdis/magics.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/magics.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2018-2019 by Rocky Bernstein +# (C) Copyright 2018-2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -342,9 +342,9 @@ add_canonic_versions("3.6.9pypy", "3.6pypy") add_canonic_versions("2.7.8Pyston", "2.7.7Pyston") add_canonic_versions("3.7.0alpha3", "3.7.0alpha3") -add_canonic_versions("3.7 3.7.0beta5 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6", "3.7.0") +add_canonic_versions("3.7 3.7.0beta5 3.7.1 3.7.2 3.7.3 3.7.4 3.7.5 3.7.6 3.7.7", "3.7.0") add_canonic_versions("3.8.0alpha0 3.8.0alpha3 3.8.0a0", "3.8.0a3+") -add_canonic_versions("3.8.0 3.8.1 3.8 3.8.0candidate1", "3.8.0rc1+") +add_canonic_versions("3.8.0 3.8.1 3.8.2 3.8 3.8.0candidate1", "3.8.0rc1+") add_canonic_versions("3.9 3.9.0 3.9.0a1+ 3.9.0a2+ 3.9.0alpha1 3.9.0alpha2", "3.9.0alpha1") # The canonic version for a canonic version is itself diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/opcodes/base.py new/python-xdis-4.2.3/xdis/opcodes/base.py --- old/python-xdis-4.2.2/xdis/opcodes/base.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/opcodes/base.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2017, 2019 by Rocky Bernstein +# (C) Copyright 2017, 2019-2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -36,7 +36,7 @@ fields2copy = """ hascompare hascondition hasconst hasfree hasjabs hasjrel haslocal -hasname hasnargs hasvargs oppop oppush +hasname hasnargs hasstore hasvargs oppop oppush nofollow """.split() @@ -155,6 +155,18 @@ assert l['opmap'][name] == op del l['opmap'][name] +def store_op(l, name, op, pop=0, push=1, is_type="def"): + if is_type == "name": + name_op(l, name, op, pop, push) + elif is_type == "local": + local_op(l, name, op, pop, push) + elif is_type == "free": + free_op(l, name, op, pop, push) + else: + assert is_type == "def" + def_op(l, name, op, pop, push) + l['hasstore'].append(op) + # This is not in Python. The operand indicates how # items on the pop from the stack. BUILD_TUPLE_UNPACK # is line this. @@ -231,6 +243,7 @@ l['NAME_OPS'] = frozenset(l['hasname']) l['NARGS_OPS'] = frozenset(l['hasnargs']) l['VARGS_OPS'] = frozenset(l['hasvargs']) + l['STORE_OPS'] = frozenset(l['hasstore']) def format_extended_arg(arg): return str(arg * (1 << 16)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/opcodes/opcode_15.py new/python-xdis-4.2.3/xdis/opcodes/opcode_15.py --- old/python-xdis-4.2.2/xdis/opcodes/opcode_15.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/opcodes/opcode_15.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2017, 2019 by Rocky Bernstein +# (C) Copyright 2017, 2019-2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -33,6 +33,7 @@ local_op, name_op, nargs_op, + store_op, # Although these aren't used here, they are exported varargs_op, update_pj2, @@ -72,15 +73,16 @@ hascompare = [] hascondition = [] # conditional operator; has jump offset -hasconst = [] -hasfree = [] -hasjabs = [] -hasjrel = [] -haslocal = [] -hasname = [] -hasnargs = [] # For function-like calls -hasvargs = [] # Similar but for operators BUILD_xxx -nofollow = [] # Instruction doesn't fall to the next opcode +hasconst = [] +hasfree = [] +hasjabs = [] +hasjrel = [] +haslocal = [] +hasname = [] +hasnargs = [] # For function-like calls +hasstore = [] # Some sort of store operation +hasvargs = [] # Similar but for operators BUILD_xxx +nofollow = [] # Instruction doesn't fall to the next opcode # oppush[op] => number of stack entries pushed # -9 means handle special. Note his forces oppush[i] - oppop[i] negative @@ -126,17 +128,17 @@ def_op(l, "SLICE+2", 32, 2, 1) def_op(l, "SLICE+3", 33, 3, 1) -def_op(l, "STORE_SLICE+0", 40, 2, 0) -def_op(l, "STORE_SLICE+1", 41, 3, 0) -def_op(l, "STORE_SLICE+2", 42, 3, 0) -def_op(l, "STORE_SLICE+3", 43, 4, 0) +store_op(l, "STORE_SLICE+0", 40, 2, 0) +store_op(l, "STORE_SLICE+1", 41, 3, 0) +store_op(l, "STORE_SLICE+2", 42, 3, 0) +store_op(l, "STORE_SLICE+3", 43, 4, 0) def_op(l, "DELETE_SLICE+0", 50, 1, 0) def_op(l, "DELETE_SLICE+1", 51, 2, 0) def_op(l, "DELETE_SLICE+2", 52, 2, 0) def_op(l, "DELETE_SLICE+3", 53, 3, 0) -def_op(l, "STORE_SUBSCR", 60, 3, 0) # Implements TOS1[TOS] = TOS2. +store_op(l, "STORE_SUBSCR", 60, 3, 0) # Implements TOS1[TOS] = TOS2. def_op(l, "DELETE_SUBSCR", 61, 2, 0) # Implements del TOS1[TOS]. def_op(l, "BINARY_LSHIFT", 62, 2, 1) @@ -162,13 +164,13 @@ # HAVE_ARGUMENT = 90 # Opcodes from here have an argument: -name_op(l, "STORE_NAME", 90, 1, 0) # Operand is in name list +store_op(l, "STORE_NAME", 90, 1, 0, is_type="name") # Operand is in name list name_op(l, "DELETE_NAME", 91, 0, 0) # "" varargs_op(l, "UNPACK_TUPLE", 92) # Number of tuple items def_op(l, "UNPACK_LIST", 93) # Number of list items -name_op(l, "STORE_ATTR", 95, 2, 0) # Operand is in name list +store_op(l, "STORE_ATTR", 95, 2, 0, is_type="name") # Operand is in name list name_op(l, "DELETE_ATTR", 96, 1, 0) # "" -name_op(l, "STORE_GLOBAL", 97, 1, 0) # "" +store_op(l, "STORE_GLOBAL", 97, 1, 0, is_type="name") # "" name_op(l, "DELETE_GLOBAL", 98, 0, 0) # "" const_op(l, "LOAD_CONST", 100, 0, 1) # Operand is in const list @@ -195,7 +197,7 @@ jrel_op(l, "SETUP_FINALLY", 122, 0, 0) # "" local_op(l, "LOAD_FAST", 124, 0, 1) # Local variable number -local_op(l, "STORE_FAST", 125, 1, 0) # Local variable number +store_op(l, "STORE_FAST", 125, 1, 0, is_type="local") # Local variable number local_op(l, "DELETE_FAST", 126) # Local variable number def_op(l, "SET_LINENO", 127) # Current line number diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/opcodes/opcode_26.py new/python-xdis-4.2.3/xdis/opcodes/opcode_26.py --- old/python-xdis-4.2.2/xdis/opcodes/opcode_26.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/opcodes/opcode_26.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2017 by Rocky Bernstein +# (C) Copyright 2017, 2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -21,8 +21,12 @@ """ from xdis.opcodes.base import ( - def_op, finalize_opcodes, format_extended_arg, - init_opdata, update_pj2) + store_op, + finalize_opcodes, + format_extended_arg, + init_opdata, + update_pj2, +) import xdis.opcodes.opcode_25 as opcode_25 version = 2.6 @@ -31,13 +35,13 @@ init_opdata(l, opcode_25, version) # Below are opcode changes since Python 2.5 -def_op(l, 'STORE_MAP', 54, 3, 1) +store_op(l, "STORE_MAP", 54, 3, 1) # FIXME remove (fix uncompyle6) update_pj2(globals(), l) opcode_arg_fmt = { - 'EXTENDED_ARG': format_extended_arg, + "EXTENDED_ARG": format_extended_arg, } finalize_opcodes(l) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/opcodes/opcode_2x.py new/python-xdis-4.2.3/xdis/opcodes/opcode_2x.py --- old/python-xdis-4.2.2/xdis/opcodes/opcode_2x.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/opcodes/opcode_2x.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2018 by Rocky Bernstein +# (C) Copyright 2018, 2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -25,7 +25,7 @@ from xdis.opcodes.base import ( compare_op, const_op, def_op, free_op, jabs_op, jrel_op, - local_op, name_op, nargs_op, + local_op, name_op, nargs_op, store_op, varargs_op ) @@ -42,6 +42,7 @@ haslocal = [] hasname = [] hasnargs = [] # For function-like calls +hasstore = [] # Some sort of store operation hasvargs = [] # Similar but for operators BUILD_xxx nofollow = [] # Instruction doesn't fall to the next opcode @@ -66,143 +67,143 @@ # OP NAME OPCODE POP PUSH #-------------------------------------------- -def_op(l, 'STOP_CODE', 0, 0, 0, fallthrough=False) -def_op(l, 'POP_TOP', 1, 1, 0) -def_op(l, 'ROT_TWO', 2, 2, 2) -def_op(l, 'ROT_THREE', 3, 3, 3) -def_op(l, 'DUP_TOP', 4, 0, 1) -def_op(l, 'ROT_FOUR', 5, 4, 4) - -def_op(l, 'UNARY_POSITIVE', 10, 1, 1) -def_op(l, 'UNARY_NEGATIVE', 11, 1, 1) -def_op(l, 'UNARY_NOT', 12, 1, 1) -def_op(l, 'UNARY_CONVERT', 13, 1, 1) - -def_op(l, 'UNARY_INVERT', 15, 1, 1) - -def_op(l, 'BINARY_POWER', 19, 2, 1) - -def_op(l, 'BINARY_MULTIPLY', 20, 2, 1) -def_op(l, 'BINARY_DIVIDE', 21, 2, 1) -def_op(l, 'BINARY_MODULO', 22, 2, 1) -def_op(l, 'BINARY_ADD', 23, 2, 1) -def_op(l, 'BINARY_SUBTRACT', 24, 2, 1) -def_op(l, 'BINARY_SUBSCR', 25, 2, 1) -def_op(l, 'BINARY_FLOOR_DIVIDE', 26, 2, 1) -def_op(l, 'BINARY_TRUE_DIVIDE', 27, 2, 1) -def_op(l, 'INPLACE_FLOOR_DIVIDE', 28, 2, 1) -def_op(l, 'INPLACE_TRUE_DIVIDE', 29, 2, 1) - -def_op(l, 'SLICE+0', 30, 1, 1) -def_op(l, 'SLICE+1', 31, 2, 1) -def_op(l, 'SLICE+2', 32, 2, 1) -def_op(l, 'SLICE+3', 33, 3, 1) - -def_op(l, 'STORE_SLICE+0', 40, 2, 0) -def_op(l, 'STORE_SLICE+1', 41, 3, 0) -def_op(l, 'STORE_SLICE+2', 42, 3, 0) -def_op(l, 'STORE_SLICE+3', 43, 4, 0) - -def_op(l, 'DELETE_SLICE+0', 50, 1, 0) -def_op(l, 'DELETE_SLICE+1', 51, 2, 0) -def_op(l, 'DELETE_SLICE+2', 52, 2, 0) -def_op(l, 'DELETE_SLICE+3', 53, 3, 0) - -def_op(l, 'INPLACE_ADD', 55, 2, 1) -def_op(l, 'INPLACE_SUBTRACT', 56, 2, 1) -def_op(l, 'INPLACE_MULTIPLY', 57, 2, 1) -def_op(l, 'INPLACE_DIVIDE', 58, 2, 1) -def_op(l, 'INPLACE_MODULO', 59, 2, 1) -def_op(l, 'STORE_SUBSCR', 60, 3, 0) # Implements TOS1[TOS] = TOS2. -def_op(l, 'DELETE_SUBSCR', 61, 2, 0) # Implements del TOS1[TOS]. - -def_op(l, 'BINARY_LSHIFT', 62, 2, 1) -def_op(l, 'BINARY_RSHIFT', 63, 2, 1) -def_op(l, 'BINARY_AND', 64, 2, 1) -def_op(l, 'BINARY_XOR', 65, 2, 1) -def_op(l, 'BINARY_OR', 66, 2, 1) -def_op(l, 'INPLACE_POWER', 67, 2, 1) -def_op(l, 'GET_ITER', 68, 1, 1) - -def_op(l, 'PRINT_EXPR', 70, 1, 0) -def_op(l, 'PRINT_ITEM', 71, 1, 0) -def_op(l, 'PRINT_NEWLINE', 72, 1, 0) -def_op(l, 'PRINT_ITEM_TO', 73, 1, 0) -def_op(l, 'PRINT_NEWLINE_TO', 74, 1, 0) -def_op(l, 'INPLACE_LSHIFT', 75, 2, 1) -def_op(l, 'INPLACE_RSHIFT', 76, 2, 1) -def_op(l, 'INPLACE_AND', 77, 2, 1) -def_op(l, 'INPLACE_XOR', 78, 2, 1) -def_op(l, 'INPLACE_OR', 79, 2, 1) -def_op(l, 'BREAK_LOOP', 80, 0, 0) - -def_op(l, 'LOAD_LOCALS', 82, 0, 1) -def_op(l, 'RETURN_VALUE', 83, 1, 0, fallthrough=False) -def_op(l, 'IMPORT_STAR', 84, 1, 0) -def_op(l, 'EXEC_STMT', 85, 3, 0) -def_op(l, 'YIELD_VALUE', 86, 1, 1) - -def_op(l, 'POP_BLOCK', 87, 0, 0) -def_op(l, 'END_FINALLY', 88, 1, 0) -def_op(l, 'BUILD_CLASS', 89, 3, 0) +def_op(l, "STOP_CODE", 0, 0, 0, fallthrough=False) +def_op(l, "POP_TOP", 1, 1, 0) +def_op(l, "ROT_TWO", 2, 2, 2) +def_op(l, "ROT_THREE", 3, 3, 3) +def_op(l, "DUP_TOP", 4, 0, 1) +def_op(l, "ROT_FOUR", 5, 4, 4) + +def_op(l, "UNARY_POSITIVE", 10, 1, 1) +def_op(l, "UNARY_NEGATIVE", 11, 1, 1) +def_op(l, "UNARY_NOT", 12, 1, 1) +def_op(l, "UNARY_CONVERT", 13, 1, 1) + +def_op(l, "UNARY_INVERT", 15, 1, 1) + +def_op(l, "BINARY_POWER", 19, 2, 1) + +def_op(l, "BINARY_MULTIPLY", 20, 2, 1) +def_op(l, "BINARY_DIVIDE", 21, 2, 1) +def_op(l, "BINARY_MODULO", 22, 2, 1) +def_op(l, "BINARY_ADD", 23, 2, 1) +def_op(l, "BINARY_SUBTRACT", 24, 2, 1) +def_op(l, "BINARY_SUBSCR", 25, 2, 1) +def_op(l, "BINARY_FLOOR_DIVIDE", 26, 2, 1) +def_op(l, "BINARY_TRUE_DIVIDE", 27, 2, 1) +def_op(l, "INPLACE_FLOOR_DIVIDE", 28, 2, 1) +def_op(l, "INPLACE_TRUE_DIVIDE", 29, 2, 1) + +def_op(l, "SLICE+0", 30, 1, 1) +def_op(l, "SLICE+1", 31, 2, 1) +def_op(l, "SLICE+2", 32, 2, 1) +def_op(l, "SLICE+3", 33, 3, 1) + +store_op(l, "STORE_SLICE+0", 40, 2, 0) +store_op(l, "STORE_SLICE+1", 41, 3, 0) +store_op(l, "STORE_SLICE+2", 42, 3, 0) +store_op(l, "STORE_SLICE+3", 43, 4, 0) + +def_op(l, "DELETE_SLICE+0", 50, 1, 0) +def_op(l, "DELETE_SLICE+1", 51, 2, 0) +def_op(l, "DELETE_SLICE+2", 52, 2, 0) +def_op(l, "DELETE_SLICE+3", 53, 3, 0) + +def_op(l, "INPLACE_ADD", 55, 2, 1) +def_op(l, "INPLACE_SUBTRACT", 56, 2, 1) +def_op(l, "INPLACE_MULTIPLY", 57, 2, 1) +def_op(l, "INPLACE_DIVIDE", 58, 2, 1) +def_op(l, "INPLACE_MODULO", 59, 2, 1) +store_op(l, "STORE_SUBSCR", 60, 3, 0) # Implements TOS1[TOS] = TOS2. +def_op(l, "DELETE_SUBSCR", 61, 2, 0) # Implements del TOS1[TOS]. + +def_op(l, "BINARY_LSHIFT", 62, 2, 1) +def_op(l, "BINARY_RSHIFT", 63, 2, 1) +def_op(l, "BINARY_AND", 64, 2, 1) +def_op(l, "BINARY_XOR", 65, 2, 1) +def_op(l, "BINARY_OR", 66, 2, 1) +def_op(l, "INPLACE_POWER", 67, 2, 1) +def_op(l, "GET_ITER", 68, 1, 1) + +def_op(l, "PRINT_EXPR", 70, 1, 0) +def_op(l, "PRINT_ITEM", 71, 1, 0) +def_op(l, "PRINT_NEWLINE", 72, 1, 0) +def_op(l, "PRINT_ITEM_TO", 73, 1, 0) +def_op(l, "PRINT_NEWLINE_TO", 74, 1, 0) +def_op(l, "INPLACE_LSHIFT", 75, 2, 1) +def_op(l, "INPLACE_RSHIFT", 76, 2, 1) +def_op(l, "INPLACE_AND", 77, 2, 1) +def_op(l, "INPLACE_XOR", 78, 2, 1) +def_op(l, "INPLACE_OR", 79, 2, 1) +def_op(l, "BREAK_LOOP", 80, 0, 0) + +def_op(l, "LOAD_LOCALS", 82, 0, 1) +def_op(l, "RETURN_VALUE", 83, 1, 0, fallthrough=False) +def_op(l, "IMPORT_STAR", 84, 1, 0) +def_op(l, "EXEC_STMT", 85, 3, 0) +def_op(l, "YIELD_VALUE", 86, 1, 1) + +def_op(l, "POP_BLOCK", 87, 0, 0) +def_op(l, "END_FINALLY", 88, 1, 0) +def_op(l, "BUILD_CLASS", 89, 3, 0) HAVE_ARGUMENT = 90 # Opcodes from here have an argument: -name_op(l, 'STORE_NAME', 90, 1, 0) # Operand is in name list -name_op(l, 'DELETE_NAME', 91, 0, 0) # "" -varargs_op(l, 'UNPACK_SEQUENCE', 92, 9, 1) # TOS is number of tuple items -jrel_op(l, 'FOR_ITER', 93, 9, 1) # TOS is read - -name_op(l, 'STORE_ATTR', 95, 2, 0) # Operand is in name list -name_op(l, 'DELETE_ATTR', 96, 1, 0) # "" -name_op(l, 'STORE_GLOBAL', 97, 1, 0) # "" -name_op(l, 'DELETE_GLOBAL', 98, 0, 0) # "" -def_op(l, 'DUP_TOPX', 99, 1, -1) # number of items to duplicate -const_op(l, 'LOAD_CONST', 100, 0, 1) # Operand is in const list -name_op(l, 'LOAD_NAME', 101, 0, 1) # Operand is in name list -varargs_op(l, 'BUILD_TUPLE', 102, 9, 1) # TOS is number of tuple items -varargs_op(l, 'BUILD_LIST', 103, 9, 1) # TOS is number of list items -varargs_op(l, 'BUILD_MAP', 104, 0, 1) # TOS is number of kwark items. Always zero for now -name_op(l, 'LOAD_ATTR', 105, 1, 1) # Operand is in name list -compare_op(l, 'COMPARE_OP', 106, 2, 1) # Comparison operator +store_op(l, "STORE_NAME", 90, 1, 0, is_type="name") # Operand is in name list +name_op(l, "DELETE_NAME", 91, 0, 0) # "" +varargs_op(l, "UNPACK_SEQUENCE", 92, 9, 1) # TOS is number of tuple items +jrel_op(l, "FOR_ITER", 93, 9, 1) # TOS is read + +store_op(l, "STORE_ATTR", 95, 2, 0, is_type="name") # Operand is in name list +name_op(l, "DELETE_ATTR", 96, 1, 0) # "" +store_op(l, "STORE_GLOBAL", 97, 1, 0, is_type="name") # "" +name_op(l, "DELETE_GLOBAL", 98, 0, 0) # "" +def_op(l, "DUP_TOPX", 99, 1, -1) # number of items to duplicate +const_op(l, "LOAD_CONST", 100, 0, 1) # Operand is in const list +name_op(l, "LOAD_NAME", 101, 0, 1) # Operand is in name list +varargs_op(l, "BUILD_TUPLE", 102, 9, 1) # TOS is number of tuple items +varargs_op(l, "BUILD_LIST", 103, 9, 1) # TOS is number of list items +varargs_op(l, "BUILD_MAP", 104, 0, 1) # TOS is number of kwark items. Always zero for now +name_op(l, "LOAD_ATTR", 105, 1, 1) # Operand is in name list +compare_op(l, "COMPARE_OP", 106, 2, 1) # Comparison operator -name_op(l, 'IMPORT_NAME', 107, 2, 1) # Operand is in name list -name_op(l, 'IMPORT_FROM', 108, 0, 1) # Operand is in name list +name_op(l, "IMPORT_NAME", 107, 2, 1) # Operand is in name list +name_op(l, "IMPORT_FROM", 108, 0, 1) # Operand is in name list -jrel_op(l, 'JUMP_FORWARD', 110, 0, 0, fallthrough=False) +jrel_op(l, "JUMP_FORWARD", 110, 0, 0, fallthrough=False) # Number of bytes to skip -jrel_op(l, 'JUMP_IF_FALSE', 111, 1, 1, True) # "" +jrel_op(l, "JUMP_IF_FALSE", 111, 1, 1, True) # "" -jrel_op(l, 'JUMP_IF_TRUE', 112, 1, 1, True) # "" -jabs_op(l, 'JUMP_ABSOLUTE', 113, 0, 0, fallthrough=False) +jrel_op(l, "JUMP_IF_TRUE", 112, 1, 1, True) # "" +jabs_op(l, "JUMP_ABSOLUTE", 113, 0, 0, fallthrough=False) # Target byte offset from beginning of code -name_op(l, 'LOAD_GLOBAL', 116, 0, 1) # Operand is in name list +name_op(l, "LOAD_GLOBAL", 116, 0, 1) # Operand is in name list -jabs_op(l, 'CONTINUE_LOOP', 119, 0, 0, fallthrough=False) # Target address -jrel_op(l, 'SETUP_LOOP', 120, 0, 0, conditional=True) # Distance to target address -jrel_op(l, 'SETUP_EXCEPT', 121, 0, 6, conditional=True) # "" -jrel_op(l, 'SETUP_FINALLY', 122, 0, 7, conditional=True) # "" - -local_op(l, 'LOAD_FAST', 124, 0, 1) # Local variable number -local_op(l, 'STORE_FAST', 125, 1, 0) # Local variable number -local_op(l, 'DELETE_FAST', 126) # Local variable number +jabs_op(l, "CONTINUE_LOOP", 119, 0, 0, fallthrough=False) # Target address +jrel_op(l, "SETUP_LOOP", 120, 0, 0, conditional=True) # Distance to target address +jrel_op(l, "SETUP_EXCEPT", 121, 0, 6, conditional=True) # "" +jrel_op(l, "SETUP_FINALLY", 122, 0, 7, conditional=True) # "" + +local_op(l, "LOAD_FAST", 124, 0, 1) # Local variable number +store_op(l, "STORE_FAST", 125, 1, 0, is_type="local") # Local variable number +local_op(l, "DELETE_FAST", 126) # Local variable number -def_op(l, 'RAISE_VARARGS', 130, -1, 0, fallthrough=False) +def_op(l, "RAISE_VARARGS", 130, -1, 0, fallthrough=False) # Number of raise arguments (1, 2, or 3) -nargs_op(l, 'CALL_FUNCTION', 131, 9, 1) # TOS is #args + (#kwargs << 8) +nargs_op(l, "CALL_FUNCTION", 131, 9, 1) # TOS is #args + (#kwargs << 8) -def_op(l, 'MAKE_FUNCTION', 132, 9, 1) # TOS is number of args with default values -varargs_op(l, 'BUILD_SLICE', 133, 9, 1) # TOS is number of items +def_op(l, "MAKE_FUNCTION", 132, 9, 1) # TOS is number of args with default values +varargs_op(l, "BUILD_SLICE", 133, 9, 1) # TOS is number of items -def_op(l, 'MAKE_CLOSURE', 134, 9, 1) -free_op(l, 'LOAD_CLOSURE', 135, 0, 1) -free_op(l, 'LOAD_DEREF', 136, 0, 1) -free_op(l, 'STORE_DEREF', 137, 1, 0) +def_op(l, "MAKE_CLOSURE", 134, 9, 1) +free_op(l, "LOAD_CLOSURE", 135, 0, 1) +free_op(l, "LOAD_DEREF", 136, 0, 1) +store_op(l, "STORE_DEREF", 137, 1, 0, is_type="free") -nargs_op(l, 'CALL_FUNCTION_VAR', 140, -1, 1) # #args + (#kwargs << 8) -nargs_op(l, 'CALL_FUNCTION_KW', 141, -1, 1) # #args + (#kwargs << 8) -nargs_op(l, 'CALL_FUNCTION_VAR_KW', 142, -1, 1) # #args + (#kwargs << 8) +nargs_op(l, "CALL_FUNCTION_VAR", 140, -1, 1) # #args + (#kwargs << 8) +nargs_op(l, "CALL_FUNCTION_KW", 141, -1, 1) # #args + (#kwargs << 8) +nargs_op(l, "CALL_FUNCTION_VAR_KW", 142, -1, 1) # #args + (#kwargs << 8) -def_op(l, 'EXTENDED_ARG', 143) +def_op(l, "EXTENDED_ARG", 143) EXTENDED_ARG = 143 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/opcodes/opcode_36.py new/python-xdis-4.2.3/xdis/opcodes/opcode_36.py --- old/python-xdis-4.2.2/xdis/opcodes/opcode_36.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/opcodes/opcode_36.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2016-2017, 2019 by Rocky Bernstein +# (C) Copyright 2016-2017, 2019-2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -23,7 +23,7 @@ from xdis.opcodes.base import( def_op, finalize_opcodes, init_opdata, jrel_op, name_op, - nargs_op, rm_op, varargs_op, + nargs_op, rm_op, store_op, varargs_op, update_pj3 ) @@ -88,7 +88,7 @@ # These are new since Python 3.6 -name_op(l, 'STORE_ANNOTATION', 127) # Index in name list +store_op(l, 'STORE_ANNOTATION', 127, is_type="name") # Index in name list jrel_op(l, 'SETUP_ASYNC_WITH', 154) def_op(l, 'FORMAT_VALUE', 155) varargs_op(l, 'BUILD_CONST_KEY_MAP', 156, -1, 1) # TOS is count of kwargs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/opcodes/opcode_3x.py new/python-xdis-4.2.3/xdis/opcodes/opcode_3x.py --- old/python-xdis-4.2.2/xdis/opcodes/opcode_3x.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/opcodes/opcode_3x.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2017-2018 by Rocky Bernstein +# (C) Copyright 2017-2018, 2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -27,7 +27,7 @@ compare_op, const_op, def_op, format_extended_arg, free_op, jabs_op, jrel_op, - local_op, name_op, nargs_op, + local_op, name_op, nargs_op, store_op, varargs_op ) @@ -44,6 +44,7 @@ haslocal = [] hasname = [] hasnargs = [] # For function-like calls +hasstore = [] # Some sort of store operation hasvargs = [] # Similar but for operators BUILD_xxx nofollow = [] # Instruction doesn't fall to the next opcode @@ -101,13 +102,13 @@ # STORE_SLICE+0 .. STORE_SLICE+3 # DELETE_SLICE+0 .. DELETE_SLICE+3 -def_op(l, 'STORE_MAP', 54, 3, 1) +store_op(l, 'STORE_MAP', 54, 3, 1) def_op(l, 'INPLACE_ADD', 55, 2, 1) def_op(l, 'INPLACE_SUBTRACT', 56, 2, 1) def_op(l, 'INPLACE_MULTIPLY', 57, 2, 1) def_op(l, 'INPLACE_MODULO', 59, 2, 1) -def_op(l, 'STORE_SUBSCR', 60, 3, 0) # Implements TOS1[TOS] = TOS2. +store_op(l, 'STORE_SUBSCR', 60, 3, 0) # Implements TOS1[TOS] = TOS2. def_op(l, 'DELETE_SUBSCR', 61, 2, 0) # Implements del TOS1[TOS]. def_op(l, 'BINARY_LSHIFT', 62, 2, 1) def_op(l, 'BINARY_RSHIFT', 63, 2, 1) @@ -116,7 +117,7 @@ def_op(l, 'BINARY_OR', 66, 2, 1) def_op(l, 'INPLACE_POWER', 67, 2, 1) def_op(l, 'GET_ITER', 68, 1, 1) -def_op(l, 'STORE_LOCALS', 69, 1, 0) +store_op(l, 'STORE_LOCALS', 69, 1, 0) def_op(l, 'PRINT_EXPR', 70, 1, 0) def_op(l, 'LOAD_BUILD_CLASS', 71, 0, 1) @@ -146,16 +147,16 @@ HAVE_ARGUMENT = 90 # Opcodes from here have an argument: -name_op(l, 'STORE_NAME', 90, 1, 0) # Operand is in name list +store_op(l, 'STORE_NAME', 90, 1, 0, is_type="name") # Operand is in name list name_op(l, 'DELETE_NAME', 91, 0, 0) # "" varargs_op(l, 'UNPACK_SEQUENCE', 92, 9, 1) # TOS is number of tuple items jrel_op(l, 'FOR_ITER', 93, 9, 1) def_op(l, 'UNPACK_EX', 94, 9, 1) # assignment with a starred target; TOS is #entries # argument has a count -name_op(l, 'STORE_ATTR', 95, 2, 0) # Operand is in name list +store_op(l, 'STORE_ATTR', 95, 2, 0, is_type="name") # Operand is in name list name_op(l, 'DELETE_ATTR', 96, 1, 0) # "" -name_op(l, 'STORE_GLOBAL', 97, 1, 0) # "" +store_op(l, 'STORE_GLOBAL', 97, 1, 0, is_type="name") # "" name_op(l, 'DELETE_GLOBAL', 98, 0, 0) # "" # Python 2's DUP_TOPX is gone starting in Python 3.2 @@ -186,7 +187,7 @@ jrel_op(l, 'SETUP_FINALLY', 122, 0, 6, conditional=True) # "" local_op(l, 'LOAD_FAST', 124, 0, 1) # Local variable number -local_op(l, 'STORE_FAST', 125, 1, 0) # Local variable number +store_op(l, 'STORE_FAST', 125, 1, 0, is_type="local") # Local variable number local_op(l, 'DELETE_FAST', 126, 0, 0) # Local variable number def_op(l, 'RAISE_VARARGS', 130, 9, 1, fallthrough=False) @@ -199,7 +200,7 @@ def_op(l, 'MAKE_CLOSURE', 134, 9, 1) # TOS is number of items to pop free_op(l, 'LOAD_CLOSURE', 135, 0, 1) free_op(l, 'LOAD_DEREF', 136, 0, 1) -free_op(l, 'STORE_DEREF', 137, 1, 0) +store_op(l, 'STORE_DEREF', 137, 1, 0, is_type="free") free_op(l, 'DELETE_DEREF', 138, 0, 0) nargs_op(l, 'CALL_FUNCTION_VAR', 140, 9, 1) # #args + (#kwargs << 8) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/unmarshal.py new/python-xdis-4.2.3/xdis/unmarshal.py --- old/python-xdis-4.2.2/xdis/unmarshal.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/unmarshal.py 2020-03-16 19:28:04.000000000 +0100 @@ -33,6 +33,8 @@ from xdis.code import Code2, Code3, Code38, Code2Compat from xdis import PYTHON3, PYTHON_VERSION, IS_PYPY +# FIXME: When working from Python3 bytecode in Python2, we need +# to distinguish types. internStrings = [] internObjects = [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/util.py new/python-xdis-4.2.3/xdis/util.py --- old/python-xdis-4.2.2/xdis/util.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/util.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,4 +1,4 @@ -# (C) Copyright 2018-2019 by Rocky Bernstein +# (C) Copyright 2018-2020 by Rocky Bernstein # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-xdis-4.2.2/xdis/version.py new/python-xdis-4.2.3/xdis/version.py --- old/python-xdis-4.2.2/xdis/version.py 2019-12-24 15:39:30.000000000 +0100 +++ new/python-xdis-4.2.3/xdis/version.py 2020-03-16 19:28:04.000000000 +0100 @@ -1,3 +1,3 @@ # This file is suitable for sourcing inside bash as # well as importing into Python -VERSION='4.2.2' +VERSION='4.2.3'
