What's New in v0.7.1
Fixed
- Cross-class references now work between module classes - When a module defines multiple classes (e.g.,
PointandLine), methods on one class can now accept or return instances of another class in the same module. Previously, class method wrappers only knew about their own class (or no classes at all), so cross-class conversions would fail withTypeErrororSystemError. The fix threads the fullclass_infoslist through the entire class generation pipeline — fromgenerateClass()through every protocol builder (methods, lifecycle, properties, number, sequence, mapping, descriptor, repr, attributes, iterator, callable, comparison) — so every converter sees all sibling classes. Cyclic references (A references B and B references A) work correctly thanks to Zig's comptime memoization. - Comparison operators now support cross-class types -
__eq__,__ne__,__lt__,__le__,__gt__,__ge__previously hardcoded theotherparameter to be the same type asself. Now the comparison protocol introspects each method's signature and uses the class-aware converter, so__eq__(self: *const A, other: *const B) boolworks correctly. __int__,__float__,__index__now use class-aware converter - These number protocol methods were using the old zero-classConversions.toPy()instead of the class-awareConv.toPy(), which would have failed if they returned a custom class type.- Class parameters now supported by value and by pointer - Methods can now accept class instances either by pointer (
fn foo(p: *const Point)) or by value (fn foo(p: Point)). Previously only pointer parameters worked for cross-class references; by-value parameters would fail withTypeErrorbecause the struct branch offromPydidn't check registered class types.
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.7.1.tar.gz for the source code.
Quick Start
pyoz init mymodule
cd mymodule
pyoz build
pip install dist/*.whl