diff options
Diffstat (limited to 'dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-distutils-depr.patch')
-rw-r--r-- | dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-distutils-depr.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-distutils-depr.patch b/dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-distutils-depr.patch new file mode 100644 index 000000000000..86b7e32a5c1f --- /dev/null +++ b/dev-python/pytest-freezegun/files/pytest-freezegun-0.4.2-distutils-depr.patch @@ -0,0 +1,61 @@ +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/ |