Merged
Conversation
ddc7769 to
b399737
Compare
Member
Author
|
Sorry for the force-pushes here; I'll try to make the next one I push a bit tidier on first push... 🤦 |
CodSpeed Performance ReportMerging #3774 will degrade performances by 29.03%Comparing Summary
Benchmarks breakdown
|
| /// | ||
| /// // Case #3: Invalid exception value | ||
| /// let err = PyErr::from_value(PyString::new(py, "foo").into()); | ||
| /// let err = PyErr::from_value(PyString::new_bound(py, "foo").as_gil_ref()); |
Member
There was a problem hiding this comment.
This will have to wait for the corresponding PyErr change, right?
Member
Author
There was a problem hiding this comment.
Yes, we need to add PyErr::from_value_bound I think.
(or add a trait which abstracts over &PyAny and &Bound<PyAny> just temporarily to ease migration, thought that'd be a new design question and less mechanical.)
adamreichold
approved these changes
Jan 29, 2024
b399737 to
c475656
Compare
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.
Part of #3684
This implements
PyString::new_boundand deprecatesPyString::newas per the established pattern, updating internal code.There are other constructors on
PyString, particularlyPyString::intern, which I will cover in a separate PR to keep the diff smaller.