[packages/python-bleach] - updated to 3.3.1; tests fail with python 3.9+

qboosh qboosh at pld-linux.org
Thu Oct 13 21:29:42 CEST 2022


commit 0730390f662b9b1fde225b39935f8f8fb15e31ce
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Oct 13 21:30:37 2022 +0200

    - updated to 3.3.1; tests fail with python 3.9+

 python-bleach-pytest.patch | 11 -----------
 python-bleach.spec         | 29 ++++++++++++++++++-----------
 2 files changed, 18 insertions(+), 22 deletions(-)
---
diff --git a/python-bleach.spec b/python-bleach.spec
index 026609a..5e5295f 100644
--- a/python-bleach.spec
+++ b/python-bleach.spec
@@ -9,14 +9,14 @@
 Summary:	An easy safelist-based HTML-sanitizing tool
 Summary(pl.UTF-8):	Proste, oparte na liście elementów bezpiecznych, narzędzie do porządkowania HTML-a
 Name:		python-bleach
-Version:	3.1.0
-Release:	6
+# keep 3.x here for python2 support
+Version:	3.3.1
+Release:	1
 License:	Apache v2.0
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/bleach/
 Source0:	https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz
-# Source0-md5:	fc8df989e0200a45f7a3a95ef9ee9854
-Patch0:		%{name}-pytest.patch
+# Source0-md5:	b4c1b8f27289f9e5d73792daed4c0879
 URL:		https://pypi.org/project/bleach/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
@@ -25,17 +25,15 @@ BuildRequires:	python-modules >= 1:2.7
 BuildRequires:	python-setuptools
 %if %{with tests}
 BuildRequires:	python-pytest >= 3.0.0
-BuildRequires:	python-pytest-runner >= 2.0
 BuildRequires:	python-six >= 1.9.0
 BuildRequires:	python-webencodings
 %endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-modules >= 1:3.4
+BuildRequires:	python3-modules >= 1:3.5
 BuildRequires:	python3-setuptools
 %if %{with tests}
 BuildRequires:	python3-pytest >= 3.0.0
-BuildRequires:	python3-pytest-runner >= 2.0
 BuildRequires:	python3-six >= 1.9.0
 BuildRequires:	python3-webencodings
 %endif
@@ -59,7 +57,7 @@ zabezpieczająca lub usuwająca znaczniki i atrybuty.
 Summary:	An easy safelist-based HTML-sanitizing tool
 Summary(pl.UTF-8):	Proste, oparte na liście elementów bezpiecznych, narzędzie do porządkowania HTML-a
 Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.4
+Requires:	python3-modules >= 1:3.5
 
 %description -n python3-bleach
 Bleach is an allowed-list-based HTML sanitizing library that escapes
@@ -82,15 +80,24 @@ Dokumentacja API modułu Pythona bleach.
 
 %prep
 %setup -q -n bleach-%{version}
-%patch0 -p1
 
 %build
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests
+%endif
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
 %endif
 
 %if %{with doc}
diff --git a/python-bleach-pytest.patch b/python-bleach-pytest.patch
deleted file mode 100644
index 0405929..0000000
--- a/python-bleach-pytest.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- bleach-3.1.0/setup.py.orig	2018-11-09 14:09:24.000000000 +0100
-+++ bleach-3.1.0/setup.py	2019-10-09 17:13:57.918597037 +0200
-@@ -11,7 +11,7 @@
- setup_requires = []
- if 'test' in sys.argv:
-     # Only add pytest-runner to setup_requires if running tests
--    setup_requires.append('pytest-runner>=2.0,<3dev')
-+    setup_requires.append('pytest-runner>=2.0')
- 
- tests_require = [
-     'pytest>=3.0.0',
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-bleach.git/commitdiff/0730390f662b9b1fde225b39935f8f8fb15e31ce



More information about the pld-cvs-commit mailing list