pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-xdis



Module Name:    pkgsrc
Committed By:   adam
Date:           Thu Apr 16 18:32:33 UTC 2020

Modified Files:
        pkgsrc/devel/py-xdis: Makefile PLIST distinfo

Log Message:
py-xdis: updated to 4.3.1

4.3.1:
A portable version of types.CodeType was rewritten, to make it
easier to use
and catch more errors
more complete in tracking Python types.CodeType changes
simpler in implementation by using type inheretence
more general
Previously getting bytecode read from a bytecode file or from a code
object requiring knowing a lot about the Python version of the code
type and of the currently running interpreter. That is gone now.

Use codeType2Portable() to turn a native types.CodeType or a structure read
in from a bytecode file into a portable code type. The portable code
type allows fields to be mutated, and is more flexible in the kinds of
datatypes it allows.

For example lists of thing like co_consts, or varnames can be
Python lists as well as tuples. The line number table is stored as a
dictionary mapping of address to bytecode offset rather than as a
compressed structure. Bytecode can either be a string (which is
advantageous if you are running Python before 3.x) or a sequence of
bytes which is the datatype of a code object for 3.x.

However when you need a type.CodeType that can be can be
eval()'d by the Python interpreter you are running, use the
to_native() method on the portable code type returned. It will
compress and encode the line number table, and turn lists into tuples
and convert other datatypes to the right type as needed.

If you have a complete types.Codetype structure for a particular
Python version whether, it is the one the current Python interpreter
is using or not, use the to_portable() function and it will figure
out based on the version parameter supplied (or use the current Python
interpreter version if none supplieed), which particlar portable code
type is the right one.

If on the other hand, you have a number of code-type fields which may
be incomplete, but still want to work with something that has
code-type characteristics while not worring about which fields are
required an their exact proper datatypes, use the CodeTypeUnion structure.

Internally, we use OO inheritence to reduce the amount of duplicate
code. The load_code_internal() function from unmarshal.py is now a
lot shorter and cleaner as a result of this reorganization.

New Portable Code Methods, Modules and Classes

Python 3.8-ish replace() method has been added to the portable code types
Portable code type classes Code13, Code15 have been added to more precisely distinguish Python 1.3 and 1.5 code types. The other portable code classes are Code2, Code3, and Code38.
the to_native() conversts a portable code type into a native code type
the decode_lineno_tab() method on portable code types from Python 1.5 on decompresses the Python encode line number table into a dictionary mapping offset to line number.

Incompatibility

The module xdis.code has been remamed to xdis.codetype and with
that the function iscode() moved as well. In previous versions to
use iscode() you might import it from xdis.code; now simply import
it from xdis. In general function that had been imported from a
module under xdis can now be imported simply from xdis.

The classes Compat3Code and function code2compat() and
code3compat() have been removed. Compat2Code is still around for
dropbox 2.5, but that is deprecated and will be removed when I can
figure out how to remove it from dropbox 2.5.

Other Changes

CI testing for older testing has been fixed now that 2.7 is even more deprecated.

Note Deleted release 4.3.0 had a bug in handling some 3.8 bytecode.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 pkgsrc/devel/py-xdis/Makefile \
    pkgsrc/devel/py-xdis/distinfo
cvs rdiff -u -r1.10 -r1.11 pkgsrc/devel/py-xdis/PLIST

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-xdis/Makefile
diff -u pkgsrc/devel/py-xdis/Makefile:1.18 pkgsrc/devel/py-xdis/Makefile:1.19
--- pkgsrc/devel/py-xdis/Makefile:1.18  Tue Mar 31 16:26:13 2020
+++ pkgsrc/devel/py-xdis/Makefile       Thu Apr 16 18:32:32 2020
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.18 2020/03/31 16:26:13 adam Exp $
+# $NetBSD: Makefile,v 1.19 2020/04/16 18:32:32 adam Exp $
 
-DISTNAME=      xdis-4.2.4
+DISTNAME=      xdis-4.3.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=x/xdis/}
Index: pkgsrc/devel/py-xdis/distinfo
diff -u pkgsrc/devel/py-xdis/distinfo:1.18 pkgsrc/devel/py-xdis/distinfo:1.19
--- pkgsrc/devel/py-xdis/distinfo:1.18  Tue Mar 31 16:26:13 2020
+++ pkgsrc/devel/py-xdis/distinfo       Thu Apr 16 18:32:32 2020
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.18 2020/03/31 16:26:13 adam Exp $
+$NetBSD: distinfo,v 1.19 2020/04/16 18:32:32 adam Exp $
 
