You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-dist...

62 lines
1.6 KiB

From 1ae2e18b8d71c45defe8f695a3dddd5762a611b2 Mon Sep 17 00:00:00 2001
From: Hugo van Kemenade <hugovk@users.noreply.github.com>
Date: Fri, 8 Apr 2022 13:30:42 +0300
Subject: [PATCH] Require pytest 3.6 to drop dependency on deprecated distutils
---
pytest_freezegun.py | 6 +-----
setup.cfg | 2 +-
tox.ini | 2 +-
3 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/pytest_freezegun.py b/pytest_freezegun.py
index a08133f..257c7ca 100644
--- a/pytest_freezegun.py
+++ b/pytest_freezegun.py
@@ -2,7 +2,6 @@
import pytest
-from distutils.version import LooseVersion
from freezegun import freeze_time
@@ -14,10 +13,7 @@ def get_closest_marker(node, name):
"""
Get our marker, regardless of pytest version
"""
- if LooseVersion(pytest.__version__) < LooseVersion('3.6.0'):
- return node.get_marker('freeze_time')
- else:
- return node.get_closest_marker('freeze_time')
+ return node.get_closest_marker('freeze_time')
@pytest.fixture(name=FIXTURE_NAME)
diff --git a/setup.cfg b/setup.cfg
index 069ddf7..da06223 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -31,7 +31,7 @@ py_modules =
pytest_freezegun
install_requires =
freezegun>0.3
- pytest>=3.0.0
+ pytest>=3.6
[options.entry_points]
pytest11 =
diff --git a/tox.ini b/tox.ini
index 3846fd9..07e916d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,7 +6,7 @@ envlist = {py35,py36,py37,py38,pypy3}-{pt3,pt4,pt5},py38-ptNext-fgNext,flake8
deps =
coverage
pip >= 19
- pt3: pytest>=3,<4
+ pt3: pytest>=3.6,<4
pt4: pytest>=4,<5
pt5: pytest>=5,<6
ptNext: git+https://github.com/pytest-dev/pytest/