What's New in v0.3.1
Added
- Cross-platform CI testing for example module - Tests on Linux, Windows, and macOS
- New
example-modulejob in CI workflow testing 3 platforms × 4 Python versions (3.10-3.13) - Comprehensive test coverage: basic functions, classes, magic methods,
__base__inheritance, iterator views, dict/set views, datetime types, error handling, custom exceptions, NumPy buffers, and submodules - Added
examples/**to CI trigger paths - Added format checking for
examples/directory
- New
Fixed
- macOS Python 3.13 crash during interpreter shutdown - Fixed use-after-free in submodule creation
createSubmodulewas allocatingPyModuleDefon the stack, but Python stores a reference to it- When the function returned, the stack memory became invalid
- During Python's GC traversal at shutdown, accessing the freed memory caused a crash
- Fix: Use a comptime-generated static struct to hold the
PyModuleDef
- Windows support - PyOZ now works correctly on Windows
- Replaced
python3-configwithsysconfigmodule for cross-platform Python detection - Fixed library naming (
python313on Windows vspython3.13on Unix) - Fixed example module extension (
.pydon Windows vs.soon Unix) - Fixed crash when inheriting from Python built-in types (
__base__)- On Windows, DLL data imports (like
PyList_Type) require runtime address resolution - Comptime initialization used import thunk address instead of actual type object
- Added runtime
initBase()for Windows while preserving comptime on Linux/macOS
- On Windows, DLL data imports (like
- Replaced
Changed
- Python detection now uses
sysconfigmodule (standard library since Python 3.2) on all platforms python3-configis no longer required on any platform
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.3.1.tar.gz for the source code.
Quick Start
pyoz init mymodule
cd mymodule
pyoz build
pip install dist/*.whl