]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Better workaround for bad datetime comparison Python bug
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 28 Oct 2021 22:51:11 +0000 (00:51 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 28 Oct 2021 22:51:11 +0000 (00:51 +0200)
commit704d632478b2cfc2dbf9d8c051aaef13a237204f
tree4c6dbff019445763a7a485f69a4e0d7f8ecb2da5
parentb748bb163d6baa8ea1e7db1c5b31f1d45b996063
Better workaround for bad datetime comparison Python bug

The problem doesn't just happen far away in the future. 2255 is enough.
See https://bugs.python.org/issue45347#msg405284

Compare timestamps by checking if their delta is 0, convert ranges bounds
to utc.

Fun fact: pytest --randomly-seed=293472621 triggers both the multirange
array bug and this.
tests/fix_faker.py