[issue23225] selectors: raise an exception if the selector is closed

2015-01-13 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue23225] selectors: raise an exception if the selector is closed

2015-01-13 Thread STINNER Victor
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.

[issue23225] selectors: raise an exception if the selector is closed

2015-01-13 Thread Roundup Robot
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 #2320

[issue23225] selectors: raise an exception if the selector is closed

2015-01-12 Thread Charles-François Natali
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

[issue23225] selectors: raise an exception if the selector is closed

2015-01-12 Thread STINNER Victor
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 async