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 2015年01月12日 11:06 by vstinner, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| close_selector.patch | vstinner, 2015年01月12日 11:06 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg233881 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年01月12日 11:06 | |
I propose to raise a RuntimeError exception on operations of a selector when the selector is closed. I'm not sure that RuntimeError is the most common exception: - io and gzip raise ValueError - asyncio raises RuntimeError (and selectors is "linked" to asyncio) - multiprocessing raises OSError - dbm.dumb raises dbm.dumb.error This issue is related to the issue #23209 which propopses to set the _map attribute to None when in the close() method. |
|||
| msg233890 - (view) | Author: Charles-François Natali (neologix) * (Python committer) | Date: 2015年01月12日 21:52 | |
RuntimeError sounds better to me (raising ValueError when no value is provided, e.g. in select() sounds definitely strange). |
|||
| msg233908 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年01月13日 09:01 | |
New changeset 1544bdc409be by Victor Stinner in branch '3.4': Issue #23209, #23225: selectors.BaseSelector.close() now clears its internal https://hg.python.org/cpython/rev/1544bdc409be New changeset 6e7403bc906f by Victor Stinner in branch 'default': Issue #23209, #23225: selectors.BaseSelector.get_key() now raises a https://hg.python.org/cpython/rev/6e7403bc906f |
|||
| msg233911 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年01月13日 09:07 | |
Oh, I forgot Python 3.4. Changing the behaviour of get_key() in a minor Python version (3.4.x) would break the compatibility. I used Martin Richard's patch for Python 3.4: raise a KeyError if the selector is closed. I commit my change to Python 3.5 and Tulip. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:11 | admin | set | github: 67414 |
| 2015年01月13日 09:07:09 | vstinner | set | status: open -> closed resolution: fixed |
| 2015年01月13日 09:07:03 | vstinner | set | messages: + msg233911 |
| 2015年01月13日 09:01:51 | python-dev | set | nosy:
+ python-dev messages: + msg233908 |
| 2015年01月12日 21:52:38 | neologix | set | messages: + msg233890 |
| 2015年01月12日 11:06:01 | vstinner | create | |