-
Notifications
You must be signed in to change notification settings - Fork 51
Fix parsing datetime with nanoseconds in Apple API response #465
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
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.
Update version in here too:
__version__ = "0.58.1.dev" |
It makes no difference for releases, but I still prefer to keep it up to date. Makes it easier when working with multiple versions that are installed side-by-side.
Other than that looks good.
Perhaps add couple of additional test cases too for new cases? Existing tests for datetime conversions can be found here: cli-tools/tests/apple/resources/test_resource.py Lines 14 to 39 in 8612665
|
We are also struggling with this error. We hope this pull request will be merged and deployed soon. |
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.
Version 0.58.2 was already released yesterday. So version needs to be bumped once more.
# Conflicts: # CHANGELOG.md
@priitlatt thanks for the review, addressed comments and suggestions |
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.
🚀
@hj-kang-mercari, this fix was just released in |
Thanks a lot, @priitlatt and @remarkov. I love to hear that. |
Apparently Apple started to use nanoseconds in the response payload which cannot be parsed properly with stdlib without string manipulations, thus producing the errors like
As there is already some inconsistency in the API responses that requires additional logic, instead of complicating it further we can introduce a dependency of dateutil which handles all these properly: