← 返回首页
gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed by Dreamsorcerer · Pull Request #104474 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed#104474

Merged
gvanrossum merged 1 commit into
python:mainfrom
Dreamsorcerer:patch-6
May 14, 2023
Merged

gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed#104474
gvanrossum merged 1 commit into
python:mainfrom
Dreamsorcerer:patch-6

Conversation

Dreamsorcerer commented May 14, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Changes in #98540 made it unsafe to call .abort() (and other methods) after closing. This atleast makes it possible to call .abort() without worrying about this.

I'm not sure if any of the others methods should be updated (e.g. with a raise RuntimeError("Transport is closed")). It might also be an idea to do the same change to _force_close(), but I wasn't sure if there was a risk or not of this method being called internally after close.

ghost commented May 14, 2023
edited by ghost
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

If an internal function hits this we should just fix the bug.

gvanrossum changed the title gh-98540: Make _SSLTransportProtocol.abort() safe to call when closed gh-98539: Make _SSLTransportProtocol.abort() safe to call when closed May 14, 2023
gvanrossum merged commit fb8739f into python:main May 14, 2023

Copy link
Copy Markdown
Contributor Author

Alright, sounds good.
Can you enable the backport to 3.11?

gvanrossum added the needs backport to 3.11 only security fixes label May 14, 2023

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

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

bedevere-bot removed the needs backport to 3.11 only security fixes label May 14, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 14, 2023
…closed (pythonGH-104474) (cherry picked from commit fb8739f) Co-authored-by: Sam Bull <git@sambull.org>
gvanrossum pushed a commit that referenced this pull request May 14, 2023
… closed (GH-104474) (#104485) (cherry picked from commit fb8739f) Co-authored-by: Sam Bull <git@sambull.org>
carljm added a commit to carljm/cpython that referenced this pull request May 15, 2023
* main: (29 commits) pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418) pythongh-101819: Isolate `_io` (python#101948) Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501) pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495) pythongh-104050: Run mypy on `clinic.py` in CI (python#104421) pythongh-104490: Consistently define phony make targets (python#104491) pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473) pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488) pythongh-101282: move BOLT config after PGO (pythongh-104493) pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470) pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457) pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474) pythongh-104337: Clarify random.gammavariate doc entry (python#104410) Minor improvements to typing docs (python#104465) pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460) pythonGH-71383: IDLE - Document testing subsets of modules (python#104463) pythongh-104454: Fix refleak in AttributeError_reduce (python#104455) pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446) pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424) Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430) ...
carljm added a commit to carljm/cpython that referenced this pull request May 15, 2023
* main: (204 commits) pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418) pythongh-101819: Isolate `_io` (python#101948) Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501) pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495) pythongh-104050: Run mypy on `clinic.py` in CI (python#104421) pythongh-104490: Consistently define phony make targets (python#104491) pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473) pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488) pythongh-101282: move BOLT config after PGO (pythongh-104493) pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470) pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457) pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474) pythongh-104337: Clarify random.gammavariate doc entry (python#104410) Minor improvements to typing docs (python#104465) pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460) pythonGH-71383: IDLE - Document testing subsets of modules (python#104463) pythongh-104454: Fix refleak in AttributeError_reduce (python#104455) pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446) pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424) Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants

Footer

© 2026 GitHub, Inc.