Repository navigation
Fix Python XML nullable result declarations - #209
Merged
Merged
Conversation
Record exact reviewed Windows XML null results and declaring-interface aliases in the pinned documentation extraction flow. Cover SDK owner/signature matching, strict consumers, and scoped native XML states without changing runtime or JS output. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CI-only compatibility: accept optional trailing commas and format the two existing audio stub macro calls required by hosted Rust 1.99. Apply only the explicitly reviewed fixture delta; native signatures, function bodies, and XML product changes are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mixed-language test coverageWorkflow status: ✅ Passed
|
Use the native SDK contract shared by null-fact tests instead of the unrelated CLR Facade override used by TypeScript jobs, and reuse existing sibling expansion. Exercise source stubs in pre-wheel static phases, preserve extra source paths, and additionally typecheck installed runtime stubs when present. Keep native XML and strict checker requirements enforced in the production E2E lane. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
shisan (qiutongMS)
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Some Python XML DOM stubs declare non-null results that Windows returns as
None. Strict mypy and Pyright acceptXmlDocument().document_element.tag_name, although an empty document raisesAttributeError.Fix and compatibility
Add reviewed nullable facts for document root/DTD, node ownership/navigation and attribute lookup/replacement results. Exact aliases connect documented runtime-class members to their declaring interfaces, with SDK owner and full signature validation. The fact table is regenerated reproducibly from the existing pinned official documentation.
Only the affected XML
.pyiresults become nullable: callers must guard them before dereferencing. Runtime null conversion, inline/--no-pyibehavior, the general nullability policy and JavaScript output are unchanged. This does not add explicit CLI-root support for exclusiveIXmlDocument/IXmlElementinterfaces.Verification
.pyimodules; 372 Python runtime modules and 296 JS/ESM/TypeScript files remain byte-identical.Local x64 tests use Windows ARM64 emulation. Test harnesses use native SDK contracts and tracked or independently installed stubs; no ignored build artifacts are required.