PyOZ v0.13.4
What's New in v0.13.4
Fixed
-
pyoz.funcwith apyoz.Args(...)function could not be called. It compiled, but was registered as positional-only: keywords raisedtakes no keyword argumentsand positional calls failed too.pyoz.funcnow detectspyoz.Argslike.fromand class methods do, sopyoz.kwfuncis optional. -
Keyword functions ignored the module's
.error_mappings. Errors frompyoz.kwfunc, and from.fromfunctions takingpyoz.Argsor optional?Tparameters, only used the built-in name-based fallback, so a mapped error surfaced asRuntimeErrorwith the raw error name. They now use the same mappings as positional functions (newwrapFunctionWithNamedKeywordsAndErrorMappingandwrapAutoKeywordFunctionWithErrorMapping; the existing wrappers keep their signatures). -
Constructors silently dropped keyword arguments.
Diagnostic(1, 0, line=3)built an object withline = 0, and unknown keywords were accepted. Constructors now take keywords by name: the field names for the default constructor, and for__new__the names from__new____params__orpyoz.withSource. Duplicate, missing and unknown arguments raiseTypeError, and a__new__without known parameter names rejects keywords (Cls() takes no keyword arguments) instead of ignoring them. -
Property getters returning
pyoz.Signature(...)returnedNULLwithout an exception (SystemError: error return without exception set): the wrapper was not unwrapped. All three getter kinds (get_X, custom field getters,pyoz.property) now unwrap it, map returned errors to exceptions, and always set an exception on failure. -
Zig tuple parameters (
struct { i64, i64 }) could be returned but not accepted:fromPyhad no tuple case, so functions and__new__taking one failed with a bareTypeError. They now accept a Python tuple of the same length, with clear errors for a wrong length or item type.
Changed
get_X/set_Xare properties only with the accessor signature:get_X(self)andset_X(self, value). A function such asget_item(self, index)is now an ordinary method; previously it failed to compile with an error insideproperties.zig. The rule lives in one place (class/accessors.zig) shared by the property table, the method table and stub generation.
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.4.tar.gz for the source code.
Quick Start
pyoz init mymodule
cd mymodule
pyoz build
pip install dist/*.whl