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-142518: Add thread safety notes for the buffer protocol#145911

Merged
lysnikolaou merged 4 commits into
python:mainpython/cpython:mainfrom
lysnikolaou:buffer-protocol-thread-safetylysnikolaou/cpython:buffer-protocol-thread-safetyCopy head branch name to clipboard
Mar 18, 2026
Merged

gh-142518: Add thread safety notes for the buffer protocol#145911
lysnikolaou merged 4 commits into
python:mainpython/cpython:mainfrom
lysnikolaou:buffer-protocol-thread-safetylysnikolaou/cpython:buffer-protocol-thread-safetyCopy head branch name to clipboard

Conversation

@lysnikolaou

@lysnikolaou lysnikolaou commented Mar 13, 2026

Copy link
Copy Markdown
Member

Comment thread Doc/c-api/typeobj.rst Outdated

* The export counter decrement in step (1) must be atomic.

* Resource cleanup when the counter reaches zero must be reentrant,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not sure why it needs to be re-entrant, can you give an example?

@lysnikolaou lysnikolaou Mar 17, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What I meant here is that resource cleanup should only happen once. Or, in general, be handled gracefully. Should I update the wording you think?

@kumaraditya303 kumaraditya303 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One question otherwise LGTM

@lysnikolaou lysnikolaou added the needs backport to 3.14 bugs and security fixes label Mar 18, 2026
@lysnikolaou lysnikolaou merged commit 847f83e into python:main Mar 18, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Mar 18, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @lysnikolaou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 18, 2026
…honGH-145911)

(cherry picked from commit 847f83e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@bedevere-app

bedevere-app Bot commented Mar 18, 2026

Copy link
Copy Markdown

GH-146106 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Mar 18, 2026
lysnikolaou added a commit that referenced this pull request Mar 18, 2026
…-145911) (#146106)

(cherry picked from commit 847f83e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news topic-free-threading

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants

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