[packages/python-sphinx_testing] - fix sphinx_testing.path.read_text() under python 3.10+; release 7

qboosh qboosh at pld-linux.org
Thu May 29 21:41:11 CEST 2025


commit e209ed6efa660773b63d20a5866920f44063f6cd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu May 29 21:35:27 2025 +0200

    - fix sphinx_testing.path.read_text() under python 3.10+; release 7

 python-sphinx_testing.spec |  4 +++-
 sphinx-testing-py3.patch   | 12 ++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/python-sphinx_testing.spec b/python-sphinx_testing.spec
index f59a7d2..5a209c6 100644
--- a/python-sphinx_testing.spec
+++ b/python-sphinx_testing.spec
@@ -8,12 +8,13 @@ Summary:	Testing utility classes and functions for Sphinx extensions
 Summary(pl.UTF-8):	Klasy i funkcje narzędziowe do testowania rozszerzeń Sphinksa
 Name:		python-sphinx_testing
 Version:	1.0.1
-Release:	6
+Release:	7
 License:	BSD
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/sphinx-testing/
 Source0:	https://files.pythonhosted.org/packages/source/s/sphinx-testing/sphinx-testing-%{version}.tar.gz
 # Source0-md5:	0f60adab66d877ac8c2c23f78dc7ed32
+Patch0:		sphinx-testing-py3.patch
 URL:		https://pypi.org/project/sphinx-testing/
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.6
@@ -67,6 +68,7 @@ rozszerzeń Sphinksa.
 
 %prep
 %setup -q -n sphinx-testing-%{version}
+%patch -P0 -p1
 
 %build
 %if %{with python2}
diff --git a/sphinx-testing-py3.patch b/sphinx-testing-py3.patch
new file mode 100644
index 0000000..f4b6873
--- /dev/null
+++ b/sphinx-testing-py3.patch
@@ -0,0 +1,12 @@
+--- sphinx-testing-1.0.1/src/sphinx_testing/path.py.orig	2019-01-27 03:42:35.000000000 +0100
++++ sphinx-testing-1.0.1/src/sphinx_testing/path.py	2025-05-29 21:30:47.238519319 +0200
+@@ -156,7 +156,8 @@ class path(text_type):
+         """
+         Returns the text in the file.
+         """
+-        f = open(self, mode='U', **kwargs)
++        mode = 'rU' if PY2 else 'r'
++        f = open(self, mode=mode, **kwargs)
+         try:
+             return f.read()
+         finally:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-sphinx_testing.git/commitdiff/e209ed6efa660773b63d20a5866920f44063f6cd



More information about the pld-cvs-commit mailing list