Skip to content

Implement _stat module #5847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 27, 2025
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
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@
// win32
"birthtime",
"IFEXEC",
// "stat"
"FIRMLINK"
],
// flagWords - list of words to be always considered incorrect
"flagWords": [
Expand Down
38 changes: 4 additions & 34 deletions Lib/test/test_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,40 +240,10 @@ class TestFilemodeCStat(TestFilemode, unittest.TestCase):
statmod = c_stat

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_devices(self):
super().test_devices()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_directory(self):
super().test_directory()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_file_attribute_constants(self):
super().test_file_attribute_constants()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_link(self):
super().test_link()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_mode(self):
super().test_mode()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_module_attributes(self):
super().test_module_attributes()

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_socket(self):
super().test_socket()

if sys.platform == "win32":
@unittest.expectedFailure
def test_link(self):
super().test_link()

class TestFilemodePyStat(TestFilemode, unittest.TestCase):
statmod = py_stat
Expand Down
2 changes: 2 additions & 0 deletions vm/src/stdlib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod operator;
// TODO: maybe make this an extension module, if we ever get those
// mod re;
mod sre;
mod stat;
mod string;
#[cfg(feature = "compiler")]
mod symtable;
Expand Down Expand Up @@ -89,6 +90,7 @@ pub fn get_module_inits() -> StdlibMap {
"_operator" => operator::make_module,
"_signal" => signal::make_module,
"_sre" => sre::make_module,
"_stat" => stat::make_module,
"_string" => string::make_module,
"time" => time::make_module,
"_typing" => typing::make_module,
Expand Down
Loading
Loading