cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_middle_of_receiving

Open fancidev opened this issue 2 years ago • 2 comments

macOS may raise OSError of EPROTOTYPE when writing to a socket that is in the middle of closing down. See also http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/

This PR updates the test case test_sendfile_fallback_close_peer_in_the_middle_of_receiving to handle this possibility in addition to ConnectionError.

  • Issue: gh-98174

fancidev avatar Oct 16 '22 04:10 fancidev

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

bedevere-bot avatar Oct 16 '22 04:10 bedevere-bot

All commit authors signed the Contributor License Agreement.
CLA signed

cpython-cla-bot[bot] avatar Oct 16 '22 04:10 cpython-cla-bot[bot]

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

bedevere-bot avatar Oct 17 '22 13:10 bedevere-bot

@sobolevn, thanks for reviewing! I also removed the NEWS entry. Hope it's good now!

fancidev avatar Oct 17 '22 13:10 fancidev

Should this be backported to 3.11 and 3.10?

gvanrossum avatar Oct 17 '22 15:10 gvanrossum

Thanks @fancidev for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. 🐍🍒⛏🤖

miss-islington avatar Oct 17 '22 15:10 miss-islington

Thanks @fancidev for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. 🐍🍒⛏🤖

miss-islington avatar Oct 17 '22 15:10 miss-islington

GH-98356 is a backport of this pull request to the 3.10 branch.

bedevere-bot avatar Oct 17 '22 15:10 bedevere-bot

GH-98357 is a backport of this pull request to the 3.11 branch.

bedevere-bot avatar Oct 17 '22 15:10 bedevere-bot