Fix Numeric strings being converted to Datetime objects - #348
Conversation
… strings are datetime objects
…rosoft/kiota-serialization-json-python into shem/fix_pendulum_conversion_problem
Vincent Biret (baywet)
left a comment
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: |
There was a problem hiding this comment.
just making sure this method is not accessible from outside of the class?
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
There was a problem hiding this comment.
shouldn't it start with __ ?
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
…rosoft/kiota-serialization-json-python into shem/fix_pendulum_conversion_problem
Vincent Biret (baywet)
left a comment
There was a problem hiding this comment.
Thank you for making the changes!
Added Unit tests, changelog and version bump The other serialization libraries do not use pendulum thus do not have the problem |
|



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