From 4f3d88ce4f5396c3670f7474be204a645df413f9 Mon Sep 17 00:00:00 2001 From: Lee Dogeon Date: Sun, 15 Feb 2026 20:33:58 +0900 Subject: [PATCH] Align lzma and os exports for test_all expected failure (#7156) --- Lib/test/test___all__.py | 1 - Lib/test/test_lzma.py | 1 - crates/stdlib/src/lzma.rs | 4 +++- crates/vm/src/stdlib/os.rs | 5 +---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index a1efdf19c..8ded9f992 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -97,7 +97,6 @@ class AllTest(unittest.TestCase): continue yield path, modpath + modname - @unittest.expectedFailure # TODO: RUSTPYTHON def test_all(self): # List of denied modules and packages denylist = set([ diff --git a/Lib/test/test_lzma.py b/Lib/test/test_lzma.py index 334cb2226..75ab8c42e 100644 --- a/Lib/test/test_lzma.py +++ b/Lib/test/test_lzma.py @@ -1553,7 +1553,6 @@ class OpenTestCase(unittest.TestCase): class MiscellaneousTestCase(unittest.TestCase): - @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'lzma' has no attribute 'CHECK_ID_MAX' def test_is_check_supported(self): # CHECK_NONE and CHECK_CRC32 should always be supported, # regardless of the options liblzma was compiled with. diff --git a/crates/stdlib/src/lzma.rs b/crates/stdlib/src/lzma.rs index 0189c9d2e..80e4ce807 100644 --- a/crates/stdlib/src/lzma.rs +++ b/crates/stdlib/src/lzma.rs @@ -51,7 +51,9 @@ mod _lzma { #[pyattr] const FILTER_DELTA: i32 = 3; #[pyattr] - const CHECK_UNKNOWN: i32 = 16; + const CHECK_ID_MAX: i32 = 15; + #[pyattr] + const CHECK_UNKNOWN: i32 = CHECK_ID_MAX + 1; // the variant ids are hardcoded to be equivalent to the C enum values enum Format { diff --git a/crates/vm/src/stdlib/os.rs b/crates/vm/src/stdlib/os.rs index 9993d8b63..8b7d39152 100644 --- a/crates/vm/src/stdlib/os.rs +++ b/crates/vm/src/stdlib/os.rs @@ -188,10 +188,7 @@ pub(super) mod _os { pub(crate) const SYMLINK_DIR_FD: bool = cfg!(not(any(windows, target_os = "redox"))); #[pyattr] - use libc::{ - O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY, SEEK_CUR, SEEK_END, - SEEK_SET, - }; + use libc::{O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY}; #[pyattr] pub(crate) const F_OK: u8 = 0;