Skip to content

implement PyErr::write_unraisable_bound#3698

Merged
davidhewitt merged 2 commits intoPyO3:mainfrom
davidhewitt:unraisable-bound
Dec 24, 2023
Merged

implement PyErr::write_unraisable_bound#3698
davidhewitt merged 2 commits intoPyO3:mainfrom
davidhewitt:unraisable-bound

Conversation

@davidhewitt
Copy link
Copy Markdown
Member

In the spirit of the suggestion to go for the deprecate-and-add-bound-variant approach, here's a PR which implements this change for PyErr::write_unraisable, as I bumped into this when implementing #3697

Copy link
Copy Markdown
Member

@adamreichold adamreichold left a comment

Choose a reason for hiding this comment

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

LGTM. One nit in python_format.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 24, 2023

CodSpeed Performance Report

Merging #3698 will improve performances by 22.03%

Comparing davidhewitt:unraisable-bound (1004ffa) with main (214ed29)

Summary

⚡ 1 improvements
✅ 77 untouched benchmarks

Benchmarks breakdown

Benchmark main davidhewitt:unraisable-bound Change
not_a_list_via_downcast 153.9 ns 126.1 ns +22.03%

@davidhewitt
Copy link
Copy Markdown
Member Author

Rebased to fix the compile errors.

FYI I added a commit to export Bound and Borrowed as pyo3::Bound and pyo3::Borrowed so that the doctests and macros can work outside of the crate. I don't think that's controversial so I'll proceed with the merge, we can adjust this if there are other opinions about what their public path should be.

@davidhewitt davidhewitt added this pull request to the merge queue Dec 24, 2023
Merged via the queue into PyO3:main with commit 6ca63b5 Dec 24, 2023
@davidhewitt davidhewitt deleted the unraisable-bound branch December 24, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-skip-changelog Skip checking changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants