Skip to content
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

bpo-29535: make datetime hashes non-deterministic #15264

Open
wants to merge 13 commits into
base: master
from

Conversation

@epicfaace
Copy link
Contributor

commented Aug 14, 2019

This PR does the following:

  • Make the hash of datetime.datetime (with a timezone) non-deterministic in the Python datetime lib.
  • Make the hash of datetime.datetime (with a timezone) non-deterministic in the C datetime lib.
  • Make the hash of datetime.datetime (with a timezone) non-deterministic in the C datetime lib.
  • Make the hash of datetime.time (with a timezone such that either 1) time - timezone < 0 [underflow] or 2) time - timezone > max_time [overflow] non-deterministic in the Python datetime lib.
  • Make sure datetime tests in test_hash.py cover both the C datetime lib and the Python datetime lib (previously they covered only the C datetime lib), and cover the cases above.

https://bugs.python.org/issue29535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.