Skip to content

v1.0.35

Compare
Choose a tag to compare
@tonybaloney tonybaloney released this 05 Jun 09:21
· 233 commits to main since this release
80d6483

What's Changed

Major updates

Simple Async return Syntax

Simple async return type syntax is now supported. Where previously you needed to annotate a function as Coroutine[TYield, TSend, TReturn] the source generator supports simple return types, e.g.:

async def example() -> list[int]: 
   ... 

Package install API

If you need to install a single, or multiple packages at runtime using pip or uv pip you can use the IPythonPackageInstaller .InstallPackageand.InstallPackages` methods. See docs for more details

Disable Signal Handlers

Python will automatically install signal handlers to capture CTRL+C (SIGINT) or SIGTERM. There is now an extension method on IPythonEnvironmentBuilder to .DisableSignalHandlers() see docs for an example. This feature is opt-in, so the default remains that Python will handle SIGINT whilst Python has been activated. Carefully consider where in your process you want to handle SIGINT.

Better error reporting in source generation

If the source generator sees invalid syntax, it will now provide more robust and detailed reporting, see #395 for more details.

Dev Updates

Bug Fixes

  • Add missing disposal of buffer exporters in proxies by @atifaziz in #488
  • Discard result when function returns None by @atifaziz in #493
  • Fix Python parameter parsing to reject invalid syntax by @atifaziz in #395
  • Fix bug where Python arg name was used on C# side by @atifaziz in #498

New Contributors

Full Changelog: v1.0.34...v1.0.35