Skip to content

Commit c478ee5

Browse files
author
rocky
committed
Get ready for release 6.0.5
1 parent 230e9a2 commit c478ee5

File tree

11 files changed

+72
-17
lines changed

11 files changed

+72
-17
lines changed

.github/workflows/windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ jobs:
2626
pip install -r requirements-dev.txt
2727
- name: Test xdis
2828
run: |
29-
make check
29+
# Until workflows CI problems are fixed
30+
make check-pytest

Makefile

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,26 @@
66

77
GIT2CL ?= git2cl
88
PYTHON ?= python
9-
PYTHON3 ?= python3
109
RM ?= rm
1110
LINT = flake8
1211

1312
#EXTRA_DIST=ipython/ipy_trepan.py trepan
14-
PHONY=all check clean dist-older dist-newer unittest check-long dist distclean lint flake8 test rmChangeLog clean_pyc
13+
PHONY= \
14+
all \
15+
check \
16+
check-long \
17+
check-pytest \
18+
clean \
19+
clean_pyc \
20+
dist \
21+
dist-newer \
22+
dist-older \
23+
distclean \
24+
flake8 \
25+
lint \
26+
rmChangeLog \
27+
test \
28+
unittest
1529

1630
TEST_TYPES=check-full check-short check-2.7 check-3.4
1731

@@ -35,9 +49,9 @@ check-full: check
3549
check-short: unittest pytest
3650
$(MAKE) -C test check-short
3751

38-
#: Run unittests tests
39-
unittest:
40-
py.test pytest
52+
#: Run pytest tests
53+
check-pytest unittest:
54+
$(PYTHON) -m pytest pytest
4155

4256
#: Clean up temporary files and .pyc files
4357
clean: clean_pyc

NEWS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
6.0.5 2022-12-22
2+
=================
3+
4+
* Detect versions pypy3.8.15, pypy-3.9.15
5+
* Dectect Python 3.{7,8,9}.14 3.10.{5,6,7}
6+
* correct 3.10+ pydisasm -F xasm label
7+
* Revise marshal error handling (Issue #97)
8+
* Improve PyPy 3.7 `CALL_FUNCTION` arg interpretation
9+
* Fix 1.5-2.x bugs in line number encoding
10+
* Fix showing `MAKE_FUNCTION` operand
11+
* Miscellaneous lint, black, and isort changes
12+
113
6.0.4 2022-05-19 HF+LB-1
214
========================
315

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ owd=$(pwd)
88
trap finish EXIT
99

1010
cd $(dirname ${BASH_SOURCE[0]})
11-
if ! source ./pyenv-3.1-3.2-versions ; then
11+
if ! source ./pyenv-3.0-3.2-versions ; then
1212
exit $?
1313
fi
14-
if ! source ./setup-python-3.1.sh ; then
14+
if ! source ./setup-python-3.0.sh ; then
1515
exit $?
1616
fi
1717
cd ..
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ cd $(dirname ${BASH_SOURCE[0]})
1010
owd=$(pwd)
1111
trap finish EXIT
1212

13-
if ! source ./pyenv-3.1-3.2-versions ; then
13+
if ! source ./pyenv-3.0-3.2-versions ; then
1414
exit $?
1515
fi
16-
if ! source ./setup-python-3.1.sh ; then
16+
if ! source ./setup-python-3.0.sh ; then
1717
exit $?
1818
fi
1919

@@ -37,3 +37,8 @@ for pyversion in $PYVERSIONS; do
3737
done
3838

3939
python ./setup.py sdist
40+
41+
tarball=dist/${PACKAGE}-${__version__}.tar.gz
42+
if [[ -f $tarball ]]; then
43+
mv -v $tarball dist/${PACKAGE}_31-${__version__}.tar.gz
44+
fi

admin-tools/pyenv-3.0-3.2-versions

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# -*- shell-script -*-
2+
# Sets PYVERSIONS to be pyenv versions that
3+
# we can use in the python-3.1-to-3.2 branch.
4+
5+
if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
6+
echo "This script should be *sourced* rather than run directly through bash"
7+
exit 1
8+
fi
9+
export PYVERSIONS='3.0.1 3.1.5 3.2.6'

pytest/test_disasm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
2-
import pytest
32
import re
43

4+
import pytest
55
from xdis import disassemble_file
66
from xdis.version_info import PYTHON3, PYTHON_VERSION_TRIPLE
77

@@ -22,6 +22,9 @@ def get_srcdir():
2222

2323
if PYTHON_VERSION_TRIPLE >= (3, 2):
2424

25+
@pytest.mark.skipif(
26+
os.name == "nt", reason="Windows differences in output need going over"
27+
)
2528
@pytest.mark.parametrize(
2629
("test_tuple", "function_to_test"),
2730
[

pytest/test_load_file.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import os
2+
import os.path as osp
3+
4+
import pytest
25
from xdis import IS_PYPY
3-
from xdis.load import load_file, check_object_path, load_module
46
from xdis.codetype import CodeTypeUnionFields
5-
6-
import os.path as osp
7+
from xdis.load import check_object_path, load_file, load_module
78

89

910
def get_srcdir():
1011
filename = osp.normcase(osp.dirname(osp.abspath(__file__)))
1112
return osp.realpath(filename)
1213

1314

15+
@pytest.mark.skipif(
16+
os.name == "nt", reason="Windows differences in output need going over"
17+
)
1418
def test_load_file():
1519
srcdir = get_srcdir()
1620
load_py = osp.realpath(osp.join(srcdir, "..", "xdis", "load.py"))
@@ -40,6 +44,10 @@ def test_load_file():
4044
continue
4145
load_file_field = getattr(co_file, field)
4246
load_module_field = getattr(co_module, field)
47+
if os.name == "windows" and field == "co_filename":
48+
# MS/Windows is letter case insensitive
49+
load_module_field = load_module_field.upper()
50+
load_file_field = load_module_field.upper()
4351
assert (
4452
load_module_field == load_file_field
4553
), "field %s\nmodule:\n\t%s\nfile:\n\t%s" % (

xdis/magics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
from xdis.version_info import IS_PYPY, version_tuple_to_str
4141

42-
IS_PYPY3 = (48, 64, 112, 160, 192, 240, 244, 256)
42+
IS_PYPY3 = (48, 64, 112, 160, 192, 240, 244, 256, 336)
4343

4444

4545
def add_magic_from_int(magic_int, version):
@@ -342,6 +342,7 @@ def __by_version(magics) -> dict:
342342
add_magic_from_int(224, "3.7pypy") # PyPy 3.7.9-beta0
343343
add_magic_from_int(240, "3.7pypy") # PyPy 3.7.9-beta0
344344
add_magic_from_int(256, "3.8pypy") # PyPy 3.8.15
345+
add_magic_from_int(336, "3.9pypy") # PyPy 3.9.15
345346

346347
# NOTE: This is JVM bytecode not Python bytecode
347348
add_magic_from_int(21150, "3.8.5Graal")
@@ -351,6 +352,7 @@ def __by_version(magics) -> dict:
351352

352353
magics = __by_version(versions)
353354
magics["3.8.12pypy"] = magics["3.8.0rc1+"]
355+
magics["3.9.15pypy"] = magics["3.9.0alpha1"]
354356

355357
# From a Python version given in sys.info, e.g. 3.6.1,
356358
# what is the "canonic" version number, e.g. '3.6.0rc1'
@@ -436,7 +438,7 @@ def add_canonic_versions(versions, canonic):
436438
)
437439
add_canonic_versions(
438440
"3.9 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 "
439-
"3.9.14 3.9.15 3.9.16 3.9.10pypy 3.9.11pypy 3.9.12pypy 3.9.0b5+",
441+
"3.9.14 3.9.15 3.9.16 3.9.10pypy 3.9.11pypy 3.9.12pypy 3.9.15pypy 3.9.0b5+",
440442
"3.9.0beta5",
441443
)
442444

xdis/op_imports.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
"3.8.12pypy": opcode_38pypy,
148148
"3.8.13pypy": opcode_38pypy,
149149
"3.9pypy": opcode_39pypy,
150+
"3.9.15pypy": opcode_39pypy,
150151
}
151152

152153
for k, v in canonic_python_version.items():

0 commit comments

Comments
 (0)