Skip to content

Conversation

MichaelSquires
Copy link

This PR makes the following changes:

  • Change behavior of ReaderFlags.BIGNUM_AS_RAW:
    • Old behavior: Return big numbers (>= 2**64, < -2**63) as Decimals.
    • New behavior: Return big numbers (>= 2**64, < -2**63) as python long integers.
  • Change behavior of ReaderFlags.NUMBERS_AS_RAW:
    • Old behavior: Return all numbers as Decimals.
    • New behavior: Return all numbers as python long integers.
  • Added tests to validate behavior of serializing/deserializing numbers with various flags.

Note: These changes are not backward compatible and will probably require a major version bump.

@MichaelSquires
Copy link
Author

Hi, I realize this is a potentially controversial change and I'm glad to discuss it. Basically, we needed to be able to deserialize large integers without the Decimal() wrapper. This seemed like a good place/way to split it. Hopefully you agree :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant