You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the python os module is missing many methods. Try adding a method to this module by editing the file vm/src/stdlib/os.rs.
This is an issue for new contributors, so please do not implement everything at once, so other people have a chance to go for it (or, actually, please implement all! >:)! ).
Note: Before working on platform-specific functions, check if they are members of posix or nt. Their members are reexported to os.
Currently it doesn't seem that the os module is implemented in C for CPython. Is the goal here to implement the Python os module in Rust as, for example, the sys module in CPython is implemented in C and not in Python?
Because Rust's cross-platform support is so much better than C's, we decided to implement a single _os module that has all the built-in functions rather than the separate posix and nt modules that CPython has.
Hi, new here. I was just wondering how to start working on one of these outstanding implementations without having any overlap with others? Should we open a new issue for what we want to tackle and then have it assigned to us?
I'm so sorry for not responding earlier @nicholasraphael, if you're still interested you can feel free to just open a PR for it; there are a lot of functions and hopefully what you choose won't conflict if anyone else is working on something. You could also just comment what you're working on in this thread.
Hey, I wanted to work on some of these issue. But how can I create tests for this ? Basically after I implement a method, how can I test if it's working as expected? Sorry quite new here.
I made a analysis to detemine the next important os module based on the real usage in GitHub public code. This is based on the master branch of this repo at the time of writing.
Run whats_left.sh and take a look at the output for os. Pick one of the functions, add a comment here that you've picked up the function so conflicts are minimized and start working on it!
Activity
mpajkowski commentedon Jul 25, 2019
Ok, I'm working on get/set uid, guid etc. stuff
immersinn commentedon Sep 23, 2019
I'm going to take a stab at
chownandchroot.Also, as a general question, is the current goal to match CPython functionality here?
Currently it doesn't seem that the os module is implemented in C for CPython. Is the goal here to implement the Python os module in Rust as, for example, the sys module in CPython is implemented in C and not in Python?
Or am I completely missing something here?
coolreader18 commentedon Sep 23, 2019
Because Rust's cross-platform support is so much better than C's, we decided to implement a single
_osmodule that has all the built-in functions rather than the separateposixandntmodules that CPython has.immersinn commentedon Sep 23, 2019
Ah, gotcha..so for
chownandchrootmethods, i'd reference the functionality and behavior inposixmodule.ccoolreader18 commentedon Sep 23, 2019
Yep, and you can use the
#[cfg(unix)]attribute to make sure they're only available on unix.immersinn commentedon Sep 23, 2019
cool cool, thanks!
dan-fritchman commentedon Oct 13, 2019
PR #1524 has an implementation of
os.system.ninyawee commentedon Jan 27, 2020
nicholasraphael commentedon Jun 8, 2020
Hi, new here. I was just wondering how to start working on one of these outstanding implementations without having any overlap with others? Should we open a new issue for what we want to tackle and then have it assigned to us?
Thanks!
coolreader18 commentedon Jun 23, 2020
I'm so sorry for not responding earlier @nicholasraphael, if you're still interested you can feel free to just open a PR for it; there are a lot of functions and hopefully what you choose won't conflict if anyone else is working on something. You could also just comment what you're working on in this thread.
BolunThompson commentedon Jul 22, 2020
The libc rust module doesn't have an API for the ctermid function, so that's an issue for implementing os.ctermid.
coolreader18 commentedon Jul 23, 2020
It's always possible to just do
extern "C" { fn ctermid(...) -> ...; }; the libc crate isn't required for calling in to native functions.leopsidom commentedon Nov 29, 2020
Hey, I wanted to work on some of these issue. But how can I create tests for this ? Basically after I implement a method, how can I test if it's working as expected? Sorry quite new here.
4 remaining items
kenkoooo commentedon Feb 11, 2021
Hi, let me work on
getgrouplist: #2449kenkoooo commentedon Feb 13, 2021
Let me work on
getpriorityandsetprioritynext: #2453ninyawee commentedon Feb 14, 2021
I made a analysis to detemine the next important os module based on the real usage in GitHub public code. This is based on the master branch of this repo at the time of writing.
Feel free to use and modify it.
link to notebook
duysqubix commentedon Apr 6, 2021
Implementing os.listxattr
hk1997 commentedon Sep 9, 2021
Hi, is there something left to work on this?
Would like to pick it up.
DimitrisJim commentedon Sep 9, 2021
Run
whats_left.shand take a look at the output foros. Pick one of the functions, add a comment here that you've picked up the function so conflicts are minimized and start working on it!youknowone commentedon Sep 22, 2021
I added a note to the issue body to check
posixorntfor re-export.ecpost commentedon Aug 20, 2022
Added a few macos constants: #4110
marvinmednick commentedon Feb 12, 2023
I'd like to take on os.pathconf_names - and have crated #4494 to track
hydrogen602 commentedon Apr 17, 2024
I'd like to look at gettingos.fwalkimplementedEdit: Looks like its already implemented in
os.py, even thoughwhats_left.pystill shows it as missing.fanninpm commentedon Apr 17, 2024
If you're referring to what's on the website, the website gets updated every Friday (at least, in my timezone).
youknowone commentedon Dec 25, 2025
Thank you everyone to participate in this marathon for os module.
os module function are almost done. A few of them are left, but having an issue for that is not worth as before.