Skip to content

PyOZ v0.3.1

Choose a tag to compare

@github-actions github-actions released this 26 Nov 21:27
· 96 commits to main since this release

What's New in v0.3.1

Added

  • Cross-platform CI testing for example module - Tests on Linux, Windows, and macOS
    • New example-module job 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

Fixed

  • macOS Python 3.13 crash during interpreter shutdown - Fixed use-after-free in submodule creation
    • createSubmodule was allocating PyModuleDef on 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-config with sysconfig module for cross-platform Python detection
    • Fixed library naming (python313 on Windows vs python3.13 on Unix)
    • Fixed example module extension (.pyd on Windows vs .so on 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

Changed

  • Python detection now uses sysconfig module (standard library since Python 3.2) on all platforms
  • python3-config is 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