◐ Shell
reader mode source ↗
Skip to content

bpo-36916: Swallow unhandled exception#13313

Merged
vstinner merged 3 commits into
python:masterfrom
asvetlov:swallow-unhandled-exception
May 14, 2019
Merged

bpo-36916: Swallow unhandled exception#13313
vstinner merged 3 commits into
python:masterfrom
asvetlov:swallow-unhandled-exception

Conversation

@asvetlov

@asvetlov asvetlov commented May 14, 2019

Copy link
Copy Markdown
Contributor

The PR fixes a message about an unhandled exception in a task when writer.write() is used without await but writer.drain() fails with an exception.

https://bugs.python.org/issue36916

@bedevere-bot

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@asvetlov

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

Well, actually I did nothing but provide a comment that describes why ignoring the exception in this particular case is ok.

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@vstinner: please review the changes made to this pull request.

@vstinner

Copy link
Copy Markdown
Member

Honestly, I don't understand how it can be a good idea to silently ignore errors. But this PR fix the warning on my Windows VM when running test_drain_raises() on Windows, so I approved it.

My main concern right now is that https://bugs.python.org/issue36870 is breaking the Python CI and the Python workflow.

@vstinner vstinner merged commit f12ba7c into python:master May 14, 2019
@asvetlov asvetlov deleted the swallow-unhandled-exception branch May 14, 2019 16:12
@asvetlov

Copy link
Copy Markdown
Contributor Author

Thanks, @vstinner
Regarding random fails: looks like the current asyncio code showed the problem that existed for a long time already.
Please let me warm up my Windows VM, I'll cope with it.

@1st1

1st1 commented May 14, 2019

Copy link
Copy Markdown
Member

@vstinner Please don't merge asyncio PRs without my review. This one looks fine though.

@vstinner

Copy link
Copy Markdown
Member

@vstinner Please don't merge asyncio PRs without my review. This one looks fine though.

test_asyncio was causing a lot of troubles, please see https://bugs.python.org/issue36870 for the context.

@asvetlov: Can you please also fix Python 3.7? Python 3.7 is also affected by https://bugs.python.org/issue36870

@vstinner

Copy link
Copy Markdown
Member

By the way, it's not the first time that the Python CI and the Python workflow is broken by test_asyncio, especially by random failures on Windows. I'm not sure how to prevent these issues.

The policy for the CI is to revert a change which introduces a regression: https://pythondev.readthedocs.io/ci.html#revert-on-fail

That's what I did: PR #13316. But @asvetlov asked me to look at this PR instead.

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @asvetlov for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington

Copy link
Copy Markdown
Contributor

Sorry, @asvetlov and @vstinner, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker f12ba7cd0a7370631214ac0b337ab5455ce717b2 3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants