[packages/python-ptyprocess] - added fix for tests on python 3.13

qboosh qboosh at pld-linux.org
Fri Jun 27 21:21:33 CEST 2025


commit a48ebd04a3f011b1f0a7907bdc0747205efb5cd9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jun 27 21:22:57 2025 +0200

    - added fix for tests on python 3.13

 ptyprocess-unittest.patch | 10 ++++++++++
 python-ptyprocess.spec    |  2 ++
 2 files changed, 12 insertions(+)
---
diff --git a/python-ptyprocess.spec b/python-ptyprocess.spec
index ca7733d..d490f2c 100644
--- a/python-ptyprocess.spec
+++ b/python-ptyprocess.spec
@@ -15,6 +15,7 @@ Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/ptyprocess/
 Source0:	https://files.pythonhosted.org/packages/source/p/ptyprocess/ptyprocess-%{version}.tar.gz
 # Source0-md5:	9da200c397cb1752209a6b718b6cfc68
+Patch0:		ptyprocess-unittest.patch
 URL:		https://github.com/pexpect/ptyprocess
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.7
@@ -90,6 +91,7 @@ Dokumentacja API ptyprocess.
 
 %prep
 %setup -q -n ptyprocess-%{version}
+%patch -P0 -p1
 
 # fix invalid mapping
 sed -i -e "s#^intersphinx_mapping =.*#intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}#g" docs/conf.py
diff --git a/ptyprocess-unittest.patch b/ptyprocess-unittest.patch
new file mode 100644
index 0000000..e4c902d
--- /dev/null
+++ b/ptyprocess-unittest.patch
@@ -0,0 +1,10 @@
+unittest.makeSuite has been removed in python 3.13
+--- ptyprocess-0.7.0/tests/test_invalid_binary.py.orig	2015-12-09 17:48:31.280371400 +0100
++++ ptyprocess-0.7.0/tests/test_invalid_binary.py	2025-06-27 20:28:43.812681414 +0200
+@@ -70,5 +70,5 @@ class InvalidBinaryChars(unittest.TestCa
+ if __name__ == '__main__':
+     unittest.main()
+ 
+-suite = unittest.makeSuite(InvalidBinaryChars,'test')
++suite = unittest.TestLoader().loadTestsFromTestCase(InvalidBinaryChars)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-ptyprocess.git/commitdiff/a48ebd04a3f011b1f0a7907bdc0747205efb5cd9



More information about the pld-cvs-commit mailing list