Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #10656/06db052e backport][3.11] Revert: Close the socket if there's a failure in start_connection() #10464 #10657

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Apr 1, 2025

This is a backport of PR #10656 as merged into master (06db052).

Reverts #10464

While this change improved the situation for uvloop users, it caused a regression with SelectorEventLoop (issue #10617)

The alternative fix is MagicStack/uvloop#646 (not merged at the time of this PR)

issue #10617 appears to be very similar to python/cpython@d5aeccf

If someone can come up with a working reproducer for #10617 we can revisit this.
cc @top-oai

Minimal implementation that shows on cancellation the socket is cleaned up without the explicit close #10617 (comment) so this should be unneeded unless I've missed something (very possible with all the moving parts here)

Related issue number

fixes #10617

…10464 (#10656)

Reverts #10464

While this change improved the situation for uvloop users, it caused a
regression with `SelectorEventLoop` (issue #10617)

The alternative fix is MagicStack/uvloop#646
(not merged at the time of this PR)

issue #10617 appears to be very similar to
python/cpython@d5aeccf

If someone can come up with a working reproducer for #10617 we can
revisit this.
cc @top-oai

Minimal implementation that shows on cancellation the socket is cleaned
up without the explicit `close`
#10617 (comment)
so this should be unneeded unless I've missed something (very possible
with all the moving parts here)

## Related issue number

fixes #10617

(cherry picked from commit 06db052)
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.09%. Comparing base (b93993d) to head (d1fa9a2).
Report is 1 commits behind head on 3.11.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             3.11   #10657      +/-   ##
==========================================
- Coverage   98.09%   98.09%   -0.01%     
==========================================
  Files         126      126              
  Lines       37577    37554      -23     
  Branches     4541     4536       -5     
==========================================
- Hits        36863    36840      -23     
  Misses        538      538              
  Partials      176      176              
Flag Coverage Δ
CI-GHA 97.98% <100.00%> (-0.01%) ⬇️
OS-Linux 97.68% <100.00%> (-0.01%) ⬇️
OS-Windows 94.74% <100.00%> (-0.01%) ⬇️
OS-macOS 96.82% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 96.67% <100.00%> (-0.01%) ⬇️
Py-3.10.16 97.20% <100.00%> (-0.01%) ⬇️
Py-3.11.11 97.31% <100.00%> (+0.05%) ⬆️
Py-3.11.9 96.75% <100.00%> (+<0.01%) ⬆️
Py-3.12.9 97.71% <100.00%> (-0.04%) ⬇️
Py-3.13.2 97.70% <100.00%> (-0.01%) ⬇️
Py-3.9.13 96.59% <100.00%> (+0.01%) ⬆️
Py-3.9.21 97.11% <100.00%> (-0.04%) ⬇️
Py-pypy7.3.16 96.71% <100.00%> (+<0.01%) ⬆️
VM-macos 96.82% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 97.68% <100.00%> (-0.01%) ⬇️
VM-windows 94.74% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco closed this Apr 1, 2025
@bdraco bdraco reopened this Apr 1, 2025
@bdraco bdraco enabled auto-merge (squash) April 1, 2025 03:03
Copy link

codspeed-hq bot commented Apr 1, 2025

CodSpeed Performance Report

Merging #10657 will not alter performance

Comparing patchback/backports/3.11/06db052eae399de1c7c34c0122d736e06c045ec7/pr-10656 (d1fa9a2) with 3.11 (b93993d)

Summary

✅ 51 untouched benchmarks

@bdraco bdraco merged commit 7f7d681 into 3.11 Apr 1, 2025
43 of 66 checks passed
@bdraco bdraco deleted the patchback/backports/3.11/06db052eae399de1c7c34c0122d736e06c045ec7/pr-10656 branch April 1, 2025 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant