Skip to content
Open
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
30 changes: 30 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
flamescope = { version = "0.1.2", optional = true }

rustls = { workspace = true, optional = true }
rustls-graviola = { workspace = true, optional = true }

Check warning on line 52 in Cargo.toml

View workflow job for this annotation

GitHub Actions / cargo shear

shear/misplaced_optional_dependency

misplaced optional dependency `rustls-graviola` (remove the `optional` flag and move to `[dev-dependencies]`)

[target.'cfg(windows)'.dependencies]
libc = { workspace = true }
Expand Down Expand Up @@ -332,6 +332,8 @@
x509-parser = "0.18"
xml = "1.2"
writeable = "0.6"
zstd = { version = "0.13", default-features = false, features = ["zdict_builder"] }
zstd-safe = { version = "7", default-features = false, features = ["zdict_builder"] }

# Lints

Expand Down
7 changes: 5 additions & 2 deletions Lib/test/test_zstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,11 @@ def test_unknown_compression_parameter(self):
with self.assertRaisesRegex(ValueError, pattern):
ZstdCompressor(options=option)

@unittest.skipIf(not SUPPORT_MULTITHREADING,
"zstd build doesn't support multi-threaded compression")
# TODO: RUSTPYTHON
@unittest.expectedFailureIf(
not SUPPORT_MULTITHREADING,
"TODO: RUSTPYTHON; libzstd built without multi-threaded compression support",
)
def test_zstd_multithread_compress(self):
size = 40*_1M
b = THIS_FILE_BYTES * (size // len(THIS_FILE_BYTES))
Expand Down
2 changes: 2 additions & 0 deletions crates/stdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

# tkinter
tk-sys = { workspace = true, optional = true }
tcl-sys = { workspace = true, optional = true }

Check warning on line 96 in crates/stdlib/Cargo.toml

View workflow job for this annotation

GitHub Actions / cargo shear

shear/unused_optional_dependency

unused optional dependency `tcl-sys`
widestring = { workspace = true, optional = true }
chrono.workspace = true

Expand All @@ -118,8 +118,8 @@
rustls = { workspace = true, default-features = false, features = ["std", "tls12"], optional = true }
rustls-native-certs = { workspace = true, optional = true }
rustls-pemfile = { workspace = true, optional = true }
rustls-platform-verifier = { workspace = true, optional = true }

Check warning on line 121 in crates/stdlib/Cargo.toml

View workflow job for this annotation

GitHub Actions / cargo shear

shear/unused_optional_dependency

unused optional dependency `rustls-platform-verifier`
x509-cert = { workspace = true, features = ["pem", "builder"], optional = true }

Check warning on line 122 in crates/stdlib/Cargo.toml

View workflow job for this annotation

GitHub Actions / cargo shear

shear/unused_optional_dependency

unused optional dependency `x509-cert`
x509-parser = { workspace = true, optional = true }
der = { workspace = true, optional = true }
pem-rfc7468 = { workspace = true, features = ["alloc"], optional = true }
Expand All @@ -131,6 +131,8 @@
libsqlite3-sys = { workspace = true, features = ["bundled"], optional = true }
liblzma = { workspace = true }
liblzma-sys = { workspace = true }
zstd = { workspace = true }
zstd-safe = { workspace = true }

[target.'cfg(windows)'.dependencies]
paste = { workspace = true }
Expand Down
5 changes: 5 additions & 0 deletions crates/stdlib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ mod lzma;

mod zlib;

#[cfg(not(any(target_os = "android", target_arch = "wasm32")))]
mod zstd;

mod blake2;
mod hashlib;
mod md5;
Expand Down Expand Up @@ -277,5 +280,7 @@ pub fn stdlib_module_defs(ctx: &Context) -> Vec<&'static builtins::PyModuleDef>
))]
uuid::module_def(ctx),
zlib::module_def(ctx),
#[cfg(not(any(target_os = "android", target_arch = "wasm32")))]
zstd::module_def(ctx),
]
}
Loading
Loading