bpo-30624 / selectors: use bare except clause#2082
Conversation
…fd in a bad state in case of error
|
@giampaolo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @cf-natali, @1st1 and @serhiy-storchaka to be potential reviewers. |
gvanrossum
left a comment
There was a problem hiding this comment.
Sounds good. Thanks! (Maybe we need an update to PEP 8 explaining that except: is okay when the block ends in bare raise?)
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I don't merge immediately because I would like to know if other core devs like this change.
|
Merging now so we can get this into the release candidate. |
|
Needs a backport to 3.6. |
| Library | ||
| ------- | ||
|
|
||
| - bpo-30624: selectors does not take KeyboardInterrupt and SystemExit into |
There was a problem hiding this comment.
Why not? SystemExit is not a subclass of Exception.
There was a problem hiding this comment.
You are right. My mistake.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Look also at KqueueSelector.
What about it? |
|
Sorry, I though you fixed first two occurrences of "except Exception", but actually the 1st and the 3rd are fixed. |
I see that on 3.6 |
|
[For posterity, and note to myself] Oh, I see now what happened. Before #1035 this code was simpler and did have |
|
@giampaolo There is still a |
|
It can be deleted. |
References http://bugs.python.org/issue30624.