Repository navigation
Match namereplace private name records to CPython UCD tables - #9827
youknowdot wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Merging this PR will not alter performance
Comparing Footnotes
|
|
@joshuamegnauth54 could you review this patch? |
9304be8 to
255aa03
Compare
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
LGTM. The patch is referencing this code: https://github.com/python/cpython/blob/11eed559c09ecfaddd87dbf9c10fbe742f0f57de/Tools/unicode/makeunicodedata.py#L1136-L1172 I think it may help fix some of the EAW discrepancies that I couldn't figure out as well. |
Summary
Port CPython 3.15's UCD-file-order private name records used by
namereplace.CPython's
Tools/unicode/makeunicodedata.pyplaces name aliases at U+F0000 and named sequences at U+F0200. Its private getname callback includes these records fornamereplace, while publicunicodedata.nameexcludes them. Generate equivalent ordered tables from the already vendored UCD files, keeping existing public lookups unchanged.For example U+F0000 now produces
\N{NULL}and U+F0200 produces\N{KEYCAP NUMBER SIGN}, rather than numeric escapes.Validation
name(..., None)and out-of-range boundaries.cargo test -p rustpython-unicode --all-features: 5 passed.cargo check -p rustpython-commonpassed.Scope
This does not fix the two remaining
test_unicodedataexpected failures concerning lazy module import/reload and compiler name escapes. Those markers remain unchanged. Proper shared provider lifecycle and Ruff parser callback need separate work, without accepting unsafe foreign pointers or introducing a fake capsule ABI. The casing/checksum fix is separate in #9824; no casing logic is duplicated here.Summary by CodeRabbit