-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Avoid IEEE754 converting fraction of seconds #487
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
Avoid IEEE754 converting fraction of seconds #487
Conversation
b94c23e
to
c438e4f
Compare
c438e4f
to
4229e39
Compare
Thanks. But I feel parsing code is large enough to use regular expression.
|
Due to the limitations of IEEE754, we may lost precision when converting string back to datetime objects, for example: `float('0.511581') * 1e6`, gives us `0.511580`, which is unexpected. In order to address that issue, use of `float` is avoided
4229e39
to
1df94d3
Compare
Yep, I rewrited both timedelta and time converters as well. |
Thank you. |
Project: openstack/requirements de1b936cec39a73c205041b50ebebbaaefb56a17 Bump PyMySQL version to 0.7.6 Current min version has a microsecond rounding bug that makes it impossible to do conditional updates (compare and swap) since the datetime read by PyMySQL and therefore by SQLAlchemy does not match the one in the DB. This is affecting operations in Cinder now that we have a new cleanup mechanism. PyMySQL PR #487: PyMySQL/PyMySQL#487 Change-Id: I44ebfd593c78412bb6ce9c9ea3104c5c7c8f0af5 Closes-Bug: #1641312
Current min version has a microsecond rounding bug that makes it impossible to do conditional updates (compare and swap) since the datetime read by PyMySQL and therefore by SQLAlchemy does not match the one in the DB. This is affecting operations in Cinder now that we have a new cleanup mechanism. PyMySQL PR #487: PyMySQL/PyMySQL#487 Change-Id: I44ebfd593c78412bb6ce9c9ea3104c5c7c8f0af5 Closes-Bug: #1641312
Project: openstack/requirements de1b936cec39a73c205041b50ebebbaaefb56a17 Bump PyMySQL version to 0.7.6 Current min version has a microsecond rounding bug that makes it impossible to do conditional updates (compare and swap) since the datetime read by PyMySQL and therefore by SQLAlchemy does not match the one in the DB. This is affecting operations in Cinder now that we have a new cleanup mechanism. PyMySQL PR #487: PyMySQL/PyMySQL#487 Change-Id: I44ebfd593c78412bb6ce9c9ea3104c5c7c8f0af5 Closes-Bug: #1641312
Due to the limitations of IEEE754, we may lost precision when
converting string back to datetime objects, for example:
float('0.511581') * 1e6
, gives us0.511580
, which is unexpected.In order to address that issue, use of
float
is avoided.