pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/py-xdis py-xdis: updated to 4.3.1
details: https://anonhg.NetBSD.org/pkgsrc/rev/eddac3d805d0
branches: trunk
changeset: 427445:eddac3d805d0
user: adam <adam%pkgsrc.org@localhost>
date: Thu Apr 16 18:32:32 2020 +0000
description:
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.
diffstat:
devel/py-xdis/Makefile | 4 ++--
devel/py-xdis/PLIST | 29 +++++++++++++++++++++++++----
devel/py-xdis/distinfo | 10 +++++-----
3 files changed, 32 insertions(+), 11 deletions(-)
diffs (77 lines):
diff -r 1e51e76271a3 -r eddac3d805d0 devel/py-xdis/Makefile
--- a/devel/py-xdis/Makefile Thu Apr 16 18:30:05 2020 +0000
+++ b/devel/py-xdis/Makefile Thu Apr 16 18:32:32 2020 +0000
@@ -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/}
diff -r 1e51e76271a3 -r eddac3d805d0 devel/py-xdis/PLIST
--- a/devel/py-xdis/PLIST Thu Apr 16 18:30:05 2020 +0000
+++ b/devel/py-xdis/PLIST Thu Apr 16 18:32:32 2020 +0000
@@ -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/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/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
diff -r 1e51e76271a3 -r eddac3d805d0 devel/py-xdis/distinfo
--- a/devel/py-xdis/distinfo Thu Apr 16 18:30:05 2020 +0000
+++ b/devel/py-xdis/distinfo Thu Apr 16 18:32:32 2020 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index