-SHA1 (xdis-4.2.4.tar.gz) = 538cda1e3dd0ee095caa3540325a24ff24915df7
-RMD160 (xdis-4.2.4.tar.gz) = 637d96825749f31ecf2f624c51e37308f2612ab7
-SHA512 (xdis-4.2.4.tar.gz) = b92fa618d22a2d80d36b77bb94754a0b65efea14a7a01ab077b8fb69911f701690ff4311eb1997f9d643917d864ac8c1ae2a01a1c52acc6d57ff293540be2427
-Size (xdis-4.2.4.tar.gz) = 206721 bytes
+SHA1 (xdis-4.3.1.tar.gz) = f1e3c3758d701cfc084593b38aee3ef4318fb2e0
+RMD160 (xdis-4.3.1.tar.gz) = 05425e7012d6b21820f816c3aa97a899b38f2fa2
+SHA512 (xdis-4.3.1.tar.gz) = b4016812126967b94b1622f8e4b1dede9fe6cc830fd4aaaacbddbb2c4b9a4841bf51a3ab677fde242bdc5fd77e183759bb20795bc771615f4073771b3f0d8ebf
+Size (xdis-4.3.1.tar.gz) = 219610 bytes

Index: pkgsrc/devel/py-xdis/PLIST
diff -u pkgsrc/devel/py-xdis/PLIST:1.10 pkgsrc/devel/py-xdis/PLIST:1.11
--- pkgsrc/devel/py-xdis/PLIST:1.10     Wed Dec 11 13:18:25 2019
+++ pkgsrc/devel/py-xdis/PLIST  Thu Apr 16 18:32:32 2020
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.10 2019/12/11 13:18:25 adam Exp $
+@comment $NetBSD: PLIST,v 1.11 2020/04/16 18:32:32 adam Exp $
 bin/pydisasm-${PYVERSSUFFIX}
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
@@ -18,9 +18,27 @@ ${PYSITELIB}/xdis/bin/pydisasm.pyo
 ${PYSITELIB}/xdis/bytecode.py
 ${PYSITELIB}/xdis/bytecode.pyc
 ${PYSITELIB}/xdis/bytecode.pyo
-${PYSITELIB}/xdis/code.py
-${PYSITELIB}/xdis/code.pyc
-${PYSITELIB}/xdis/code.pyo
+${PYSITELIB}/xdis/codetype/__init__.py
+${PYSITELIB}/xdis/codetype/__init__.pyc
+${PYSITELIB}/xdis/codetype/__init__.pyo
+${PYSITELIB}/xdis/codetype/base.py
+${PYSITELIB}/xdis/codetype/base.pyc
+${PYSITELIB}/xdis/codetype/base.pyo
+${PYSITELIB}/xdis/codetype/code13.py
+${PYSITELIB}/xdis/codetype/code13.pyc
+${PYSITELIB}/xdis/codetype/code13.pyo
+${PYSITELIB}/xdis/codetype/code15.py
+${PYSITELIB}/xdis/codetype/code15.pyc
+${PYSITELIB}/xdis/codetype/code15.pyo
+${PYSITELIB}/xdis/codetype/code20.py
+${PYSITELIB}/xdis/codetype/code20.pyc
+${PYSITELIB}/xdis/codetype/code20.pyo
+${PYSITELIB}/xdis/codetype/code30.py
+${PYSITELIB}/xdis/codetype/code30.pyc
+${PYSITELIB}/xdis/codetype/code30.pyo
+${PYSITELIB}/xdis/codetype/code38.py
+${PYSITELIB}/xdis/codetype/code38.pyc
+${PYSITELIB}/xdis/codetype/code38.pyo
 ${PYSITELIB}/xdis/dropbox/__init__.py
 ${PYSITELIB}/xdis/dropbox/__init__.pyc
 ${PYSITELIB}/xdis/dropbox/__init__.pyo
@@ -162,6 +180,9 @@ ${PYSITELIB}/xdis/verify.pyo
 ${PYSITELIB}/xdis/version.py
 ${PYSITELIB}/xdis/version.pyc
 ${PYSITELIB}/xdis/version.pyo
+${PYSITELIB}/xdis/version_info.py
+${PYSITELIB}/xdis/version_info.pyc
+${PYSITELIB}/xdis/version_info.pyo
 ${PYSITELIB}/xdis/wordcode.py
 ${PYSITELIB}/xdis/wordcode.pyc
 ${PYSITELIB}/xdis/wordcode.pyo



Home | Main Index | Thread Index | Old Index