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
"27 years from now" tests fail on platforms with 32-bit time_t
(y2k38 problem)
#176
Comments
Thanks for the report!
Looks like the exception is coming from the https://github.com/spulec/freezegun test library, so might be worth reporting something there. Anyway, skipping sounds reasonable in this case, would you like to create a PR? I don't have a setup to test it. |
It's basically coming from Python, when given a date that's outside
Sure, I will file one in a minute. |
Change the frozen date in test_time from 2020 to 2010, in order to fix overflow when processing "27 years from now" date on systems with 32-bit time_t. Since the date is arbitrary and frozen anyway, this seems to be the cleanest solution to keep the test suite working portably. Fixes python-humanize#176
Filed #177. In the end, I've figured out it's cleaner to change the base date not to trigger overflows in the first place. |
Fixes #176 Changes proposed in this pull request: * Change the frozen date from 2020 to 2010, in order to avoid going past 2038 that breaks systems with 32-bit `time_t`. Since the tests are run against frozen time anyway, this shouldn't have any negative consequences, and will resolve the y2k38 issue that's not really related to the project. --------- Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
What did you do?
tox -e py311
on a 32-bit x86 system.What did you expect to happen?
Tests passing (possibly by skipping these tests on
OverflowError
).What actually happened?
What versions are you using?
The text was updated successfully, but these errors were encountered: