El jue, 21 abr 2022 a las 23:47, Agustin Martin
(<agmar...@debian.org>) escribió:
> If a new upstream version contains many changes that maintainer wants
> to inspect closely, it is trivial to just include upstream fix for
> this issue. I am attaching a patch (with unclosed changelog formatted
> for NMU, modify as appropriate) that should deal with this problem,
> just adapting upstream commit to Debian patch system.

Really attaching patch, sorry for the noise.

--
Agustin
diff --git a/debian/changelog b/debian/changelog
index faed735..0e926fc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+backintime (1.2.1-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * 01_tools.py_fix-1008653.patch: Get upstream changes to fix "tests no
+    longer work with Python 3.10" (Closes: #1008653).
+
+ --
+
 backintime (1.2.1-3) unstable; urgency=medium
 
   * Cherry-pick patch for #946349 from upstream Git repository
diff --git a/debian/patches/01_tools.py_fix-1008653.patch b/debian/patches/01_tools.py_fix-1008653.patch
new file mode 100644
index 0000000..0ffcbe2
--- /dev/null
+++ b/debian/patches/01_tools.py_fix-1008653.patch
@@ -0,0 +1,28 @@
+From e1ae23ddc0b4229053e3e9c6c61adcb7f3d8e9b3 Mon Sep 17 00:00:00 2001
+From: Germar Reitze <germar.rei...@gmail.com>
+Date: Mon, 5 Jul 2021 19:11:58 +0200
+Subject: [PATCH] Tests no longer work with Python 3.10 (fixes: #1175)
+
+--- a/common/tools.py
++++ b/common/tools.py
+@@ -25,7 +25,10 @@
+ import errno
+ import gzip
+ import tempfile
+-import collections
++try:
++    from collections.abc import MutableSet
++except ImportError:
++    from collections import MutableSet
+ import hashlib
+ import ipaddress
+ import atexit
+@@ -1802,7 +1805,7 @@ def reset(self, path):
+         self.history = [path,]
+         self.index = 0
+ 
+-class OrderedSet(collections.MutableSet):
++class OrderedSet(MutableSet):
+     """
+     OrderedSet from Python recipe
+     http://code.activestate.com/recipes/576694/
diff --git a/debian/patches/series b/debian/patches/series
index 78aacb2..c486f48 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 00-fix-946349.patch
+01_tools.py_fix-1008653.patch

Reply via email to