Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ rustpython-vm = { path = "crates/vm", default-features = false, version = "0.5.0
rustpython-pylib = { path = "crates/pylib", version = "0.5.0" }
rustpython-stdlib = { path = "crates/stdlib", default-features = false, version = "0.5.0" }
rustpython-sre_engine = { path = "crates/sre_engine", version = "0.5.0" }
rustpython-unicode = { path = "crates/unicode", version = "0.5.0" }
rustpython-wtf8 = { path = "crates/wtf8", version = "0.5.0" }
rustpython-doc = { path = "crates/doc", version = "0.5.0" }

Expand All @@ -192,12 +193,12 @@ der = { version = "0.8", features = ["alloc", "oid", "pem", "zeroize"] }
phf = { version = "0.14.0", default-features = false, features = ["macros"]}
adler32 = "1.2.0"
approx = "0.5.1"
ascii = "1.1"
ascii = { version = "1.1", default-features = false }
base64 = "0.22"
blake2 = "0.11.0-rc.6"
bitflags = "2.11.0"
bitflagset = "0.0.3"
bstr = "1"
bstr = { version = "1", default-features = false, features = ["unicode"] }
bzip2 = "0.6"
chrono = { version = "0.4.44", default-features = false, features = ["clock", "std"] }
console_error_panic_hook = "0.1"
Expand Down Expand Up @@ -227,7 +228,7 @@ hexf-parse = "0.2.1"
hmac = "0.13"
indexmap = { version = "2.14.0", features = ["std"] }
insta = "1.47"
itertools = "0.15.0"
itertools = { version = "0.15.0", default-features = false, features = ["use_alloc"] }
is-macro = "0.3.7"
js-sys = "0.3"
junction = "2.0.0"
Expand All @@ -248,7 +249,7 @@ malachite-bigint = "0.9.1"
malachite-q = "0.9.1"
malachite-base = "0.9.1"
md-5 = "0.11"
memchr = "2.8.1"
memchr = { version = "2.8.1", default-features = false, features = ["alloc"] }
memmap2 = "0.9.10"
mt19937 = "3.3"
num-complex = "0.4.6"
Expand Down Expand Up @@ -310,7 +311,7 @@ icu_locale = "2"
icu_properties = "2"
icu_normalizer = "2"
uuid = "1.23.2"
unicode_names2 = "3"
unicode_names2 = { version = "3", default-features = false, features = ["no_std"] }
widestring = "1.2.0"
windows-sys = "0.61.2"
wasm-bindgen = "0.2.106"
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_pkgutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ def test_walk_packages_raises_on_string_or_bytes_input(self):
with self.assertRaises((TypeError, ValueError)):
list(pkgutil.walk_packages(bytes_input))

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_name_resolution(self):
import logging
import logging.handlers
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_re.py
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,6 @@ def test_bug_817234(self):
self.assertEqual(next(iter).span(), (4, 4))
self.assertRaises(StopIteration, next, iter)

@unittest.expectedFailure # TODO: RUSTPYTHON
def test_bug_6561(self):
# '\d' should match characters in Unicode category 'Nd'
# (Number, Decimal Digit), but not those in 'Nl' (Number,
Expand Down
2 changes: 1 addition & 1 deletion crates/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
[dependencies]
rustpython-compiler-core = { workspace = true }
rustpython-literal = {workspace = true }
rustpython-unicode = { workspace = true }
rustpython-wtf8 = { workspace = true }
ruff_python_ast = { workspace = true }
ruff_text_size = { workspace = true }

bitflags = { workspace = true }
indexmap = { workspace = true }
itertools = { workspace = true }

Check warning on line 25 in crates/codegen/Cargo.toml

View workflow job for this annotation

GitHub Actions / cargo shear

shear/unused_feature_dependency

dependency `itertools` only used in features
log = { workspace = true }
num-complex = { workspace = true }
num-traits = { workspace = true }
Expand All @@ -29,7 +30,6 @@
malachite-bigint = { workspace = true }
memchr = { workspace = true }
rapidhash = { workspace = true }
unicode_names2 = { workspace = true }

[dev-dependencies]
ruff_python_parser = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/codegen/src/string_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl StringParser {
let name_and_ending = self.skip_bytes(close_idx + 1);
let name = &name_and_ending[..name_and_ending.len() - 1];

unicode_names2::character(name).ok_or_else(|| unreachable!())
rustpython_unicode::lookup_character(name).ok_or_else(|| unreachable!())
}

/// Parse an escaped character, returning the new character.
Expand Down
2 changes: 1 addition & 1 deletion crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ wasm_js = ["getrandom/wasm_js"]

[dependencies]
rustpython-literal = { workspace = true }
rustpython-unicode = { workspace = true }
rustpython-wtf8 = { workspace = true }

ascii = { workspace = true }
Expand All @@ -28,7 +29,6 @@ malachite-q = { workspace = true }
malachite-base = { workspace = true }
num-traits = { workspace = true }
parking_lot = { workspace = true, optional = true }
unicode_names2 = { workspace = true }
radium = { workspace = true }

lock_api = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/encodings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ pub mod errors {
let mut out = String::with_capacity(num_chars * 4);
for c in err_str.code_points() {
let c_u32 = c.to_u32();
if let Some(c_name) = c.to_char().and_then(unicode_names2::name) {
if let Some(c_name) = c.to_char().and_then(rustpython_unicode::character_name) {
write!(out, "\\N{{{c_name}}}").unwrap();
} else if c_u32 >= 0x10000 {
write!(out, "\\U{c_u32:08x}").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/literal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ license = { workspace = true }
rust-version = { workspace = true }

[dependencies]
rustpython-unicode = { workspace = true }
rustpython-wtf8 = { workspace = true }

hexf-parse = { workspace = true }
is-macro.workspace = true
lexical-parse-float = { workspace = true, features = ["format"] }
num-traits = { workspace = true }
icu_properties = { workspace = true }

[dev-dependencies]
rand = { workspace = true }
26 changes: 0 additions & 26 deletions crates/literal/src/char.rs

This file was deleted.

4 changes: 2 additions & 2 deletions crates/literal/src/escape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl UnicodeEscape<'_> {
'\\' | '\t' | '\r' | '\n' => 2,
ch if ch < ' ' || ch as u32 == 0x7f => 4, // \xHH
ch if ch.is_ascii() => 1,
ch if crate::char::is_printable(ch) => {
ch if rustpython_unicode::classify::is_repr_printable(ch) => {
// max = std::cmp::max(ch, max);
ch.len_utf8()
}
Expand Down Expand Up @@ -238,7 +238,7 @@ impl UnicodeEscape<'_> {
ch if ch.is_ascii() => {
write!(formatter, "\\x{:02x}", ch as u8)
}
ch if crate::char::is_printable(ch) => formatter.write_char(ch),
ch if rustpython_unicode::classify::is_repr_printable(ch) => formatter.write_char(ch),
'\0'..='\u{ff}' => {
write!(formatter, "\\x{:02x}", ch as u32)
}
Expand Down
1 change: 0 additions & 1 deletion crates/literal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

extern crate alloc;

pub mod char;
pub mod complex;
pub mod escape;
pub mod float;
Expand Down
2 changes: 1 addition & 1 deletion crates/sre_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ name = "benches"
harness = false

[dependencies]
rustpython-unicode = { workspace = true }
rustpython-wtf8 = { workspace = true }
num_enum = { workspace = true }
bitflags = { workspace = true }
optional = { workspace = true }
icu_properties = { workspace = true }

[dev-dependencies]
criterion = { workspace = true }
Expand Down
Loading
Loading