Repository navigation
Preserve Expat qualified names without namespace expansion - #9070
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Renamed it to stdlib_pyexpat.py in eaa8331. That filename did not already exist, so this is a 100% byte-identical rename; both reference/native snippet tests pass.
614deb3 to
7ac7f23
Compare
7ac7f23 to
6ce36ee
Compare
6ce36ee to
7f3638f
Compare
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] test: cpython/Lib/test/test_mmap.py (TODO: 19) dependencies: dependent tests: (2 tests)
Legend:
|
Retain raw element and attribute prefixes when namespace_separator is None. Keep expanded names and parser configuration unchanged, with regression coverage in the pyexpat snippet. Assisted-by: OpenAI Codex:model identifier unavailable
7f3638f to
d8a7620
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Current revision
Targets
mainafter #8950, with one logical commit:d8a7620ae8b971a85f87d095d78ba95b6c5bba96(parentd88c9350fb5de38b8c3be74ba8b53c8dd68a9b8f). The unique patch is byte-identical to the prior reviewed head and now includes main's merged #9082 shared CI fix; original author attribution and assistance trailers are retained. No files underLib/are changed.Normal hooks, whitespace checks, and independent tree/history review passed. The temporary
[skip ci]marker is removed and normal CI is enabled for this final head. No new local build or runtime test is claimed. Validation recorded below belongs to earlier revisions unless explicitly stated otherwise.Rebased once after #9082 merged to repair the shared Python 3.15 IO reference failure. Normal commit hooks and exact range-diff/patch-equivalence checks pass. Exact-head hosted CI is running; no additional local runtime validation is claimed.
Summary
Extract the independent raw-prefix branch from #8954's Expat name helper. When
namespace_separatoris omitted orNone, preserve qualified element and attribute names such asp:xandp:a. Existing namespace-expanded names remain unchanged.The four-line production change keeps the existing helper signature and all four call sites. It does not add namespace triplets, backend changes, namespace callbacks, or parser configuration changes.
Reference: CPython 3.14.8 ParserCreate contract, also present in 3.14.7.
Validation
The focused cases use one small in-memory ASCII document, fresh parsers, one final Parse call, and collecting handlers. No DTD, entity, file/network, unsupported triplet combination, or reentrant callback tests are involved.
Known backend differences in retaining root xmlns attributes and enforcing namespace bindings are outside this patch. The regression checks all element names and the complete child attribute container without claiming full non-namespace Expat parity.
Additional native validation passed: native build, all four focused cases, 2 reference/native pytest cases, and 5 unchanged canonical tests (namespace/ordered-attribute properties, legal/empty separator construction, and plain-name interning). Stdlib and separate C-API Clippy passed with warnings denied.
The broader canonical Expat suite was not run because it includes unrelated DTD/entity/lifecycle tests. Full workspace and non-Linux runtime validation were not run locally. hosted CI is temporarily skipped.