seandstewart / typical

Typical: Fast, simple, & correct data-validation using Python 3 typing.
https://python-typical.org
MIT License
182 stars 9 forks source link

Fix Decimal serdes #189

Closed qhelix7 closed 2 years ago

qhelix7 commented 2 years ago

Use string for serializing and deserializing Decimal type data in order to avoid data corruption caused by casting to float. See Issue 188.

seandstewart commented 2 years ago

Not sure why the test workflow didn't run, I'll have to check the actions configuration, but the change is straightforward enough.

I ran the test suite locally and the doctest for isdecimaltype failed - you'll need to add this new check to __all__.

Otherwise this looks great!

qhelix7 commented 2 years ago

Not sure why the test workflow didn't run, I'll have to check the actions configuration, but the change is straightforward enough.

I ran the test suite locally and the doctest for isdecimaltype failed - you'll need to add this new check to __all__.

Otherwise this looks great!

Cool. isdecimaltype is now included in __all__.

seandstewart commented 2 years ago

Thanks for your contribution @qhelix7! I'll make sure to get this out in the next release (probably later today or tomorrow).