Skip to content
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

add #[track_caller] to all Py/Bound/Borrowed methods which panic #4098

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

davidhewitt
Copy link
Member

While debugging pydantic/pydantic#9250 this morning, I realised it would be much more helpful if the panic message originated from the actual source location that attempted to construct the failed pointer, rather than deep in the guts of PyO3.

With this enabled, that reproduction actually panics with:

thread '<unnamed>' panicked at /home/david/dev/pydantic/pyo3/src/types/any.rs:2226:18:

which is in PyAnyMethods::dir - it turns out that __dir__ can indeed be fallible, so I'll open a separate issue for that now...

Copy link

codspeed-hq bot commented Apr 19, 2024

CodSpeed Performance Report

Merging #4098 will not alter performance

Comparing davidhewitt:track-caller (8bdbb00) with main (d42c00d)

🎉 Hooray! pytest-codspeed just leveled up to 2.2.1!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 69 untouched benchmarks

@adamreichold adamreichold added this pull request to the merge queue Apr 19, 2024
Merged via the queue into PyO3:main with commit cd28e14 Apr 19, 2024
43 checks passed
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.

2 participants