github pyozig/PyOZ v0.13.6
PyOZ v0.13.6

latest release: v0.13.7
3 hours ago

What's New in v0.13.6

Added

  • pyoz.asyncThen(f, then) and pyoz.asyncMethodThen(f, then): async functions with a completion step. The task still runs without Python; when it succeeds, then(result, extra...) runs on the event loop thread with Python attached, and the awaitable resolves to its result. then's extra parameters follow the task's in the Python signature and may be *pyoz.PyObject / ?*pyoz.PyObject, which PyOZ keeps alive until the step has run (and releases on cancellation). This covers work such as await compile_async(grammar, classes=module), where the compiled result must be bound to Python objects.
  • pyoz.func(...).withParams(...) makes ?T parameters optional. When the names cover every parameter, the optional ones may be omitted or passed by keyword, as .from functions already allowed. Before, every argument had to be passed positionally.

Fixed

  • Async results that never reached Python were dropped without cleanup. When an awaitable was cancelled after its task had finished (or while the task ignored cancellation), or the event loop was closed, the task's result was discarded: a PyOZ class returned by value never had __del__ run, and a returned *pyoz.PyObject leaked its reference. PyOZ now releases such results once the task has been joined. This applies to asyncFn, asyncMethod and the new asyncThen.

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