This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年07月23日 21:30 by vstinner, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| 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) * (Python committer) | 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) * (Python committer) | Date: 2014年07月23日 21:39 | |
Oops, test_asyncio was failing. Fixed patched. |
|||
| msg224131 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | 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) * (Python committer) | 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. Though get_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 blocking There could be an argument that get_inheritable should be renamed to is_inheritable instead. |
|||
| msg224171 - (view) | Author: Charles-François Natali (neologix) * (Python committer) | 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) * (Python committer) | 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) (Python triager) | Date: 2014年07月29日 20:38 | |
New changeset 8f0b8ddbb66b by Victor Stinner in branch 'default': Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get and http://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 | |