Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def modify(self, fileobj, events, data=None):
selector_events |= self._EVENT_WRITE
try:
self._selector.modify(key.fd, selector_events)
except Exception:
except:
super().unregister(fileobj)
raise
changed = True
Expand Down Expand Up @@ -524,7 +524,7 @@ def register(self, fileobj, events, data=None):
kev = select.kevent(key.fd, select.KQ_FILTER_WRITE,
select.KQ_EV_ADD)
self._selector.control([kev], 0, 0)
except Exception:
except:
super().unregister(fileobj)
raise
return key
Expand Down
4 changes: 4 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ Extension Modules
Library
-------

- bpo-30624: selectors does not take KeyboardInterrupt and SystemExit into

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not SystemExit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not? SystemExit is not a subclass of Exception.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. My mistake.

account, leaving a fd in a bad state in case of error. Patch by Giampaolo
Rodola'.

- bpo-30595: multiprocessing.Queue.get() with a timeout now polls its reader in
non-blocking mode if it succeeded to aquire the lock but the acquire took
longer than the timeout.
Expand Down