GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_middle_of_receiving by fancidev · Pull Request #98316 · python/cpython

Conversation

@fancidev

@fancidev fancidev commented Oct 16, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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: test_sendfile_fallback_close_peer_in_the_middle_of_receiving false failure on macOS #98174

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@fancidev
Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in…
9c945e3
…_the_middle_of_receiving.
@fancidev
fancidev requested review from 1st1, asvetlov and gvanrossum as code owners October 16, 2022 04:09
@bedevere-bot bedevere-bot added awaiting review tests Tests in the Lib/test dir labels Oct 16, 2022
@bedevere-bot

bedevere-bot commented Oct 16, 2022

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost

ghost commented Oct 16, 2022 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blurb-it
📜🤖 Added by blurb_it.
7747f31
sobolevn
sobolevn reviewed Oct 16, 2022
View reviewed changes
Comment thread Misc/NEWS.d/next/Tests/2022-10-16-06-42-01.gh-issue-98174.msZY0C.rst Outdated
@@ -0,0 +1 @@
Update test case `test_sendfile_fallback_close_peer_in_the_middle_of_receiving` to handle `OSError` of `EPROTOTYPE` on macOS.

@sobolevn sobolevn Oct 16, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Test only changes do not need NEWS entries.
They are for user-facing things :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_asyncio/test_sendfile.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

fancidev and others added 2 commits October 17, 2022 20:43
@fancidev @sobolevn
No need to raise 'from' within except block.
cf9178a
Co-authored-by: Nikita Sobolev <[email protected]>
@fancidev
NEWS entry not needed for changes to test cases.
614d6a5
@bedevere-bot

bedevere-bot commented Oct 17, 2022

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@fancidev

fancidev commented Oct 17, 2022

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood AlexWaygood added the skip news label Oct 17, 2022
gvanrossum
gvanrossum approved these changes Oct 17, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Oct 17, 2022
@gvanrossum
gvanrossum merged commit 3e82ad0 into python:main Oct 17, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Oct 17, 2022
@gvanrossum

gvanrossum commented Oct 17, 2022

Copy link
Copy Markdown
Member

Should this be backported to 3.11 and 3.10?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum gvanrossum added needs backport to 3.10 needs backport to 3.11 only security fixes labels Oct 17, 2022
@miss-islington

miss-islington commented Oct 17, 2022

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington

miss-islington commented Oct 17, 2022

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 17, 2022
@fancidev @miss-islington
pythongh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallba…
8500564
…ck_close_peer_in_the_middle_of_receiving (pythonGH-98316)

Co-authored-by: Nikita Sobolev <[email protected]>
(cherry picked from commit 3e82ad0)

Co-authored-by: fancidev <[email protected]>
@bedevere-bot

bedevere-bot commented Oct 17, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Oct 17, 2022
@bedevere-bot

bedevere-bot commented Oct 17, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Oct 17, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 17, 2022
@fancidev @miss-islington
pythongh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallba…
29f4a44
…ck_close_peer_in_the_middle_of_receiving (pythonGH-98316)

Co-authored-by: Nikita Sobolev <[email protected]>
(cherry picked from commit 3e82ad0)

Co-authored-by: fancidev <[email protected]>
miss-islington added a commit that referenced this pull request Oct 17, 2022
@miss-islington @fancidev
gh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_clo…
3adf234
…se_peer_in_the_middle_of_receiving (GH-98316)

Co-authored-by: Nikita Sobolev <[email protected]>
(cherry picked from commit 3e82ad0)

Co-authored-by: fancidev <[email protected]>
carljm added a commit to carljm/cpython that referenced this pull request Oct 17, 2022
@carljm
Merge branch 'main' into typewatch
cdbe93b
* main: (31 commits)
  pythongh-95913: Move subinterpreter exper removal to 3.11 WhatsNew (pythonGH-98345)
  pythongh-95914: Add What's New item describing PEP 670 changes (python#98315)
  Remove unused arrange_output_buffer function from zlibmodule.c. (pythonGH-98358)
  pythongh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_middle_of_receiving (python#98316)
  pythonGH-98327: Reduce scope of catch_warnings() in _make_subprocess_transport (python#98333)
  pythongh-93691: Compiler's code-gen passes location around instead of holding it on the global compiler state (pythonGH-98001)
  pythongh-97669: Create Tools/build/ directory (python#97963)
  pythongh-95534: Improve gzip reading speed by 10% (python#97664)
  pythongh-95913: Forward-port int/str security change to 3.11 What's New in main (python#98344)
  pythonGH-91415: Mention alphabetical sort ordering in the Sorting HOWTO (pythonGH-98336)
  pythongh-97930: Merge with importlib_resources 5.9 (pythonGH-97929)
  pythongh-85525: Remove extra row in doc (python#98337)
  pythongh-85299: Add note warning about entry point guard for asyncio example (python#93457)
  pythongh-97527: IDLE - fix buggy macosx patch (python#98313)
  pythongh-98307: Add docstring and documentation for SysLogHandler.createSocket (pythonGH-98319)
  pythongh-94808: Cover `PyFunction_GetCode`, `PyFunction_GetGlobals`, `PyFunction_GetModule` (python#98158)
  pythonGH-94597: Deprecate child watcher getters and setters (python#98215)
  pythongh-98254: Include stdlib module names in error messages for NameErrors (python#98255)
  Improve speed. Reduce auxiliary memory to 16.6% of the main array. (pythonGH-98294)
  [doc] Update logging cookbook with an example of custom handling of levels. (pythonGH-98290)
  ...
gvanrossum pushed a commit that referenced this pull request Oct 18, 2022
@miss-islington @fancidev
[3.11] gh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallb…
0bba980
…ack_close_peer_in_the_middle_of_receiving (GH-98316) (#98357)

Co-authored-by: Nikita Sobolev <[email protected]>
(cherry picked from commit 3e82ad0)

Co-authored-by: fancidev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sobolevn sobolevn sobolevn left review comments
@gvanrossum gvanrossum gvanrossum approved these changes
@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@fancidev @bedevere-bot @gvanrossum @miss-islington @sobolevn @AlexWaygood
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.