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

Sign up
Appearance settings

gh-143756: Avoid borrowed reference in SSL code #143816

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

Open
colesbury wants to merge 1 commit into python:main
base: main
Choose a base branch
Loading
from colesbury:gh-143756-weakref

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury commented Jan 13, 2026
edited by bedevere-app bot
Loading

GET_SOCKET() returned a borrowed reference, which was potentially unsafe with free threading. Also, refactor out some common code.

GET_SOCKET() returned a borrowed reference, which was potentially
unsafe. Also, refactor out some common code.
Comment on lines +777 to +778
get_socket(PySSLSocket *obj, PySocketSockObject **out_sock,
const char *filename, int lineno)
Copy link
Member

@ZeroIntensity ZeroIntensity Jan 13, 2026

Choose a reason for hiding this comment

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

It would significantly simplify usage if this were a macro that automatically passed __FILE__ and __LINE__.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ZeroIntensity ZeroIntensity ZeroIntensity approved these changes

@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner

@picnixz picnixz Awaiting requested review from picnixz picnixz is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /