Repository navigation
Align Unicode lookup and decomposition with CPython 3.15 - #9476
youknowone merged 3 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
|
Caution Review failedThe pull request is closed.
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. |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/weakref.py dependencies:
dependent tests: (219 tests)
[x] test: cpython/Lib/test/test_dict.py (TODO: 1) dependencies: dependent tests: (no tests depend on dict) [ ] test: cpython/Lib/test/test_free_threading (TODO: 1) dependencies: dependent tests: (no tests depend on free_threading) [x] test: cpython/Lib/test/test_grp.py (TODO: 1) dependencies: dependent tests: (195 tests)
[x] lib: cpython/Lib/imaplib.py dependencies:
dependent tests: (1 tests)
[ ] test: cpython/Lib/test/test_capi dependencies: dependent tests: (no tests depend on capi) [x] lib: cpython/Lib/functools.py dependencies:
dependent tests: (53 tests)
[x] lib: cpython/Lib/enum.py dependencies:
dependent tests: (18 tests)
[x] lib: cpython/Lib/sqlite3 dependencies:
dependent tests: (2 tests)
[ ] lib: cpython/Lib/io.py dependencies:
dependent tests: (105 tests)
[ ] test: cpython/Lib/test/test_pyrepl (TODO: 5) dependencies: dependent tests: (no tests depend on pyrepl) [x] lib: cpython/Lib/xml dependencies:
dependent tests: (39 tests)
[x] lib: cpython/Lib/test/libregrtest dependencies:
dependent tests: (no tests depend on regrtest) [x] lib: cpython/Lib/re dependencies:
dependent tests: (86 tests)
[x] lib: cpython/Lib/profiling dependencies:
dependent tests: (3 tests)
[x] lib: cpython/Lib/codecs.py dependencies:
dependent tests: (200 tests)
[x] lib: cpython/Lib/typing.py dependencies:
dependent tests: (22 tests)
[ ] test: cpython/Lib/test/test_metaclass.py (TODO: 4) dependencies: dependent tests: (no tests depend on metaclass) [ ] test: cpython/Lib/test/test_with.py dependencies: dependent tests: (no tests depend on with) [ ] test: cpython/Lib/test/test_cmd_line.py (TODO: 18) dependencies: dependent tests: (no tests depend on cmd_line) [ ] test: cpython/Lib/test/test_faulthandler.py (TODO: 4) dependencies: dependent tests: (5 tests)
[ ] test: cpython/Lib/test/test_unicodedata.py (TODO: 7) dependencies: dependent tests: (no tests depend on unicode) [x] lib: cpython/Lib/_pylong.py dependencies:
dependent tests: (no tests depend on int) [ ] test: cpython/Lib/test/test_set.py (TODO: 1) dependencies: dependent tests: (no tests depend on set) [ ] test: cpython/Lib/test/test_bytes.py (TODO: 11) dependencies: dependent tests: (no tests depend on bytes) [x] lib: cpython/Lib/compileall.py dependencies:
dependent tests: (1 tests)
[x] lib: cpython/Lib/collections dependencies:
dependent tests: (378 tests)
[x] test: cpython/Lib/test/test_sys.py (TODO: 4) dependencies: dependent tests: (250 tests)
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 |
8cb31d7 to
d194a68
Compare
Consolidate the generic marker-retirement helper and regression coverage in RustPython#9578. Preserve the Unicode implementation and whole-file test changes unchanged. Assisted-by: OpenAI Codex:model version not exposed
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. |
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.