[packages/python3-pytest-relaxed] - python-pytest-relaxed.spec updated to 2.0.2 for python 3.6+/pytest 7+ (with PR for pytest 8.4+ fix
qboosh
qboosh at pld-linux.org
Tue Dec 2 21:43:00 CET 2025
commit 6f56063cb32904a75c9c7ec9064de0645fa54712
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Dec 2 21:43:09 2025 +0100
- python-pytest-relaxed.spec updated to 2.0.2 for python 3.6+/pytest 7+ (with PR for pytest 8.4+ fix)
pytest-relaxed-pytest8.4.patch | 36 ++++++++++
python-pytest-relaxed-requires.patch | 11 ---
...est-relaxed.spec => python3-pytest-relaxed.spec | 81 ++++------------------
3 files changed, 48 insertions(+), 80 deletions(-)
---
diff --git a/python-pytest-relaxed.spec b/python3-pytest-relaxed.spec
similarity index 51%
rename from python-pytest-relaxed.spec
rename to python3-pytest-relaxed.spec
index 01ae375..f45840a 100644
--- a/python-pytest-relaxed.spec
+++ b/python3-pytest-relaxed.spec
@@ -1,48 +1,35 @@
#
# Conditional build:
-%bcond_with doc # Sphinx documentation (TODO: requires releases module)
+%bcond_with doc # Sphinx documentation
%bcond_with tests # unit tests (some failures)
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
Summary: Relaxed test discovery/organization for pytest
Summary(pl.UTF-8): Rozluźnione wyszukiwanie/organizacja testów dla pytesta
-Name: python-pytest-relaxed
-# keep 1.x here for python2 support
-Version: 1.1.5
-Release: 3
+Name: python3-pytest-relaxed
+Version: 2.0.2
+Release: 1
License: BSD
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/pytest-relaxed/
Source0: https://files.pythonhosted.org/packages/source/p/pytest-relaxed/pytest-relaxed-%{version}.tar.gz
-# Source0-md5: 86bd9f3ecafe6fcb09c7ec67e2556672
-Patch0: %{name}-requires.patch
+# Source0-md5: 86e717d539817c911bbc86981bca94e4
+# https://github.com/bitprophet/pytest-relaxed/pull/34
+Patch0: pytest-relaxed-pytest8.4.patch
URL: https://pypi.org/project/pytest-relaxed/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-decorator >= 4
-BuildRequires: python-pytest >= 3
-BuildRequires: python-six >= 1
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-modules >= 1:3.6
BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-decorator >= 4
-BuildRequires: python3-pytest >= 3
+BuildRequires: python3-pytest >= 7
BuildRequires: python3-six >= 1
%endif
-%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
BuildRequires: python3-releases
BuildRequires: sphinx-pdg-3
%endif
-Requires: python-modules >= 1:2.7
+Requires: python3-modules >= 1:3.6
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -53,19 +40,6 @@ pytest-relaxed provides "relaxed" test discovery for pytest.
pytest-relaxed pozwala na "złagodzone" wyszukiwanie testów dla
pytesta.
-%package -n python3-pytest-relaxed
-Summary: Relaxed test discovery/organization for pytest
-Summary(pl.UTF-8): Rozluźnione wyszukiwanie/organizacja testów dla pytesta
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.4
-
-%description -n python3-pytest-relaxed
-pytest-relaxed provides "relaxed" test discovery for pytest.
-
-%description -n python3-pytest-relaxed -l pl.UTF-8
-pytest-relaxed pozwala na "złagodzone" wyszukiwanie testów dla
-pytesta.
-
%package apidocs
Summary: API documentation for Python pytest-relaxed module
Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest-relaxed
@@ -79,30 +53,17 @@ Dokumentacja API modułu Pythona pytest-relaxed.
%prep
%setup -q -n pytest-relaxed-%{version}
-%patch -P 0 -p1
+%patch -P0 -p1
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTHONPATH=$(pwd) \
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS="pytester,pytest_relaxed"
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%if %{with tests}
PYTHONPATH=$(pwd) \
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS="pytester,pytest_relaxed" \
+PYTEST_PLUGINS="pytest_relaxed.plugin" \
%{__python3} -m pytest tests
%endif
-%endif
%if %{with doc}
sphinx-build-3 -b html docs docs/_build/html
@@ -111,34 +72,16 @@ sphinx-build-3 -b html docs docs/_build/html
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
%py3_install
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc LICENSE README.rst
-%{py_sitescriptdir}/pytest_relaxed
-%{py_sitescriptdir}/pytest_relaxed-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pytest-relaxed
-%defattr(644,root,root,755)
-%doc LICENSE README.rst
%{py3_sitescriptdir}/pytest_relaxed
%{py3_sitescriptdir}/pytest_relaxed-%{version}-py*.egg-info
-%endif
%if %{with doc}
%files apidocs
diff --git a/pytest-relaxed-pytest8.4.patch b/pytest-relaxed-pytest8.4.patch
new file mode 100644
index 0000000..8143c60
--- /dev/null
+++ b/pytest-relaxed-pytest8.4.patch
@@ -0,0 +1,36 @@
+From df6dc3c920b42aa44a5bb3086ee7a3b38c2b886e Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson at debian.org>
+Date: Sun, 14 Sep 2025 12:42:29 +0100
+Subject: [PATCH] Fix compatibility with pytest 8.4
+
+https://github.com/pytest-dev/pytest/pull/12473 removed
+`_pytestfixturefunction`. The `getfixturemarker` function is still
+private, but has existed across all pytest versions that we support.
+
+Fixes: #33
+---
+ pytest_relaxed/classes.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pytest_relaxed/classes.py b/pytest_relaxed/classes.py
+index 9d6b48a..727d99a 100644
+--- a/pytest_relaxed/classes.py
++++ b/pytest_relaxed/classes.py
+@@ -6,6 +6,7 @@
+
+ # NOTE: don't see any other way to get access to pytest innards besides using
+ # the underscored name :(
++from _pytest.fixtures import getfixturemarker
+ from _pytest.python import PyCollector
+
+
+@@ -27,8 +28,7 @@ def istestfunction(obj, name):
+ "teardown",
+ "teardown_method",
+ )
+- # TODO: is this reliable? how about __pytest_wrapped__?
+- is_fixture = hasattr(obj, "_pytestfixturefunction")
++ is_fixture = getfixturemarker(obj) is not None
+ return not (is_hidden_name or is_fixture)
+
+
diff --git a/python-pytest-relaxed-requires.patch b/python-pytest-relaxed-requires.patch
deleted file mode 100644
index 39321ac..0000000
--- a/python-pytest-relaxed-requires.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- pytest-relaxed-1.1.5/setup.py.orig 2019-06-14 20:05:29.000000000 +0200
-+++ pytest-relaxed-1.1.5/setup.py 2021-02-16 22:06:47.642151874 +0100
-@@ -24,7 +24,7 @@
- # TODO: do we need to name the LHS 'pytest_relaxed' too? meh
- "pytest11": ["relaxed = pytest_relaxed.plugin"]
- },
-- install_requires=["pytest>=3,<5", "six>=1,<2", "decorator>=4,<5"],
-+ install_requires=["pytest>=3", "six>=1,<2", "decorator>=4,<5"],
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Framework :: Pytest",
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest-relaxed.git/commitdiff/6f56063cb32904a75c9c7ec9064de0645fa54712
More information about the pld-cvs-commit
mailing list