[New-bugs-announce] [issue23225] selectors: raise an exception if the selector is closed

STINNER Victor report at bugs.python.org
Mon Jan 12 12:06:01 CET 2015

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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list