implement PyStringMethods#3677
Merged
davidhewitt merged 1 commit intoPyO3:mainfrom Dec 20, 2023
Merged
Conversation
Member
|
Makes sense to me. |
CodSpeed Performance ReportMerging #3677 will degrade performances by 33.39%Comparing Summary
Benchmarks breakdown
|
adamreichold
approved these changes
Dec 20, 2023
Member
Author
|
We've had a little bit of flakiness with PyPy 3.8 previously so will retry in the hope it's not caused by this PR. |
Member
Author
|
Hmm I'll try to investigate this later 🤔 |
Member
Author
|
I noticed that PyPy 3.8 succeeded in the second run (but failed in the first), so I think this is just the usual PyPy flakiness :( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #3382
There are some interesting bits going on in this PR:
to_strneeds the GILPool to work for abi3 before Python 3.10, so I have added a#[cfg]on the correspondingPyStringMethodsAPI.to_cowas a new API inPyStringMethodswhich is an alternative for users on abi3 before 3.10 (cc @alex)Py::to_str,Py::to_cowandPy::to_string_lossyas reads which can outlast the GIL lifetime, like we did for bytes (cf GIL-free references to Python data #2275)