[issue23225] selectors: raise an exception if the selector is closed
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23225 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23225] selectors: raise an exception if the selector is closed
Roundup Robot added the comment: 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 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23225 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23225] selectors: raise an exception if the selector is closed
STINNER Victor added the comment: 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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23225 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23225] selectors: raise an exception if the selector is closed
New submission from STINNER Victor: 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. -- components: asyncio files: close_selector.patch keywords: patch messages: 233881 nosy: gvanrossum, haypo, martius, neologix, yselivanov priority: normal severity: normal status: open title: selectors: raise an exception if the selector is closed versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file37682/close_selector.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23225 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23225] selectors: raise an exception if the selector is closed
Charles-François Natali added the comment: RuntimeError sounds better to me (raising ValueError when no value is provided, e.g. in select() sounds definitely strange). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23225 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com