-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Conversation
…xt__` (python#135412)" This reverts commit e6c3039.
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. |
There was a problem hiding this 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.)
Thanks @ZeroIntensity for the PR, and @corona10 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…xt__` (pythonGH-135412)" (pythonGH-135439) This reverts commit e6c3039. (cherry picked from commit 7343135) Co-authored-by: Peter Bierma <[email protected]>
GH-135449 is a backport of this pull request to the 3.14 branch. |
…xt__` (python#135412)" (python#135439) This reverts commit e6c3039.
This reverts commit e6c3039.
cc @vstinner @kumaraditya303 @corona10
StringIO
methods in threads on free-threading debug build #135410