What's New in v0.13.9
Fixed
- ABI3 builds crashed when freeing objects of a class with
__traverse__. Such classes havePy_TPFLAGS_HAVE_GC, so their objects are allocated with a GC header in front, but the ABI3 deallocator always freed them withPyObject_Del, corrupting the heap (a segfault as soon as one was collected). It now frees with the type'stp_free(PyType_GetSlot, whichPyType_FromSpecsets toPyObject_GC_Delfor GC types). - GC objects were not untracked before being torn down, in every build mode, so the collector could visit a half-destroyed object. The deallocator now calls
PyObject_GC_UnTrackfirst. Classes with__traverse__no longer use the__freelist__cache, since reusing a cached object would require tracking it again. - A failed
pyoz buildleft a corrupt wheel indist/. The wheel was written in place after deleting the previous one, so a failure while packaging replaced a good wheel with an invalid zip thatpyoz publishwould upload. It is now written to a.tmpfile and renamed on success; on failure the previous wheel is untouched. - The build log named the wrong stub file (the project name instead of the module name, e.g.
zrun-py.pyifor a wheel containingzrun.pyi).
Changed
pyoz buildchecks the project metadata before compiling. A missing readme or license file now fails immediately instead of after the compile, which can take minutes.- The ABI3 documentation said the GC protocol was not part of the Stable ABI. It is, and it works in ABI3 mode (regression test with reference cycles).
Installation
Download the binary for your platform and add it to your PATH:
| Platform | Binary |
|---|---|
| Linux x86_64 | pyoz-x86_64-linux
|
| Linux ARM64 | pyoz-aarch64-linux
|
| macOS x86_64 | pyoz-x86_64-macos
|
| macOS ARM64 (Apple Silicon) | pyoz-aarch64-macos
|
| Windows x86_64 | pyoz-x86_64-windows.exe
|
| Windows ARM64 | pyoz-aarch64-windows.exe
|
Source
Download PyOZ-0.13.9.tar.gz for the source code.
Quick Start
pyoz init mymodule
cd mymodule
pyoz build
pip install dist/*.whl