summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2022-11-29 01:23:44 +0100
committerSebastian Pipping <sping@gentoo.org>2022-11-29 01:42:37 +0100
commitca605b5dee67291e0a12b608ef3f416e46da2fbd (patch)
tree20669dc5fe87c499632d65a68a8293b1b3224fcd /dev-python/pysvn/files
parentdev-python/pycxx: 7.1.7 + Python 3.11 + fix false remote ID (diff)
downloadgentoo-ca605b5dee67291e0a12b608ef3f416e46da2fbd.tar.gz
gentoo-ca605b5dee67291e0a12b608ef3f416e46da2fbd.tar.bz2
gentoo-ca605b5dee67291e0a12b608ef3f416e46da2fbd.zip
dev-python/pysvn: 1.9.18 + Python 3.11 + DistutilsNonPEP517Build
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
Diffstat (limited to 'dev-python/pysvn/files')
-rw-r--r--dev-python/pysvn/files/pysvn-1.9.18-tests-3.11.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-python/pysvn/files/pysvn-1.9.18-tests-3.11.patch b/dev-python/pysvn/files/pysvn-1.9.18-tests-3.11.patch
new file mode 100644
index 000000000000..06a0bec16720
--- /dev/null
+++ b/dev-python/pysvn/files/pysvn-1.9.18-tests-3.11.patch
@@ -0,0 +1,33 @@
+From 0f4a2071dfeb90357a3eba947d6dd7cc879675ce Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Tue, 29 Nov 2022 01:08:49 +0100
+Subject: [PATCH] Examples/Client/svn_cmd.py: Stop DeprecationWarning from
+ breaking tests with Python 3.11
+
+---
+ Examples/Client/svn_cmd.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/Examples/Client/svn_cmd.py b/Examples/Client/svn_cmd.py
+index 42e4c87..b8ef4ff 100644
+--- a/Examples/Client/svn_cmd.py
++++ b/Examples/Client/svn_cmd.py
+@@ -72,7 +72,14 @@ def initLocale():
+ locale.setlocale( locale.LC_ALL, '' )
+
+ else:
+- language_code, encoding = locale.getdefaultlocale()
++ import warnings
++
++ with warnings.catch_warnings():
++ if sys.version_info >= (3, 11):
++ warnings.filterwarnings("ignore", category=DeprecationWarning)
++
++ language_code, encoding = locale.getdefaultlocale()
++
+ if language_code is None:
+ language_code = 'en_GB'
+
+--
+2.38.1
+