Skip to content

Commit

Permalink
Get ready for release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Apr 27, 2020
1 parent 69a8a6b commit c4252a5
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 296 deletions.
48 changes: 45 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,8 +1,50 @@
2020-04-26 rocky <rocky@gnu.org>

* ChangeLog, __pkginfo__.py, xasm/version.py: Get ready for release
1.1.0

2020-04-24 rocky <rocky@gnu.org>

* __pkginfo__.py, pytest/test_write_pyc.py, test/gcd-3.7.pyasm,
test/gcd-3.8.pyasm, xasm/write_pyc.py: Add 3.7 PEP 552 header for
3.7+ Fixes #3 Bump xdis version

2020-04-18 R. Bernstein <rocky@users.noreply.github.com>

* .github/FUNDING.yml: Create FUNDING.yml

2020-04-17 rocky <rb@dustyfeet.com>

* test/comp.py, xasm/assemble.py, xasm/write_pyc.py: Misc assembly
bug fixes: * Add 3.8+ posonlyargcount * More sensitive to writing pep pep552 bits and network order of
ints * note positional arguments in 3.6+

2020-04-17 rocky <rb@dustyfeet.com>

* xasm/assemble.py: Track xdis changes to Code repr()

2020-04-17 rocky <rocky@gnu.org>

* Makefile, __pkginfo__.py, admin-tools/how-to-make-a-release.md,
admin-tools/pyenv-versions, pytest/.gitignore,
pytest/test_write_pyc.py, test/test_all.py, xasm/.gitignore,
xasm/assemble.py, xasm/misc.py, xasm/write_pyc.py, xasm/xasm_cli.py:
Revise for new xdis. Add Better write_pyc() fn

2019-11-06 rocky <rb@dustyfeet.com>

* xasm/assemble.py: Ensure bytecode is in range

2019-10-19 rocky <rocky@gnu.org>

* xasm/assemble.py: Add an "assert" message

2019-10-19 rocky <rocky@gnu.org>

* MANIFEST.in, NEWS.md, README.rst, admin-tools/check-versions.sh,
admin-tools/make-dist.sh, admin-tools/pyenv-versions,
xasm/version.py: Get ready for release 1.0.0
* ChangeLog, MANIFEST.in, Makefile, NEWS.md, README.rst,
__pkginfo__.py, admin-tools/check-versions.sh,
admin-tools/make-dist.sh, admin-tools/pyenv-versions, setup.py,
xasm/version.py: Release 1.0.0

2019-10-19 rocky <rocky@gnu.org>

Expand Down
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
1.1.0 2019-10-19

- Fix bugs in writing 3.7 and 3.8 pyc
- Require newer xdis to get fixes to 3.8 pyc marshaling


1.0.0 2019-10-19

- Go over docs.
- Require newer xdis to get early bytecodes bytecodes: 1.0, 1.1, 1.2, and 1.6.
-
- More sensitive to network ordering
2 changes: 1 addition & 1 deletion __pkginfo__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
mailing_list = "python-debugger@googlegroups.com"
modname = "xasm"
py_modules = None
setup_requires = ["pytest-runner", "xdis >= 4.5.0, < 4.6.0"]
setup_requires = ["pytest-runner", "xdis >= 4.5.1, < 4.6.0"]
# scripts = ['bin/pydisasm']
short_desc = "Python cross-version byte-code assembler"
tests_require = ["pytest", _six]
Expand Down
2 changes: 1 addition & 1 deletion admin-tools/pyenv-versions
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='3.6.9 3.7.7 3.3.7 2.7.17 3.4.10 3.5.9 3.8.2'
export PYVERSIONS='3.6.10 3.7.7 3.3.7 2.7.18 3.4.10 3.5.9 3.8.2'
12 changes: 8 additions & 4 deletions pytest/test_write_pyc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import os.path as osp
from tempfile import NamedTemporaryFile
from xdis import load_module
from xdis import load_module, PYTHON3
from xasm.write_pyc import write_pycfile

def get_srcdir():
Expand All @@ -12,19 +12,23 @@ def get_srcdir():
os.chdir(src_dir)


def test_roundtrip():
def test_roundtrip3():
if not PYTHON3:
print("test skipped because Python 2.x has problems creating Python 3.x files")
return
fp = NamedTemporaryFile(mode="wb+", suffix=".pyc", prefix="test_pyc-", delete=False)
orig_path="testdata/test_pyc.pyc"
version, timestamp, magic_int, co, is_pypy, source_size, sip_hash = load_module(orig_path)
write_pycfile(fp, [co], timestamp, version)
new_path = fp.name
size = fp.tell()
fp.close()
print("Wrote Python %s bytecode file %s" % (version, fp.name))
print("Wrote Python %s bytecode file %s; %d bytes" % (version, fp.name, size))
old_fp = open(orig_path, "rb")
new_fp = open(new_path, "rb")
compare_size=590
assert old_fp.read(compare_size) == new_fp.read(compare_size)
os.unlink(new_path)

if __name__ == "__main__":
test_roundtrip()
test_roundtrip3()
141 changes: 0 additions & 141 deletions test/gcd-3.7.pyasm

This file was deleted.

Loading

0 comments on commit c4252a5

Please sign in to comment.