What's Changed
This release adds support for several typing constructs, such as:
- Using
@overload
decorators will allow generation of overloads in reflected code - Support for
T | None
union asOptional[T]
Source Generator
- Ensure that functions marked with
typing.overload
are reflected by @tonybaloney in #511
Typing Improvements
- Support for
T | None
union asOptional[T]
by @atifaziz in #502 - Allow parsing of PEP586 Literal types by @tonybaloney in #519
- Support octal constants and render them as hexadecimal values in generated code by @tonybaloney in #509
- Add support for
Union
types, including pipe syntax by @atifaziz in #524 - Add
...
as a possible default value for use in type stubs by @tonybaloney in #540 - Return
Task
for async function returningNone
by @atifaziz in #548
Bug Fixes
- Fix nullability of default value types by @tonybaloney in #529
- Fix overload tests to reflect what's generated by @atifaziz in #515
- Don't generate parameter defaults on unsupported types by @tonybaloney in #513
- Fix bug when positional args with defaults are following by a * then a keyword-only parameter without a default by @tonybaloney in #556
- Fix multi line trailing comma not tokenizing as a closing parenthesis by @tonybaloney in #523
- Fix bug in TensorSpan and ReadOnlyTensorSpan Length correctly as item length not byte length by @tonybaloney in #552
- Ensure
null
default literal is never generated for a non-ref type by @tonybaloney in #535 - Correct spelling of hexadecimal by @tonybaloney in #555
- Ensure overloads for nullable and non-nullable equivalent types are not generated by @tonybaloney in #533
Other
- Upgrade to Aspire 9.3 and dependency cleanup by @buvinghausen in #526
- Fix optionality of weather demo arguments by @atifaziz in #501
- Mention
T | None
in support types doc by @atifaziz in #503 - Retry generated code snapshot match up to 3 times (ARM flakiness) by @atifaziz in #521
- Run approval tests sequentially to prevent file race conditions by @atifaziz in #525
- Qualify logger field in generated code to avoid conflict by @atifaziz in #517
- Bump Basic.Reference.Assemblies and 16 others by @dependabot in #506
- Add public API control by @atifaziz in #530
- Bump BenchmarkDotNet and 3 others by @dependabot in #531
- Add
PyBuffer
finalizer to prevent potential leaks by @atifaziz in #544 - Address # in line being removed as comment by @tonybaloney in #54
- Bump BenchmarkDotNet and Superpower by @dependabot in #553
Full Changelog: v1.0.35...v1.1.0