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

chore(python): Switch over some of the custom Python date/time conversions to native PyO3 conversions #16203

Merged
merged 9 commits into from
May 14, 2024

Conversation

itamarst
Copy link
Contributor

@itamarst itamarst commented May 13, 2024

Fixes #16158

This should probably give a performance boost for relevant code, but I didn't check.

Things I didn't touch:

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars labels May 13, 2024
Ok(av)
})
let timedelta = ob.extract::<TimeDelta>()?;
if let Some(micros) = timedelta.num_microseconds() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tried nanoseconds here, it broke the tests, so stuck to micro/milliseconds only.

@itamarst itamarst marked this pull request as ready for review May 13, 2024 22:16
Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.03%. Comparing base (674a048) to head (07b5252).

❗ Current head 07b5252 differs from pull request most recent head e65955a. Consider uploading reports for the commit e65955a to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16203      +/-   ##
==========================================
+ Coverage   80.93%   81.03%   +0.10%     
==========================================
  Files        1393     1393              
  Lines      179559   178941     -618     
  Branches     2907     2907              
==========================================
- Hits       145331   145013     -318     
+ Misses      33722    33423     -299     
+ Partials      506      505       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46
Copy link
Member

Thanks! Can you rebase?

@itamarst
Copy link
Contributor Author

@ritchie46 I fixed the conflict. If you literally want a rebase I can do that too.

@ritchie46
Copy link
Member

Nope, the conflict is fine. ^^

@ritchie46 ritchie46 merged commit 004efbe into pola-rs:main May 14, 2024
16 checks passed
MarcoGorelli pushed a commit to MarcoGorelli/polars that referenced this pull request May 15, 2024
…sions to native PyO3 conversions (pola-rs#16203)

Co-authored-by: Itamar Turner-Trauring <[email protected]>
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
…sions to native PyO3 conversions (pola-rs#16203)

Co-authored-by: Itamar Turner-Trauring <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to PyO3 0.21's native datetime support, now available with abi3
3 participants