-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Add os.get_blocking() and os.set_blocking() functions #66253
Comments
Antoine suggested me to add these functions in the issue bpo-22042. Here is a patch to implement these functions and use them in various places. |
Oops, test_asyncio was failing. Fixed patched. |
Can someone please review my patch? |
Maybe is_something() is a better name than get_something() |
os and socket modules already use getxxx() / setxxx() names:
There is only one "is" function: os.isatty(), but it does not have a "os.settty" method. |
egid, euid, gid, groups, pgid, pgrp, priority, resgid, sid, uid, xatrr, Compare: if os.get_blocking(fd): # is it a bug? Does it return some mode bits?
# Do I need stat.IS_BLK(os.get_blocking(fd)) here instead? And: if os.is_blocking(fd):
# it is clear that fd is blocking There could be an argument that get_inheritable should be renamed to |
I agree with Akira, although it's probably too late now to rename. |
Guido van Rossum told me that he's ok for "get": "I'd go with get, since that seems the tradition in the os module." |
New changeset 8f0b8ddbb66b by Victor Stinner in branch 'default': |
Hi Experts, I notice that on Windows I'm not a guru of Python. Please forgive me if the questions don't make sense. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: