Skip to content

Switch from freezegun to time-machine.#510

Merged
foarsitter merged 2 commits intojazzband:masterfrom
adamchainz:time_machine
Mar 22, 2024
Merged

Switch from freezegun to time-machine.#510
foarsitter merged 2 commits intojazzband:masterfrom
adamchainz:time_machine

Conversation

@adamchainz
Copy link
Contributor

Problem

freezegun is slow.

Solution

time-machine is more accurate and faster.

Commandments

  • Write PEP8 compliant code.
  • Cover it with tests.
  • [n/a] Update CHANGES.rst file to describe the changes, and quote according issue with GH-<issue_number>.
  • [n/a] Pay attention to backward compatibility, or if it breaks it, explain why.
  • [n/a] Update documentation (if relevant).

@foarsitter foarsitter added this to the 4.5.0 milestone Mar 21, 2024
@foarsitter foarsitter merged commit 26336b4 into jazzband:master Mar 22, 2024
@foarsitter
Copy link
Contributor

Thanks @adamchainz

@foarsitter
Copy link
Contributor

@adamchainz I will have to revert this PR since it breaks the tests. Do you have any clue what's going wrong?

@foarsitter foarsitter mentioned this pull request Mar 22, 2024
@foarsitter
Copy link
Contributor

Setting USE_TZ = True solves the issue.

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.

2 participants