Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-140795: Keep 'err' in local variable in _ssl.c#143275

Merged
colesbury merged 1 commit into
python:mainpython/cpython:mainfrom
colesbury:gh-140795-ssl-errcolesbury/cpython:gh-140795-ssl-errCopy head branch name to clipboard
Dec 31, 2025
Merged

gh-140795: Keep 'err' in local variable in _ssl.c#143275
colesbury merged 1 commit into
python:mainpython/cpython:mainfrom
colesbury:gh-140795-ssl-errcolesbury/cpython:gh-140795-ssl-errCopy head branch name to clipboard

Conversation

@colesbury

@colesbury colesbury commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

The error return code doesn't need to be mutable state on the SSLSocket. This simplifies thread-safety and avoids potential reentrancy issues.

The error return code doesn't need to be mutable state on the SSLSocket.
This simplifes thread-safety and avoids potential reentrancy issues.
@colesbury colesbury added skip news type-refactor Code refactoring (with no changes in behavior) labels Dec 29, 2025
@colesbury colesbury marked this pull request as ready for review December 29, 2025 18:08
@colesbury

Copy link
Copy Markdown
Contributor Author

The motivation here is to refactor out shared state so that we can remove some of the SSLSocket locks.

@picnixz picnixz 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.

Yeah I don't know why self->err is carried over actually.

@colesbury colesbury merged commit 96ab379 into python:main Dec 31, 2025
54 checks passed
@colesbury colesbury deleted the gh-140795-ssl-err branch December 31, 2025 00:45
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
)

The error return code doesn't need to be mutable state on the SSLSocket.
This simplifes thread-safety and avoids potential reentrancy issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-refactor Code refactoring (with no changes in behavior)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.