Fix Python XML nullable result declarations - #209
Open
leileizhang (lei9444) wants to merge 3 commits into
Open
leileizhang (lei9444) wants to merge 3 commits into
leileizhang (lei9444) wants to merge 3 commits into
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>
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
Windows.Data.Xml.DomPython stubs promise non-null values that native APIs return asNone. Both strict checkers acceptXmlDocument().document_element.tag_name, but an empty document raisesAttributeError.Fix
Add nine exact reviewed XML null-result facts and seven documented-class → declaring-interface aliases through the unchanged MicrosoftDocs pin
8448d5eecfbc2ed903f659f350841dcb4888bc8b. Preserve class facts; validate exact CLR signatures, SDK declaring owners andExclusiveTorelationships. Cover document root/DTD, node ownership/navigation, and attribute lookup/previous-attribute results, including namespace-aware variants.No global nullable policy, native/runtime, JSON, JS projection, or release/version changes. Separate CI-only/test-harness commits fix the authorized unchanged audio-fixture formatting and isolate native SDK/source-stub checks; native signatures and bodies remain unchanged.
Verification
Independent base:
de91e9b3889aafdda44098d5ea1b731f9976a3c6; head:8da77328c86a9725047cf95365e05c6932c656c2.Exact-head Build, coverage, and Python artifacts pass, including the enforced x64 XML native + strict mypy/Pyright step and full hosted codegen suite. Strict consumers reject exactly 20 unsafe accesses and accept guarded reads/nonnullable controls. Independently main-built CPython 3.13 ARM64 and x64 wheels cover empty/loaded/internal-DTD documents, detached/attached nodes, sibling boundaries, and missing/present/added/replaced attributes with explicitly boxed namespace URIs. Pinned extraction reproduces byte-identically twice.
Local Python: 631 passed, 14 known WinUI fixture skips; CI/extraction: 25 passed. All 296 generated JS/ESM/TypeScript declaration files and 372 Python runtime/
--no-pyimodules are byte-identical; only 13 XML.pyimodules change.Limitations
The local full codegen attempt reaches 1,025 passes/one ignore, then hits an existing non-XML deep-path import with
LongPathsEnabled=0; this local attempt is not claimed green, although the full hosted suite passes. Exclusive-interface coverage uses actual parsed metadata and standalone renderer/QI views, not public--class-name IXmlDocument/IXmlElementroot support. Local x64 native execution is emulated on ARM64; no UI dependencies are introduced.