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
25 changes: 2 additions & 23 deletions Cargo.lock

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

11 changes: 9 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ panic = "abort"

[patch.crates-io]
parking_lot_core = { git = "https://github.com/youknowone/parking_lot", branch = "rustpython" }
# xz-core 0.1.0-rc.0 as published registers a `lzma12_optmap` static
# initializer. On MSVC it lands in `.CRT$XIB`, which `_initterm_e` walks as
# `int (__cdecl *)(void)` while the initializer's Rust signature returns `()`,
# so a Windows build exits 255 with empty stdout and stderr. That release also
# overflows the `alone_decoder` dictionary-size check in a debug build for
# `dict_size == 0`. simnalamburt/xz-rs#21 fixes both and is merged, so the pin
# drops once a release carrying it reaches crates.io.
xz-core = { git = "https://github.com/simnalamburt/xz-rs", rev = "5bf95411d0307e052ca2aeb06f0d75565c9a7362" }
# REDOX START, Uncomment when you want to compile/check with redoxer
# REDOX END

Expand Down Expand Up @@ -236,8 +244,7 @@ lexical-parse-float = "1.0.6"
libc = "0.2.186"
libffi = "5"
libloading = "0.9"
xz = "0.4.6-rc.0"
xz-sys = "0.4.6-rc.0"
xz-core = "0.1.0-rc.0"
libsqlite3-sys = "0.38"
libz-rs-sys = "0.6"
zlib-rs = { version = "=0.6.7", default-features = false, features = ["rust-allocator", "__internal-api"] }
Expand Down
3 changes: 0 additions & 3 deletions Lib/test/test_lzma.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ def test_decompressor_chunks(self):
self.assertTrue(lzd.eof)
self.assertEqual(lzd.unused_data, b"")

@unittest.expectedFailure # TODO: RUSTPYTHON; EOFError: End of stream already reached
def test_decompressor_chunks_empty(self):
lzd = LZMADecompressor()
out = []
Expand All @@ -159,7 +158,6 @@ def test_decompressor_chunks_empty(self):
self.assertTrue(lzd.eof)
self.assertEqual(lzd.unused_data, b"")

@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'LZMADecompressor' object has no attribute 'check'
def test_decompressor_chunks_maxsize(self):
lzd = LZMADecompressor()
max_length = 100
Expand Down Expand Up @@ -1352,7 +1350,6 @@ def test_tell_bad_args(self):
f.close()
self.assertRaises(ValueError, f.tell)

@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: True is not false
def test_issue21872(self):
# sometimes decompress data incompletely

Expand Down
9 changes: 2 additions & 7 deletions crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bz2 = ["std", "dep:bzip2"]
cjk-codecs = []
inet = ["std"]
json = ["dep:memchr", "std"]
lzma = ["std", "dep:xz", "dep:xz-sys"]
lzma = ["std", "dep:xz-core"]
std = []
threading = ["parking_lot", "std"]
wasm_js = ["getrandom/wasm_js"]
Expand Down Expand Up @@ -46,12 +46,7 @@ zlib-rs = { workspace = true, optional = true }
lock_api = { workspace = true }
siphasher = { workspace = true }
num-complex = { workspace = true }

[target.'cfg(not(any(target_os = "android", target_arch = "wasm32")))'.dependencies]
# RustPython does not expose `_lzma` on these targets; keep the native engine's
# dependency boundary with its common-module owner rather than in stdlib.
xz = { workspace = true, optional = true }
xz-sys = { workspace = true, optional = true }
xz-core = { workspace = true, optional = true }

[lints]
workspace = true
Loading