github pyozig/PyOZ v0.13.5
PyOZ v0.13.5

latest releases: v0.13.7, v0.13.6
4 hours ago

What's New in v0.13.5

Added

  • __new__ can take pyoz.Args(...). The constructor then accepts keywords and defaults from the argument struct, like keyword functions, with no __new____params__ and no pyoz.withSource: pub fn __new__(args: pyoz.Args(struct { level: i64, line: i64 = 0 })) Notice.
  • Field defaults in the default constructor. A field with a default value may be omitted: with struct { width: i64, height: i64 = 10 }, Options(3) and Options(3, height=4) both work. A required field after a defaulted one can be passed by keyword.

Fixed

  • __init__ stubs ignored __new__. The .pyi always listed the struct's public fields, so a class with a custom constructor got the wrong signature (def __init__(self) when all fields are private). Stubs now describe the real constructor: the pyoz.Args fields, or the __new__ parameters with their names when known (arg0, ..., / otherwise) and | None = None for optional ones. Field defaults appear as = ....

Changed

  • Constructor error messages follow one format for every constructor kind: Cls() takes at most N positional arguments (M given), Cls() missing required argument 'x', Cls() argument 'x' has the wrong type.

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.5.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.