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 call_bound and call_method_bound #3711

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

davidhewitt
Copy link
Member

Adds Py::call_bound and Py::call_method_bound, which take kwargs: Option<&Bound<'_, PyDict>>.

For &PyAny, I decided not to add these new variants as instead the correct change should be to switch to Bound<'_, PyAny>.

Similarly I changed the argument in PyAnyMethods::call and PyAnyMethods::call_method without introducing new variants.

The other functions like call0 don't need changing as they don't take an Option<&PyDict> argument.

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Dec 29, 2023
@davidhewitt
Copy link
Member Author

Uff will fixup doctests later, ideally this evening.

@davidhewitt
Copy link
Member Author

(This one is ready for review as far as I'm concerned; the doctests look to be passing now 🎉)

Copy link

codspeed-hq bot commented Jan 3, 2024

CodSpeed Performance Report

Merging #3711 will improve performances by 10.08%

Comparing davidhewitt:call-bound (50e33d8) with main (f2eb121)

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

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

⚡ 1 improvements
✅ 77 untouched benchmarks

Benchmarks breakdown

Benchmark main davidhewitt:call-bound Change
list_via_extract 303.3 ns 275.6 ns +10.08%

@davidhewitt davidhewitt added this pull request to the merge queue Jan 3, 2024
Merged via the queue into PyO3:main with commit 58746bb Jan 3, 2024
37 of 38 checks passed
@davidhewitt davidhewitt deleted the call-bound branch January 3, 2024 14:21
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