Skip to content

Commit a6c9247

Browse files
author
rocky
committed
Update for current devel xdis
1 parent 92baa1a commit a6c9247

3 files changed

Lines changed: 14 additions & 15 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ name = "xasm"
1414
description = "Cross-version Python bytecode assembler"
1515
dependencies = [
1616
"click",
17-
"xdis >= 6.1.8, < 6.3.0",
17+
"xdis > 6.3.0",
1818
]
1919
readme = "README.rst"
2020
license = "GPL-2.0"

pytest/test_write_pyc.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,22 @@ def get_srcdir() -> str:
2626
def test_roundtrip3() -> None:
2727
fp = NamedTemporaryFile(mode="wb+", suffix=".pyc", prefix="test_pyc-", delete=False)
2828
orig_path = "testdata/test_pyc.pyc"
29-
version, timestamp, magic_int, co, is_pypy, source_size, sip_hash = load_module(
30-
orig_path
31-
)
32-
write_pycfile(fp, [co], timestamp, version)
29+
(
30+
version_tuple,
31+
timestamp,
32+
_magic_int,
33+
co_module,
34+
is_pypy,
35+
source_size,
36+
sip_hash,
37+
_file_offsets,
38+
) = load_module(orig_path)
39+
40+
write_pycfile(fp, [co_module], timestamp, version_tuple)
3341
new_path = fp.name
3442
size = fp.tell()
3543
fp.close()
36-
print("Wrote Python %s bytecode file %s; %d bytes" % (version, fp.name, size))
44+
print("Wrote Python %s bytecode file %s; %d bytes" % (version_tuple, fp.name, size))
3745
old_fp = open(orig_path, "rb")
3846
new_fp = open(new_path, "rb")
3947
if PYTHON_VERSION_TRIPLE < (3, 7):

requirements.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)