-
Notifications
You must be signed in to change notification settings - Fork 292
fix: copy with tzinfo #567
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
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #567 +/- ##
==========================================
- Coverage 94.17% 94.14% -0.03%
==========================================
Files 95 94 -1
Lines 12844 12767 -77
Branches 24 24
==========================================
- Hits 12096 12020 -76
+ Misses 742 741 -1
Partials 6 6
... and 22 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
CodSpeed Performance ReportMerging #567 Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise looks great, thanks for the contribution.
src/input/datetime.rs
Outdated
use super::Input; | ||
use crate::errors::{ErrorType, ValError, ValResult}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please move these down to where they were before, they match the order of other imports.
src/input/datetime.rs
Outdated
use pyo3::intern; | ||
use pyo3::prelude::*; | ||
use pyo3::types::PyDict; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please combine this into the line below.
@@ -185,6 +186,14 @@ def test_tz_comparison(): | |||
SchemaValidator({'type': 'datetime', 'gt': uk_3pm}).validate_python('2022-01-01T16:00:00+01:00') | |||
|
|||
|
|||
def test_tz_info_deepcopy(): | |||
output = SchemaValidator({'type': 'datetime'}).validate_python('2023-02-15T16:23:44.037Z') | |||
c = copy.deepcopy(output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please can you test with copy.copy
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. What do you think?
Thanks so much, looks great. |
Closes #545