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

pytest-freezegun produces warnings in core tests #2171

Closed
mhsmith opened this issue Oct 25, 2023 · 1 comment · Fixed by #2160
Closed

pytest-freezegun produces warnings in core tests #2171

mhsmith opened this issue Oct 25, 2023 · 1 comment · Fixed by #2160
Labels
bug A crash or error in behavior. good first issue Is this your first time contributing? This could be a good place to start!

Comments

@mhsmith
Copy link
Member

mhsmith commented Oct 25, 2023

Every time you run the core tests, you get this warning:

../../../../.venv/bw-38/lib/python3.8/site-packages/pytest_freezegun.py:17
  /Users/msmith/.venv/bw-38/lib/python3.8/site-packages/pytest_freezegun.py:17: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(pytest.__version__) < LooseVersion('3.6.0'):

This was reported 2 years ago (ktosiek/pytest-freezegun#35), but has received no response from the maintainer. The project itself has had no commits in over 3 years.

We should replace pytest-freezegun, either with pytest-freezer (ktosiek/pytest-freezegun#44), or with simple pytest monkeypatches.

@mhsmith mhsmith added bug A crash or error in behavior. good first issue Is this your first time contributing? This could be a good place to start! labels Oct 25, 2023
@freakboy3742
Copy link
Member

Ugh - I've seen that one go past, but hadn't investigated the cause.

Avoiding the dependency entirely would always be my first preference, but monkeypatching time functions is very difficult to get right, so I think I library is probably warranted. Given pytest-freezer is being maintained by the core pytest project, that seems like a reasonably safe option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. good first issue Is this your first time contributing? This could be a good place to start!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants