Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23225
___
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
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.
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
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