Skip to content

Commit b7eae4f

Browse files
committedMar 16, 2024
Get ready for release 3.9.1
1 parent bec88e4 commit b7eae4f

13 files changed

+175
-73
lines changed
 

‎.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ jobs:
4343
- run:
4444
command: | # Use pip to install dependengcies
4545
sudo pip install --user --upgrade setuptools
46-
# Until the next release
47-
sudo pip install git+https://github.com/rocky/python-xdis#egg=xdis
4846
pip install --user -e .
47+
# Not sure why "pip install -e" doesn't work above
48+
# pip install click spark-parser xdis
4949
pip install --user -r requirements-dev.txt
5050
5151
# Save dependency cache

‎.github/workflows/osx.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip
25-
# Until the next xdis release
26-
pip install git+https://github.com/rocky/python-xdis#egg=xdis
2725
pip install -e .
26+
# Not sure why "pip install -e" doesn't work above
27+
# pip install click spark-parser xdis
2828
pip install -r requirements-dev.txt
2929
- name: Test uncompyle6
3030
run: |

‎.github/workflows/ubuntu.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
24-
# Until the next xdis release
25-
pip install git+https://github.com/rocky/python-xdis#egg=xdis
2624
pip install -e .
25+
# pip install click spark-parser xdis
2726
pip install -r requirements-dev.txt
2827
- name: Test uncompyle6
2928
run: |

‎.github/workflows/windows.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip
25-
# Until the next xdis release
26-
pip install git+https://github.com/rocky/python-xdis#egg=xdis
2725
pip install -e .
26+
# Not sure why "pip install -e" doesn't work above
27+
# pip install click spark-parser xdis
2828
pip install -r requirements-dev.txt
2929
- name: Test uncompyle6
3030
run: |

‎NEWS.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
3.9.1: 2024-05-15
2+
=================
3+
4+
Lots of changes major changes. track xdis API has changes.
5+
6+
Separate Phases more clearly:
7+
* disassembly
8+
* tokenization
9+
* parsing
10+
* abstracting to AST (more is done in newer projects)
11+
* printing
12+
13+
Although we do not decompile bytecode greater than 3.8, code supports running from up to 3.12.
14+
15+
Many bugs fixed.
16+
17+
A lot of Linting and coding style modernization.
18+
19+
Work done in preparation for Blackhat Asia 2024
20+
121
3.9.0: 2022-12-22
222
=================
323

‎__pkginfo__.py

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
"Programming Language :: Python :: 3.8",
6363
"Programming Language :: Python :: 3.9",
6464
"Programming Language :: Python :: 3.10",
65+
"Programming Language :: Python :: 3.11",
66+
"Programming Language :: Python :: 3.12",
6567
"Programming Language :: Python :: Implementation :: PyPy",
6668
"Topic :: Software Development :: Debuggers",
6769
"Topic :: Software Development :: Libraries :: Python Modules",

‎admin-tools/make-dist-2.4-2.7.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ PACKAGE=uncompyle6
33

44
# FIXME put some of the below in a common routine
55
function finish {
6-
cd $owd
6+
cd $make_dist_uncompyle6_owd
77
}
8-
owd=$(pwd)
8+
make_dist_uncompyle6_owd=$(pwd)
99
trap finish EXIT
1010

1111
cd $(dirname ${BASH_SOURCE[0]})
@@ -21,6 +21,11 @@ source $PACKAGE/version.py
2121
echo $__version__
2222

2323
for pyversion in $PYVERSIONS; do
24+
echo --- $pyversion ---
25+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
26+
echo "$pyversion - PyPy does not get special packaging"
27+
continue
28+
fi
2429
if ! pyenv local $pyversion ; then
2530
exit $?
2631
fi
@@ -41,3 +46,4 @@ tarball=dist/${PACKAGE}-${__version_}_-tar.gz
4146
if [[ -f $tarball ]]; then
4247
rm -v dist/${PACKAGE}-${__version__}-tar.gz
4348
fi
49+
finish

