From 869658ae9b971d47de2e43d50c2b00964bbeba5d Mon Sep 17 00:00:00 2001 From: "Leilei Zhang (from Dev Box)" Date: Thu, 29 Oct 2026 11:09:10 +0800 Subject: [PATCH 1/6] Prepare v0.1.0-preview.24 release notes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/release/RELEASE_NOTES.md | 87 ++---------------------------------- 1 file changed, 4 insertions(+), 83 deletions(-) diff --git a/eng/release/RELEASE_NOTES.md b/eng/release/RELEASE_NOTES.md index 7375c374..18a7e017 100644 --- a/eng/release/RELEASE_NOTES.md +++ b/eng/release/RELEASE_NOTES.md @@ -1,89 +1,10 @@ -## Prerelease v0.1.0-preview.23 - -This preview improves Python apartment lifetime safety, collection comparisons and write contracts, Object value conversion, and generated-package installation on Windows. It also strengthens Python callback, overload, and typing contracts, and fixes generated JavaScript/TypeScript interface inputs and async-with-progress Promises. These changes are relative to preview.22. - -## Packages and installation - -- `@microsoft/dynwinrt` - JavaScript/TypeScript runtime. -- `@microsoft/dynwinrt-codegen` - JavaScript/TypeScript code generator. -- `dynwinrt` - Native Python runtime. -- `dynwinrt-codegen` - Standalone Python code generator. - -- **Runtime platforms:** Windows x64 and ARM64. -- **JavaScript version:** Node.js 18 or later. -- **Python version:** CPython 3.11-3.14 for the runtime and generated bindings. -- **API availability:** Depends on the Windows version, installed SDK components, package identity, and hardware. -- **Package versions:** Use the same runtime and codegen version for each language. -- **Upgrade cleanup:** Clean old generated bindings before using the new version. - -```powershell -npm install @microsoft/dynwinrt@0.1.0-preview.23 -npm install -D @microsoft/dynwinrt-codegen@0.1.0-preview.23 -python -m pip install --pre "dynwinrt==0.1.0rc23" "dynwinrt-codegen==0.1.0rc23" -``` +## Prerelease v0.1.0-preview.24 ## Highlights -### Python apartment and native-owner safety - -- Release library-owned COM references before the final managed apartment close. `projected_lifetime_scope()` is optional. -- Block final apartment teardown inside synchronous native callbacks. Preserve guards for recovery. -- Keep nested initialization counts balanced, including initialization during cleanup. Preserve failed closes for retry. -- Reject wrong-thread apartment closes without changing state. Preserve dropped guards for owner-thread recovery. -- Refuse cleanup of unsafe pending async owners. Cleanup does not silently cancel work. - -Recover deferred guards with `RoApartment.recover_pending()` on the owner thread. Use `retry_pending_apartment_close()` for failed unnamed closes. - -### Python collections and Object values - -- Match class, interface, and raw references by COM identity in collection comparisons. Equality and hashing outside collections stay unchanged. -- Preserve mapping entry counts and ordinary Python value equality. Raw `Object` collections do not implicitly box or unbox. -- Align bulk-write input types with item assignment. Preserve native member names and dispatch. -- Return the stored read projection from `setdefault()`. Do not consume the caller's input. -- Add explicit Object boxing with `to_winrt_object()`. Generated Object positions remain native by default. -- Extend `unbox_object()` to DateTime, TimeSpan, geometry, and arrays. Retain exact WinRT types when requested. -- Add opt-in Object map views with `object_value_view()`. Reads unbox and writes box. `.raw` stays native. - -### Python projection contracts - -- Project typed delegate arguments from native signatures. Include typed `MapChanged` callbacks. -- Keep `.py` and `.pyi` overloads and aliases consistent. Accept compatible interface inputs through QueryInterface. -- Default `.pyi` outputs to non-null. Preserve supported nullable results, including XML DOM results. -- Reject native null in stock JSON writes before mutation. Keep valid nulls in custom generic collections. -- Validate interface construction and arrays before retaining native references. Reject Async receivers in `call_0()` and `call_1()`. -- Add named apartment constants and clearer runtime errors. -- Fix strict click-handler typing in both Python Tic-Tac-Toe samples. - -### Python package generation and Windows paths - -- Improve Windows installs with shorter module and staging paths. Keep public type names and namespace exports unchanged. -- Record the producer version in `.dynwinrt-generator.json`. Reject incompatible output before changing files. Keep same-version incremental generation. -- Warn when final generated paths reach the legacy Windows limit. - -### JavaScript/TypeScript and shared code generation - -- Reuse the projected Promise for repeated async-with-progress `.toPromise()` calls. Avoid duplicate native completion registration. -- Generate real interface-method aliases with matching TypeScript declarations. Keep existing overload dispatch unchanged. -- Handle explicitly selected non-generic WinRT delegates in JavaScript and Python. Reject malformed or open-generic delegate roots. +- **Python XAML string keys:** Generated WinUI and UWP `ResourceDictionary` bindings now accept Python strings directly, for example `resources.lookup("AccentButtonStyle")`, with matching type hints. ([#221](https://github.com/microsoft/dynwinrt/pull/221)) +- **Windows App SDK Bootstrap packaging:** Generated Python and Node.js packages can now include Bootstrap DLLs and SDK configuration using `--winappsdk-version` and repeatable `--winappsdk-bootstrap-path` options. Inputs may be DLL files or directories. After installing the generated Python package, or importing the generated Node.js package, call `init_winappsdk()` or `initWinappsdk()` without SDK version or DLL path arguments. ([#225](https://github.com/microsoft/dynwinrt/pull/225)) ## Upgrade notes -Upgrade runtime and codegen together. Regenerate bindings and rebuild/reinstall generated packages. Do not mix old bindings or stubs with the new runtime. - -- **Python lifecycle:** Balance each worker thread's apartment explicitly. `projected_lifetime_scope()` is optional. External COM references remain caller-owned. -- **Python regeneration:** Regenerate fully in a fresh or cleaned generated-output directory. Do not delete or edit only the producer stamp. Use namespace imports for shortened modules. -- **Python typing:** Regenerate `.py` and `.pyi` together. Guard nullable results before member access. SDK nullability facts are not universal. -- **Python collection defaults:** `setdefault()` returns the map's read projection. Raw `Object` maps return `DynWinRTValue | None`. Project or unbox results explicitly. -- **Python JSON:** Use `JsonValue.create_null_value()` for JSON null. Do not pass `None` to stock JSON collections. -- **Python Object conversion:** Plain `int` values box as Int32. Use tags or `PropertyType` for other types. Re-boxing does not preserve box identity. -- **JavaScript/TypeScript:** Regenerate wrappers for interface aliases and the progress Promise fix. A runtime-only upgrade does not update generated code. -- **Rust source compatibility:** Update exhaustive matches on `PropertyValueData` and `PropertyValueUnboxResult`. Handle new variants and `Unsupported(PropertyType)`. Keep `Null` and `NotPropertyValue` distinct. - -## Known boundaries - -- **Experimental APIs:** Classic COM, flat Win32, and WinUI hosting remain experimental. -- **Collection producers:** Architecture-specific support limits remain unchanged. -- **ARM64 WinUI:** Native live coverage remains incomplete. -- **Embedded hosts:** Stop new calls and settle in-flight callbacks. Call `shutdown_python_callbacks()` before `Py_FinalizeEx`. Skipping this protocol leaves only best-effort protection. - -For details, see the [Python runtime guide](https://github.com/microsoft/dynwinrt/blob/main/bindings/py/README.md), [Python codegen path guidance](https://github.com/microsoft/dynwinrt/blob/main/tools/dynwinrt-codegen/python/README.md#windows-path-length), and the [project README](https://github.com/microsoft/dynwinrt#readme). +Upgrade runtime and codegen together, then regenerate and reinstall your bindings. The Windows App Runtime must still be installed; applications remain responsible for COM initialization. From 89a4f344e0f0ade871e0bf7e3805a9a56244689e Mon Sep 17 00:00:00 2001 From: "Leilei Zhang (from Dev Box)" Date: Fri, 30 Oct 2026 13:39:16 +0800 Subject: [PATCH 2/6] Preserve standard release package guidance Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/release/RELEASE_NOTES.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/release/RELEASE_NOTES.md b/eng/release/RELEASE_NOTES.md index 64e4dcb5..2d57d8df 100644 --- a/eng/release/RELEASE_NOTES.md +++ b/eng/release/RELEASE_NOTES.md @@ -9,12 +9,12 @@ This preview improves Python package installation, async notification handling, - `dynwinrt` - Native Python runtime. - `dynwinrt-codegen` - Standalone Python code generator. -- **Runtime platforms:** Windows 10/11, x64 and ARM64. +- **Runtime platforms:** Windows x64 and ARM64. - **JavaScript version:** Node.js 18 or later. -- **Python version:** CPython 3.11-3.14 for the runtime and generated bindings. The standalone generator supports Python 3.8-3.14. -- **Metadata and API availability:** Codegen needs `.winmd` metadata and can auto-detect an installed Windows SDK. Available APIs depend on Windows, installed components, package identity, permissions, and hardware. -- **Package versions:** Use the matching runtime and codegen release for each language. -- **Upgrade cleanup:** Fully regenerate old bindings in a fresh or cleaned codegen-owned output directory, then rebuild/reinstall them. +- **Python version:** CPython 3.11-3.14 for the runtime and generated bindings. +- **API availability:** Depends on the Windows version, installed SDK components, package identity, and hardware. +- **Package versions:** Use the same runtime and codegen version for each language. +- **Upgrade cleanup:** Clean old generated bindings before using the new version. Installation commands for this preview, once published: From 80e464b5206276b62b37e706a8f92fb7712232e2 Mon Sep 17 00:00:00 2001 From: "Leilei Zhang (from Dev Box)" Date: Fri, 30 Oct 2026 14:01:33 +0800 Subject: [PATCH 3/6] Give each release highlight a feature-specific heading Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/release/RELEASE_NOTES.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/eng/release/RELEASE_NOTES.md b/eng/release/RELEASE_NOTES.md index 2d57d8df..94f1e7e5 100644 --- a/eng/release/RELEASE_NOTES.md +++ b/eng/release/RELEASE_NOTES.md @@ -26,7 +26,7 @@ python -m pip install --pre "dynwinrt==0.1.0rc24" "dynwinrt-codegen==0.1.0rc24" ## Highlights -### Python package installation and typing +### Python src package layout - Generate standard `src/` packages so editable installations expose modules and type stubs to editors and static type checkers without custom import hooks. The outer `--output` directory remains the installable project; installed import names do not change. ([#228](https://github.com/microsoft/dynwinrt/pull/228)) @@ -35,17 +35,29 @@ python -m pip install --pre "dynwinrt==0.1.0rc24" "dynwinrt-codegen==0.1.0rc24" - Include Bootstrap DLLs, SDK configuration, and redistribution notices in generated Python and Node.js packages using `--winappsdk-version` and repeatable `--winappsdk-bootstrap-path` options. Inputs may be DLL files or directories; directories are searched recursively. The version is the stable SDK product `MAJOR.MINOR`, not a NuGet servicing version. ([#225](https://github.com/microsoft/dynwinrt/pull/225)) - Call `init_winappsdk()` without version or DLL path arguments after installing the generated Python package, or `initWinappsdk()` after importing the generated Node.js package. Resources are package-relative, independent of the working directory. Existing explicit-version initialization remains available. -### Python async notifications and resource cleanup +### Python AsyncEventScope notifications - Add `AsyncEventScope` for async handlers attached through existing `subscribe_*` methods to same-thread notifications. Normal exit removes subscriptions and waits for accepted tasks without cancelling them; handler/body failures cancel sibling tasks and wait for cleanup using `asyncio.TaskGroup` semantics. Unsubscribing does not cancel already accepted tasks. ([#229](https://github.com/microsoft/dynwinrt/pull/229)) + +### Python interface close() and with support + - Add `close()` and `with` helpers to interfaces with an `IClosable` requirement, including `IInputStream`, `IOutputStream`, and `IRandomAccessStream`, without replacing native members. Context entry preserves the wrapper type; exit closes the resource without suppressing application exceptions. Existing concrete-class cleanup behavior is unchanged. ([#233](https://github.com/microsoft/dynwinrt/pull/233)) -### Python API usability and correctness +### Python XAML string keys + +- WinUI and UWP `ResourceDictionary` bindings accept Python strings for key operations, for example `resources.lookup("AccentButtonStyle")`, with matching type hints. Object results and enumerated keys remain raw; this is not general implicit Object boxing. ([#221](https://github.com/microsoft/dynwinrt/pull/221)) + +### Python constructor error diagnostics + +- Failed constructor matching reports supplied argument types and keyword names alongside candidate signatures using the generated Python names and types. Argument values are not included, and native activation/conversion failures keep their existing behavior. ([#230](https://github.com/microsoft/dynwinrt/pull/230)) + +### Nullable Python DetachStream return types + +- `DataWriter.detach_stream()` and `DataReader.detach_stream()` are accurately typed as `IOutputStream | None` and `IInputStream | None`, including their declaring-interface projections. An unbound writer, a buffer-backed reader, or a repeated detach can return `None`; native behavior is unchanged. ([#231](https://github.com/microsoft/dynwinrt/pull/231)) + +### Python from_bytes() crash fix after apartment teardown -- **XAML string keys:** WinUI and UWP `ResourceDictionary` bindings accept Python strings for key operations, for example `resources.lookup("AccentButtonStyle")`, with matching type hints. Object results and enumerated keys remain raw; this is not general implicit Object boxing. ([#221](https://github.com/microsoft/dynwinrt/pull/221)) -- **Constructor diagnostics:** Failed constructor matching reports supplied argument types and keyword names alongside candidate signatures using the generated Python names and types. Argument values are not included, and native activation/conversion failures keep their existing behavior. ([#230](https://github.com/microsoft/dynwinrt/pull/230)) -- **Stream nullability:** `DataWriter.detach_stream()` and `DataReader.detach_stream()` are accurately typed as `IOutputStream | None` and `IInputStream | None`, including their declaring-interface projections. An unbound writer, a buffer-backed reader, or a repeated detach can return `None`; native behavior is unchanged. ([#231](https://github.com/microsoft/dynwinrt/pull/231)) -- **Buffer creation:** Fix a crash when `from_bytes()` is used again after complete COM apartment teardown. Buffer creation no longer retains a stale activation factory across apartments; copied-byte semantics are unchanged. ([#232](https://github.com/microsoft/dynwinrt/pull/232)) +- Fix a crash when `from_bytes()` is used again after complete COM apartment teardown. Buffer creation no longer retains a stale activation factory across apartments; copied-byte semantics are unchanged. ([#232](https://github.com/microsoft/dynwinrt/pull/232)) ## Upgrade notes From 0a8b2ea6f6b312b053030b41dfe3a692b45f6ff7 Mon Sep 17 00:00:00 2001 From: "Leilei Zhang (from Dev Box)" Date: Fri, 30 Oct 2026 14:08:42 +0800 Subject: [PATCH 4/6] Shorten release feature descriptions Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/release/RELEASE_NOTES.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/eng/release/RELEASE_NOTES.md b/eng/release/RELEASE_NOTES.md index 94f1e7e5..b7d45cce 100644 --- a/eng/release/RELEASE_NOTES.md +++ b/eng/release/RELEASE_NOTES.md @@ -28,36 +28,35 @@ python -m pip install --pre "dynwinrt==0.1.0rc24" "dynwinrt-codegen==0.1.0rc24" ### Python src package layout -- Generate standard `src/` packages so editable installations expose modules and type stubs to editors and static type checkers without custom import hooks. The outer `--output` directory remains the installable project; installed import names do not change. ([#228](https://github.com/microsoft/dynwinrt/pull/228)) +- Generated Python packages use a standard `src` layout so editable installs work with static type checkers. ([#228](https://github.com/microsoft/dynwinrt/pull/228)) ### Windows App SDK Bootstrap packaging -- Include Bootstrap DLLs, SDK configuration, and redistribution notices in generated Python and Node.js packages using `--winappsdk-version` and repeatable `--winappsdk-bootstrap-path` options. Inputs may be DLL files or directories; directories are searched recursively. The version is the stable SDK product `MAJOR.MINOR`, not a NuGet servicing version. ([#225](https://github.com/microsoft/dynwinrt/pull/225)) -- Call `init_winappsdk()` without version or DLL path arguments after installing the generated Python package, or `initWinappsdk()` after importing the generated Node.js package. Resources are package-relative, independent of the working directory. Existing explicit-version initialization remains available. +- Generated Python and Node.js packages can include Bootstrap DLLs and SDK configuration for initialization without hard-coded versions or DLL paths. ([#225](https://github.com/microsoft/dynwinrt/pull/225)) ### Python AsyncEventScope notifications -- Add `AsyncEventScope` for async handlers attached through existing `subscribe_*` methods to same-thread notifications. Normal exit removes subscriptions and waits for accepted tasks without cancelling them; handler/body failures cancel sibling tasks and wait for cleanup using `asyncio.TaskGroup` semantics. Unsubscribing does not cancel already accepted tasks. ([#229](https://github.com/microsoft/dynwinrt/pull/229)) +- `AsyncEventScope` manages async handlers for same-thread notifications and cleans up their subscriptions and tasks. ([#229](https://github.com/microsoft/dynwinrt/pull/229)) ### Python interface close() and with support -- Add `close()` and `with` helpers to interfaces with an `IClosable` requirement, including `IInputStream`, `IOutputStream`, and `IRandomAccessStream`, without replacing native members. Context entry preserves the wrapper type; exit closes the resource without suppressing application exceptions. Existing concrete-class cleanup behavior is unchanged. ([#233](https://github.com/microsoft/dynwinrt/pull/233)) +- Closable stream interfaces such as `IRandomAccessStream` now support `close()` and `with` for resource cleanup. ([#233](https://github.com/microsoft/dynwinrt/pull/233)) ### Python XAML string keys -- WinUI and UWP `ResourceDictionary` bindings accept Python strings for key operations, for example `resources.lookup("AccentButtonStyle")`, with matching type hints. Object results and enumerated keys remain raw; this is not general implicit Object boxing. ([#221](https://github.com/microsoft/dynwinrt/pull/221)) +- WinUI and UWP `ResourceDictionary` bindings now accept Python string keys, with matching type hints. ([#221](https://github.com/microsoft/dynwinrt/pull/221)) ### Python constructor error diagnostics -- Failed constructor matching reports supplied argument types and keyword names alongside candidate signatures using the generated Python names and types. Argument values are not included, and native activation/conversion failures keep their existing behavior. ([#230](https://github.com/microsoft/dynwinrt/pull/230)) +- Python constructor matching errors now show supplied argument types and accepted signatures. ([#230](https://github.com/microsoft/dynwinrt/pull/230)) ### Nullable Python DetachStream return types -- `DataWriter.detach_stream()` and `DataReader.detach_stream()` are accurately typed as `IOutputStream | None` and `IInputStream | None`, including their declaring-interface projections. An unbound writer, a buffer-backed reader, or a repeated detach can return `None`; native behavior is unchanged. ([#231](https://github.com/microsoft/dynwinrt/pull/231)) +- Type hints for `DataWriter.detach_stream()` and `DataReader.detach_stream()` now correctly allow `None`. ([#231](https://github.com/microsoft/dynwinrt/pull/231)) ### Python from_bytes() crash fix after apartment teardown -- Fix a crash when `from_bytes()` is used again after complete COM apartment teardown. Buffer creation no longer retains a stale activation factory across apartments; copied-byte semantics are unchanged. ([#232](https://github.com/microsoft/dynwinrt/pull/232)) +- Fix a `from_bytes()` crash when COM is uninitialized and initialized again before creating another buffer. ([#232](https://github.com/microsoft/dynwinrt/pull/232)) ## Upgrade notes From 23b8e03325e6f50f9080f52ca91b519dbf11c6b1 Mon Sep 17 00:00:00 2001 From: "Leilei Zhang (from Dev Box)" Date: Fri, 30 Oct 2026 14:10:17 +0800 Subject: [PATCH 5/6] Shorten release boundary notes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/release/RELEASE_NOTES.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/release/RELEASE_NOTES.md b/eng/release/RELEASE_NOTES.md index b7d45cce..e16c244d 100644 --- a/eng/release/RELEASE_NOTES.md +++ b/eng/release/RELEASE_NOTES.md @@ -72,11 +72,11 @@ See the [Python layout migration contract](https://github.com/microsoft/dynwinrt ## Known boundaries -- **Bootstrap deployment:** Bundling Bootstrap DLLs does not install or include the complete Windows App Runtime. Applications using Bootstrap must deploy a matching Runtime, comply with the SDK's redistribution terms, initialize COM, and explicitly initialize Bootstrap. Importing configuration does not initialize either COM or Bootstrap. -- **Async notifications:** `AsyncEventScope` requires its creating OS thread and an application-driven, running asyncio loop. It does not marshal cross-thread events, run or integrate a WinUI message pump, or implement synchronous return, `Handled`, `Cancel`, or deferral semantics. -- **Experimental APIs:** Classic COM, flat Win32, and WinUI hosting remain experimental. Python generation still targets WinRT, not Classic COM or flat Win32. WinUI applications retain responsibility for UI threads and lifecycle; native ARM64 WinUI coverage remains incomplete. -- **Collection producers:** Existing architecture-specific ABI restrictions remain; see the [Python](https://github.com/microsoft/dynwinrt/blob/main/bindings/py/README.md#creating-winrt-collections) and [JavaScript](https://github.com/microsoft/dynwinrt/blob/main/bindings/js/README.md#creating-winrt-collections) support tables. -- **Windows paths:** The new source layout does not remove downstream Windows path-length limits. Keep generated-project and environment paths short; see the [path guidance](https://github.com/microsoft/dynwinrt/blob/main/tools/dynwinrt-codegen/python/README.md#windows-path-length). -- **Embedded hosts:** Stop new callbacks and settle in-flight work before calling `shutdown_python_callbacks()` on the live interpreter, then finalize Python. Skipping this protocol leaves only best-effort protection. - -For usage and lifetime details, see the [Python runtime guide](https://github.com/microsoft/dynwinrt/blob/main/bindings/py/README.md), [JavaScript runtime guide](https://github.com/microsoft/dynwinrt/blob/main/bindings/js/README.md), [async-events sample](https://github.com/microsoft/dynwinrt/tree/main/samples/python/async-events), and [project README](https://github.com/microsoft/dynwinrt#readme). +- **Bootstrap deployment:** Bundled DLLs do not install Windows App Runtime; apps using Bootstrap must handle Runtime deployment, COM/Bootstrap initialization, and SDK redistribution requirements. +- **Async notifications:** `AsyncEventScope` requires a running asyncio loop on its owning thread; it does not provide cross-thread marshalling, WinUI pump integration, or synchronous-return/deferral support. +- **Experimental APIs:** Classic COM, flat Win32, and WinUI hosting remain experimental; Python targets WinRT only, and native ARM64 WinUI validation remains limited. +- **Collection producers:** Architecture-specific restrictions remain; see the [Python](https://github.com/microsoft/dynwinrt/blob/main/bindings/py/README.md#creating-winrt-collections) and [JavaScript](https://github.com/microsoft/dynwinrt/blob/main/bindings/js/README.md#creating-winrt-collections) support tables. +- **Windows paths:** Keep generated-project and environment paths short; [Windows path-length limits](https://github.com/microsoft/dynwinrt/blob/main/tools/dynwinrt-codegen/python/README.md#windows-path-length) still apply. +- **Embedded hosts:** Stop new callbacks, drain in-flight work, then call `shutdown_python_callbacks()` before finalizing Python. + +Details: [Python runtime guide](https://github.com/microsoft/dynwinrt/blob/main/bindings/py/README.md), [JavaScript runtime guide](https://github.com/microsoft/dynwinrt/blob/main/bindings/js/README.md), [async-events sample](https://github.com/microsoft/dynwinrt/tree/main/samples/python/async-events), and [project README](https://github.com/microsoft/dynwinrt#readme). From a06d35e4ac0e761861306c1856bfe3cba39ab191 Mon Sep 17 00:00:00 2001 From: "Leilei Zhang (from Dev Box)" Date: Fri, 30 Oct 2026 14:11:34 +0800 Subject: [PATCH 6/6] Keep release upgrade notes concise Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- eng/release/RELEASE_NOTES.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/eng/release/RELEASE_NOTES.md b/eng/release/RELEASE_NOTES.md index e16c244d..f271b777 100644 --- a/eng/release/RELEASE_NOTES.md +++ b/eng/release/RELEASE_NOTES.md @@ -60,15 +60,14 @@ python -m pip install --pre "dynwinrt==0.1.0rc24" "dynwinrt-codegen==0.1.0rc24" ## Upgrade notes -Upgrade runtime and codegen together. Regenerate the complete bindings selection, including `.py` and `.pyi` files together, and rebuild/reinstall generated packages. Do not mix old bindings or stubs with the new runtime. +Upgrade runtime and codegen together, then regenerate and reinstall all bindings. -- **Python layout migration:** Clean the dedicated output directory or generate into a fresh one. Old flat-layout output is rejected even if its producer version matches; do not move selected files or edit/remove the producer stamp to bypass this check. -- **Installation and imports:** Continue installing the outer project, for example `python -m pip install .\generated` or `python -m pip install -e .\generated`. Keep imports such as `from generated.windows.foundation import Uri`; do not add `src` to the import name. Select the installation's environment in your editor/type checker. -- **Direct source imports:** Prefer a normal or editable installation over old `sys.path`/`PYTHONPATH` adjustments. Deliberate uninstalled imports now need `\src`, not `` or its parent. Source-only imports do not register the distribution metadata needed for Python Bootstrap discovery. -- **Nullable streams:** Save each `detach_stream()` result and check `is not None` before calling stream methods. -- **Cleanup ordering:** Keep COM apartments and captured projected lifetimes alive until `AsyncEventScope` has finished task cleanup. Closing a stream with `with` or `close()` closes its native resource; it does not replace projection release or apartment teardown. +- **Python layout:** Use a fresh or cleaned codegen-owned output directory; install the outer project, not `src`. Import names stay unchanged. +- **Direct source imports:** Point them at `\src`; Bootstrap discovery still requires installing the package. +- **Nullable streams:** Check `detach_stream()` results for `None`. +- **Async cleanup:** Keep COM apartments and projected lifetimes alive until `AsyncEventScope` exits. -See the [Python layout migration contract](https://github.com/microsoft/dynwinrt/blob/main/tools/dynwinrt-codegen/python/README.md#breaking-layout-upgrade-from-preview23-and-earlier) for full regeneration, editable-install, and path guidance. +See the [Python layout migration contract](https://github.com/microsoft/dynwinrt/blob/main/tools/dynwinrt-codegen/python/README.md#breaking-layout-upgrade-from-preview23-and-earlier) for details. ## Known boundaries