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 inexamples/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
?Tparameters and no known parameter names advertisedarg2=Nonein its signature, but calling it without that argument raisedWrongArgumentCount. Trailing?Tparameters may now be omitted (they arenull) in module functions, instance, static and class methods, and__call__. A?Tfollowed by a required parameter is still required, and the signature no longer claims a default for it. The.pyistubs now show= Nonefor 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 toRuntimeError; it is now aTypeError, 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