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

implement datetime traits for Bound #3679

Merged
merged 1 commit into from Dec 23, 2023
Merged

Conversation

davidhewitt
Copy link
Member

@davidhewitt davidhewitt commented Dec 20, 2023

Split from #3606

This works a bit differently from the other PyXMethods traits, because we already have traits for the datetime types, so we can just implement them for Bound types.

The only slight snag is that PyTzInfoAccess returns a gil-ref, so for now I've added PyTzInfoAccess2 (and we can clean that up when we make the new API public) I've had to modify that to return a Bound tzinfo instead.

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

codspeed-hq bot commented Dec 20, 2023

CodSpeed Performance Report

Merging #3679 will improve performances by 22.03%

Comparing davidhewitt:datetime2 (6832bf8) with main (65f25d4)

🎉 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:datetime2 Change
list_via_extract 153.9 ns 126.1 ns +22.03%

@davidhewitt davidhewitt changed the title implement datetime traits for Py2 implement datetime traits for Bound Dec 23, 2023
Copy link
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. The CI says the pytests still need to be adjusted though.

@adamreichold adamreichold added this pull request to the merge queue Dec 23, 2023
Merged via the queue into PyO3:main with commit e99058a Dec 23, 2023
37 checks passed
@davidhewitt davidhewitt deleted the datetime2 branch December 23, 2023 16:29
@davidhewitt
Copy link
Member Author

Thanks for fixing those up! I ended up getting a bit deep into rebasing #3606 for the new Bound / Borrowed names; that branch is looking a lot tidier now!

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.

None yet

2 participants