[packages/python-deprecation] - patch to use unittest instead of unittest2 on python 3.4+

qboosh qboosh at pld-linux.org
Sun Nov 16 11:59:26 CET 2025


commit 280d869df10c5cf7bd2d52cb2a8a320e79d712e8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Nov 16 11:59:24 2025 +0100

    - patch to use unittest instead of unittest2 on python 3.4+

 deprecation-unittest.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/deprecation-unittest.patch b/deprecation-unittest.patch
new file mode 100644
index 0000000..be7cc8d
--- /dev/null
+++ b/deprecation-unittest.patch
@@ -0,0 +1,14 @@
+--- deprecation-2.1.0/tests/test_deprecation.py.orig	2020-04-20 16:14:19.000000000 +0200
++++ deprecation-2.1.0/tests/test_deprecation.py	2025-11-15 10:05:46.439456305 +0100
+@@ -12,7 +12,10 @@
+ 
+ # As we unfortunately support Python 2.7, it lacks TestCase.subTest which
+ # is in 3.4+ or in unittest2
+-import unittest2
++try:
++    import unittest2
++except ImportError:
++    import unittest as unittest2
+ import warnings
+ 
+ import deprecation
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-deprecation.git/commitdiff/280d869df10c5cf7bd2d52cb2a8a320e79d712e8



More information about the pld-cvs-commit mailing list