Skip to content

Revert "gh-135410: use a critical section around StringIO.__next__ (#135412)" #135439

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Jun 12, 2025

@kumaraditya303
Copy link
Contributor

Well I don't feel that reverting it is necessary, the docs and benchmarks can be done on top but if others feel it is neccessary I am fine with it.

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

Let’s revert this change and revisit what better approaches we can take.
If we can’t guarantee that the Python version is thread-safe, then we should document that StringIO is not thread-safe. it also means we don’t need to guarantee thread safety in the C implementation either.
However, that doesn’t mean we should allow segmentation faults. (thread-safe and segmentation fault are fully different issues, at least we should guarantee thread-unsafe with memory-safe implementation.)

@corona10 corona10 merged commit 7343135 into python:main Jun 12, 2025
47 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 12, 2025
…xt__` (pythonGH-135412)" (pythonGH-135439)

This reverts commit e6c3039.
(cherry picked from commit 7343135)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 12, 2025

GH-135449 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 Jun 12, 2025
@ZeroIntensity ZeroIntensity deleted the revert-gh-135412 branch June 12, 2025 22:35
corona10 pushed a commit that referenced this pull request Jun 12, 2025
…ext__` (GH-135412)" (GH-135439) (gh-135449)

Revert "gh-135410: use a critical section around `StringIO.__next__` (GH-135412)" (GH-135439)

This reverts commit e6c3039.
(cherry picked from commit 7343135)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants