
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-07-23 21:30 byvstinner, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| os_blocking.patch | vstinner,2014-07-23 21:30 | review | ||
| os_blocking-2.patch | vstinner,2014-07-23 21:39 | review | ||
| Messages (9) | |||
|---|---|---|---|
| msg223782 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-07-23 21:30 | |
Antoine suggested me to add these functions in the issue#22042.Here is a patch to implement these functions and use them in various places. | |||
| msg223784 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-07-23 21:39 | |
Oops, test_asyncio was failing. Fixed patched. | |||
| msg224131 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-07-27 13:50 | |
Can someone please review my patch? | |||
| msg224162 -(view) | Author: Akira Li (akira)* | Date: 2014-07-28 11:07 | |
Maybe is_something() is a better name than get_something()if something is a boolean? | |||
| msg224165 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-07-28 12:39 | |
> Maybe is_something() is a better name than get_something()> if something is a boolean?os and socket modules already use getxxx() / setxxx() names:- os.get_inheritable() / os.set_inheritable()- os.getuid() / os.setuid()- os.getgroups() / os.setgroups()- os.getxattr() os.setxattr()- socket.gettimeout() / socket.settimeout()- socket.get_inheritable() / socket.set_inheritable()- etc.There is only one "is" function: os.isatty(), but it does not have a "os.settty" method. | |||
| msg224170 -(view) | Author: Akira Li (akira)* | Date: 2014-07-28 14:52 | |
> os and socket modules already use getxxx() / setxxx() names:>> - os.get_inheritable() / os.set_inheritable()> - os.getuid() / os.setuid()> - os.getgroups() / os.setgroups()> - os.getxattr() os.setxattr()> - socket.gettimeout() / socket.settimeout()> - socket.get_inheritable() / socket.set_inheritable()> - etc.egid, euid, gid, groups, pgid, pgrp, priority, resgid, sid, uid, xatrr,hostname, timeout, sockopt are not boolean. Thoughget_inheritable() spoils the pot.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 blockingThere could be an argument that get_inheritable should be renamed tois_inheritable instead. | |||
| msg224171 -(view) | Author: Charles-François Natali (neologix)*![]() | Date: 2014-07-28 16:54 | |
I agree with Akira, although it's probably too late now to rename. | |||
| msg224184 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-07-28 20:30 | |
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." | |||
| msg224247 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-07-29 20:38 | |
New changeset8f0b8ddbb66b by Victor Stinner in branch 'default':Issue#22054: Add os.get_blocking() and os.set_blocking() functions to get andhttp://hg.python.org/cpython/rev/8f0b8ddbb66b | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:06 | admin | set | github: 66253 |
| 2014-07-29 20:39:06 | vstinner | set | status: open -> closed resolution: fixed |
| 2014-07-29 20:38:50 | python-dev | set | nosy: +python-dev messages: +msg224247 |
| 2014-07-28 20:30:51 | vstinner | set | messages: +msg224184 |
| 2014-07-28 16:54:18 | neologix | set | messages: +msg224171 |
| 2014-07-28 14:52:46 | akira | set | messages: +msg224170 |
| 2014-07-28 12:39:20 | vstinner | set | messages: +msg224165 |
| 2014-07-28 11:07:35 | akira | set | nosy: +akira messages: +msg224162 |
| 2014-07-27 13:50:38 | vstinner | set | messages: +msg224131 |
| 2014-07-23 21:39:07 | vstinner | set | files: +os_blocking-2.patch messages: +msg223784 |
| 2014-07-23 21:30:14 | vstinner | create | |