Skip to content

Commit c533354

Browse files
Use icu_casemap over unicode-casing for titles
`icu_casemap` is consistently maintained, official, and tracks the latest Unicode versions. RustPython is also using other `icu4x` crates, so using `icu_casemap` is more consistent. As with islower and isupper, tracking the latest Unicode version is important because character definitions shift over time which causes discrepancies between RustPython and CPython.
1 parent 46e2f5f commit c533354

3 files changed

Lines changed: 37 additions & 0 deletions

File tree

‎Cargo.lock‎

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ strum = "0.28"
222222
strum_macros = "0.28"
223223
syn = "2"
224224
thiserror = "2.0"
225+
icu_casemap = "2"
225226
icu_properties = "2"
226227
icu_normalizer = "2"
227228
unicode-casing = "0.1.1"
@@ -230,6 +231,7 @@ unicode_names2 = "2.0.0"
230231
widestring = "1.2.0"
231232
windows-sys = "0.61.2"
232233
wasm-bindgen = "0.2.106"
234+
writeable = "0.6"
233235

234236
# Lints
235237

‎crates/vm/Cargo.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ timsort = "0.1.2"
8686
# TODO: use unic for this; needed for title case:
8787
# https://github.com/RustPython/RustPython/pull/832#discussion_r275428939
8888
unicode-casing = { workspace = true }
89+
icu_casemap = { workspace = true }
8990
icu_properties = { workspace = true }
91+
writeable = { workspace = true }
9092

9193
[target.'cfg(unix)'.dependencies]
9294
rustix = { workspace = true }

0 commit comments

Comments
 (0)