github pyozig/PyOZ v0.13.8
PyOZ v0.13.8

3 hours ago

What's New in v0.13.8

Fixed

  • Large classes failed to compile with evaluation exceeded N backwards branches. PyOZ builds every method's signature and docstring at compile time, in one evaluation for the whole class, and that evaluation never raised Zig's branch quota. The cost grows with the number of methods and the length of their signatures and docs, so a class with about 40 documented methods could exceed it, and user code could not raise the limit. The method table, method detection, property counting and constructor now raise the quota like the module-level code already did. Regression example in examples/wide_class.zig; a class with 400 methods, 100 properties and 120 static and keyword methods also builds.
  • Trailing optional parameters could not be omitted in positional calls. A function or method with ?T parameters and no known parameter names advertised arg2=None in its signature, but calling it without that argument raised WrongArgumentCount. Trailing ?T parameters may now be omitted (they are null) in module functions, instance, static and class methods, and __call__. A ?T followed by a required parameter is still required, and the signature no longer claims a default for it. The .pyi stubs now show = None for the omittable ones.
  • Argument errors in module functions raised RuntimeError. A wrong argument count or type in a module function went through the error-name mapping and fell back to RuntimeError; it is now a TypeError, as for methods.

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.8.tar.gz for the source code.

Quick Start

pyoz init mymodule
cd mymodule
pyoz build
pip install dist/*.whl

Don't miss a new PyOZ release

NewReleases is sending notifications on new releases.