Repository navigation
Align Unicode lookup and decomposition with CPython 3.15 - #9476
youknowdot wants to merge 2 commits into
Conversation
Validate Unicode names instead of accepting loose dependency matching, preserve old-UCD alias and sequence restrictions without filtering ordinary names, and match CPython's Hangul and historical-membership decomposition behavior. Remove the incorrect historical correction override and refresh four related unicodedata test markers using update_lib. Leave normalization unchanged. Assisted-by: OpenAI Codex: model version unavailable
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] test: cpython/Lib/test/test_unicodedata.py (TODO: 7) dependencies: dependent tests: (no tests depend on unicode) Legend:
|
Merging this PR will not alter performance
Comparing Footnotes
|
Match CPython's old-UCD width policy: retain modern width defaults for characters still unassigned, and use the historical table for assigned characters. Restore the bounded east Asian width tests and retire the obsolete 9.0 override through update_lib. Permit explicit exact-source retirement of unconditional skip markers in the existing updater path, preserving its exact-match and consumed-once guards. Add focused tool tests for successful and rejected retirements. Assisted-by: OpenAI Codex: model version unavailable
youknowone
left a comment
There was a problem hiding this comment.
review this again if it is aligned to 3.2.0 feature well
|
In response to the 3.2 feature review: I rechecked the 3.2 feature against pinned CPython source and our actual old data. #9476 targets CPython's
The earlier scoped comparisons covered 120 lookup/decomposition rows and 100 EAW/property rows across both views, on their respective implementation heads. This review additionally checked 27 finite source-table boundaries, not an exhaustive sweep or new runtime run. Importantly, RustPython's pre-existing |
Summary
unicode_names2against canonical names, while preserving exact case-insensitive alias and named-sequence lookup. Reject loose whitespace/hyphen matching and noncanonical CJK hexadecimal names.lookup()rejects aliases/sequences but accepts ordinary names from the shared database;name()anddecomposition()retain historical membership checks.scripts/update_lib migrateto retire four relatedtest_unicodedatamarkers while preserving the other nine adaptations.Sources: pinned CPython
lookup,decomposition, and canonical tests.Validation and limits
-D warnings) and build succeeded.test_unicodedatamethods passed in both interpreters. Of twelve selected canonical tests, CPython passed twelve; RustPython passed eleven and retained one pre-existing expected failure intest_ucn.test_tangut_ideographs. The strict wrapper therefore exited 1, not a full-suite pass.ast.literal_eval/compileUnicode-name literalSyntaxError, notunicodedata.lookup. Its decorator and test body remain unchanged; direct Tangut lookup is covered by the passing differential observations.No full Unicode sweep, full workspace/CAPI suite, normalization corpus or cross-platform runtime validation was performed. This does not claim full Unicode or parser compatibility.
AI assistance: OpenAI Codex (model version unavailable), disclosed in the commit trailer. Automated validation is not human review.