This repository was archived by the owner on Oct 14, 2024. It is now read-only.
Fix Numeric strings being converted to Datetime objects#348
Merged
Conversation
… strings are datetime objects
…rosoft/kiota-serialization-json-python into shem/fix_pendulum_conversion_problem
shemogumbe
marked this pull request as ready for review
August 23, 2024 17:08
baywet
suggested changes
Aug 23, 2024
baywet
left a comment
Member
There was a problem hiding this comment.
Thanks for the contribution!
Also:
- unit tests
- changelog
- version bump
- replicate in other serialization libraries
| deserialize but the model doesn't support additional data" | ||
| ) | ||
|
|
||
| def is_four_digit_number(self, value: str) -> bool: |
Member
There was a problem hiding this comment.
just making sure this method is not accessible from outside of the class?
Contributor
Author
There was a problem hiding this comment.
It's an instance method, and we really just need it here in the entire project, so nope, not accessible outside the class
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
…rosoft/kiota-serialization-json-python into shem/fix_pendulum_conversion_problem
baywet
previously approved these changes
Aug 23, 2024
baywet
left a comment
Member
There was a problem hiding this comment.
Thank you for making the changes!
Contributor
Author
Added Unit tests, changelog and version bump The other serialization libraries do not use pendulum thus do not have the problem |
|
baywet
approved these changes
Aug 23, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes microsoftgraph/msgraph-sdk-python#653
Overview
The PR fixes a problem where pendulum assumes all 4-digit numeric strings are Datetimes, e. 1212, 1214, 2530, 9057
Fixes # microsoftgraph/msgraph-sdk-python#653
Demo
The Script below,
Output before
Output After
Notes
This change could be reverted if pendulum does an update that fixes the bug.
Testing Instructions