‎admin-tools/make-dist-3.0-3.2.sh

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
PACKAGE=uncompyle6
3+
4+
# FIXME put some of the below in a common routine
5+
function finish {
6+
cd $uncompyle6_30_make_dist_owd
7+
}
8+
9+
cd $(dirname ${BASH_SOURCE[0]})
10+
uncompyle6_30_make_dist_owd=$(pwd)
11+
trap finish EXIT
12+
13+
if ! source ./pyenv-3.0-3.2-versions ; then
14+
exit $?
15+
fi
16+
if ! source ./setup-python-3.0.sh ; then
17+
exit $?
18+
fi
19+
20+
cd ..
21+
source $PACKAGE/version.py
22+
echo $__version__
23+
24+
for pyversion in $PYVERSIONS; do
25+
echo --- $pyversion ---
26+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
27+
echo "$pyversion - PyPy does not get special packaging"
28+
continue
29+
fi
30+
if ! pyenv local $pyversion ; then
31+
exit $?
32+
fi
33+
# pip bdist_egg create too-general wheels. So
34+
# we narrow that by moving the generated wheel.
35+
36+
# Pick out first two number of version, e.g. 3.5.1 -> 35
37+
first_two=$(echo $pyversion | cut -d'.' -f 1-2 | sed -e 's/\.//')
38+
rm -fr build
39+
python setup.py bdist_egg bdist_wheel
40+
mv -v dist/${PACKAGE}-$__version__-{py2.py3,py$first_two}-none-any.whl
41+
echo === $pyversion ===
42+
done
43+
44+
python ./setup.py sdist
45+
tarball=dist/${PACKAGE}-${__version__}.tar.gz
46+
if [[ -f $tarball ]]; then
47+
mv -v $tarball dist/${PACKAGE}_31-${__version__}.tar.gz
48+
fi
49+
finish

‎admin-tools/make-dist-3.3-3.5.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ PACKAGE=uncompyle6
33

44
# FIXME put some of the below in a common routine
55
function finish {
6-
cd $owd
6+
cd $uncompyle6_33_make_owd
77
}
88

99
cd $(dirname ${BASH_SOURCE[0]})
10-
owd=$(pwd)
10+
uncompyle6_33_make_owd=$(pwd)
1111
trap finish EXIT
1212

1313
if ! source ./pyenv-3.3-3.5-versions ; then
@@ -22,6 +22,11 @@ source $PACKAGE/version.py
2222
echo $__version__
2323

2424
for pyversion in $PYVERSIONS; do
25+
echo --- $pyversion ---
26+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
27+
echo "$pyversion - PyPy does not get special packaging"
28+
continue
29+
fi
2530
if ! pyenv local $pyversion ; then
2631
exit $?
2732
fi
@@ -33,6 +38,12 @@ for pyversion in $PYVERSIONS; do
3338
rm -fr build
3439
python setup.py bdist_egg bdist_wheel
3540
mv -v dist/${PACKAGE}-$__version__-{py2.py3,py$first_two}-none-any.whl
41+
echo === $pyversion ===
3642
done
3743

3844
python ./setup.py sdist
45+
tarball=dist/${PACKAGE}-${__version__}.tar.gz
46+
if [[ -f $tarball ]]; then
47+
mv -v $tarball dist/${PACKAGE}_31-${__version__}.tar.gz
48+
fi
49+
finish

‎admin-tools/make-dist-newest.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ PACKAGE=uncompyle6
33

44
# FIXME put some of the below in a common routine
55
function finish {
6-
cd $owd
6+
cd $make_uncompyle6_newest_owd
77
}
88

99
cd $(dirname ${BASH_SOURCE[0]})
10-
owd=$(pwd)
10+
make_uncompyle6_newest_owd=$(pwd)
1111
trap finish EXIT
1212

1313
if ! source ./pyenv-newest-versions ; then
@@ -22,6 +22,11 @@ source $PACKAGE/version.py
2222
echo $__version__
2323

2424
for pyversion in $PYVERSIONS; do
25+
echo --- $pyversion ---
26+
if [[ ${pyversion:0:4} == "pypy" ]] ; then
27+
echo "$pyversion - PyPy does not get special packaging"
28+
continue
29+
fi
2530
if ! pyenv local $pyversion ; then
2631
exit $?
2732
fi
@@ -36,3 +41,4 @@ for pyversion in $PYVERSIONS; do
3641
done
3742

3843
python ./setup.py sdist
44+
finish

‎pyproject.toml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=61.2",
4+
]
5+
6+
build-backend = "setuptools.build_meta"
7+
8+
[project]
9+
authors = [
10+
{name = "Rocky Bernstein", email = "rb@dustyfeet.com"},
11+
]
12+
13+
name = "uncompyle6"
14+
description = "Python cross-version byte-code library and disassembler"
15+
dependencies = [
16+
"click",
17+
"spark-parser >= 1.8.9, < 1.9.0",
18+
"xdis >= 6.0.8, < 6.2.0",
19+
]
20+
readme = "README.rst"
21+
license = {text = "GPL"}
22+
keywords = ["Python bytecode", "bytecode", "disassembler"]
23+
classifiers = [
24+
"Development Status :: 5 - Production/Stable",
25+
"Intended Audience :: Developers",
26+
"License :: OSI Approved :: MIT License",
27+
"Programming Language :: Python",
28+
"Topic :: Software Development :: Libraries :: Python Modules",
29+
"Programming Language :: Python :: 2.4",
30+
"Programming Language :: Python :: 2.5",
31+
"Programming Language :: Python :: 2.6",
32+
"Programming Language :: Python :: 2.7",
33+
"Programming Language :: Python :: 3.0",
34+
"Programming Language :: Python :: 3.1",
35+
"Programming Language :: Python :: 3.2",
36+
"Programming Language :: Python :: 3.3",
37+
"Programming Language :: Python :: 3.4",
38+
"Programming Language :: Python :: 3.5",
39+
"Programming Language :: Python :: 3.6",
40+
"Programming Language :: Python :: 3.7",
41+
"Programming Language :: Python :: 3.8",
42+
"Programming Language :: Python :: 3.9",
43+
"Programming Language :: Python :: 3.10",
44+
"Programming Language :: Python :: 3.11",
45+
"Programming Language :: Python :: 3.12",
46+
]
47+
dynamic = ["version"]
48+
49+
[project.urls]
50+
Homepage = "https://github.com/rocky/python-uncompyle6"
51+
Downloads = "https://github.com/rocky/python-uncompyle6/releases"
52+
53+
[project.optional-dependencies]
54+
dev = [
55+
"pre-commit",
56+
"pytest",
57+
]
58+
59+
[project.scripts]
60+
uncompyle6 = "uncompyle6.bin.uncompile:main_bin"
61+
uncompyle6-tokenize = "uncompyle6.bin.pydisassemble:main"
62+
63+
[tool.setuptools.dynamic]
64+
version = {attr = "uncompyle6.version.__version__"}

‎setup.py

+3-58
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,6 @@
11
#!/usr/bin/env python
2-
import setuptools
3-
import sys
2+
"""Setup script for the 'xdis' distribution."""
43

5-
"""Setup script for the 'uncompyle6' distribution."""
4+
from setuptools import setup
65

7-
SYS_VERSION = sys.version_info[0:2]
8-
if not ((2, 4) <= SYS_VERSION < (3, 13)):
9-
mess = "Python Release 2.6 .. 3.12 are supported in this code branch."
10-
if (2, 4) <= SYS_VERSION <= (2, 7):
11-
mess += (
12-
"\nFor your Python, version %s, use the python-2.4 code/branch."
13-
% sys.version[0:3]
14-
)
15-
if (3, 3) <= SYS_VERSION < (3, 6):
16-
mess += (
17-
"\nFor your Python, version %s, use the python-3.3-to-3.5 code/branch."
18-
% sys.version[0:3]
19-
)
20-
elif SYS_VERSION < (2, 4):
21-
mess += (
22-
"\nThis package is not supported for Python version %s." % sys.version[0:3]
23-
)
24-
print(mess)
25-
raise Exception(mess)
26-
27-
from __pkginfo__ import (
28-
author,
29-
author_email,
30-
install_requires,
31-
license,
32-
long_description,
33-
classifiers,
34-
entry_points,
35-
modname,
36-
py_modules,
37-
short_desc,
38-
__version__,
39-
web,
40-
zip_safe,
41-
)
42-
43-
setuptools.setup(
44-
author=author,
45-
author_email=author_email,
46-
classifiers=classifiers,
47-
description=short_desc,
48-
entry_points=entry_points,
49-
install_requires=install_requires,
50-
license=license,
51-
long_description=long_description,
52-
long_description_content_type="text/x-rst",
53-
name=modname,
54-
packages=setuptools.find_packages(),
55-
py_modules=py_modules,
56-
test_suite="nose.collector",
57-
url=web,
58-
tests_require=["nose>=1.0"],
59-
version=__version__,
60-
zip_safe=zip_safe,
61-
)
6+
setup(packages=["uncompyle6"])

‎uncompyle6/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# This file is suitable for sourcing inside POSIX shell as
1515
# well as importing into Python
1616
# fmt: off
17-
__version__="3.9.1.dev0" # noqa
17+
__version__="3.9.1" # noqa

0 commit comments

Comments
 (0)
Failed to load comments.