Movatterモバイル変換


[0]ホーム

URL:


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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
colesbury merged 1 commit intopython:mainfromcolesbury:gh-143756-weakref
Jan 22, 2026

Conversation

@colesbury
Copy link
Contributor

@colesburycolesbury commentedJan 13, 2026
edited by bedevere-appbot
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 potentiallyunsafe. Also, refactor out some common code.
Comment on lines +777 to +778
get_socket(PySSLSocket *obj, PySocketSockObject **out_sock,
const char *filename, int lineno)

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__.

Copy link
Member

@picnixzpicnixzJan 19, 2026
edited
Loading

Choose a reason for hiding this comment

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

If we have a macro, AFAIR, it expands to something that will not be visually helpful (on the IDE the reported line would mismatch, but I may be wrong here).

So we also could well remove all file/lineno reports and add a description of what we were doing instead, or the involved function.

The file/lineno is only for us to know what happened when someone reports a bug. But the file is likely to always be the same...

Copy link
Member

@picnixzpicnixz left a comment
edited
Loading

Choose a reason for hiding this comment

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

The design choices of this module are hard to comply with but well... better to have small changes for now.

@colesburycolesbury merged commitee4e14a intopython:mainJan 22, 2026
55 checks passed
@colesburycolesbury deleted the gh-143756-weakref branchJanuary 22, 2026 19:02
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@picnixzpicnixzpicnixz approved these changes

@ZeroIntensityZeroIntensityZeroIntensity approved these changes

@gpsheadgpsheadAwaiting requested review from gpsheadgpshead is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@colesbury@picnixz@ZeroIntensity

[8]ページ先頭

©2009-2026 Movatter.jp