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

Mapping returns PyList for keys, values, and items #4661

Merged
merged 20 commits into from
Oct 29, 2024

Conversation

KLMatlock
Copy link
Contributor

From the PyMappingProxy PR.

Since Python 3.7 PyMapping_Keys, PyMapping_Values, and PyMapping_Items always returns a list instead of a sequence. This PR updates the corresponding return types in PyMapping.

@davidhewitt
Copy link
Member

Thanks, I guess this needs rebasing on main now that #4644 was merged :)

Copy link

codspeed-hq bot commented Oct 29, 2024

CodSpeed Performance Report

Merging #4661 will improve performances by 16.35%

Comparing KLMatlock:mapping-returns-pylist (2119dcc) with main (2d3bdc0)

Summary

⚡ 5 improvements
✅ 78 untouched benchmarks

Benchmarks breakdown

Benchmark main KLMatlock:mapping-returns-pylist Change
test_empty_class_init_py 15.3 µs 13.8 µs +10.86%
test_args_kwargs_py 21.1 µs 18.4 µs +14.81%
test_args_kwargs_rs 15.8 µs 13.6 µs +16.35%
test_simple_kwargs_py 22.3 µs 20 µs +11.66%
test_simple_kwargs_rs 21.6 µs 18.8 µs +14.58%

@KLMatlock KLMatlock marked this pull request as ready for review October 29, 2024 19:54
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@davidhewitt davidhewitt added this pull request to the merge queue Oct 29, 2024
Merged via the queue into PyO3:main with commit f74d374 Oct 29, 2024
44 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