v1.0.35
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
- Simple async return type syntax by @tonybaloney in #484
- Run type checkers in CI by @tonybaloney in #483
- Fix reload hashes in test snapshots by @atifaziz in #487
- Start work on a roadmap document by @tonybaloney in #477
- Add .NET 10 preview 4 to test pipelines by @tonybaloney in #472
- Upgrade to the new CreateApplicationBuilder .NET Generic Host by @copilot-swe-agent in #490
- Migrate from xUnit 2.9.3 to xUnit 3 by @copilot-swe-agent in #492
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
- @copilot-swe-agent made their first contribution in #490
Full Changelog: v1.0.34...v1.0.35