From 52a0028775c6dd167795a15bb452c67739084ec1 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Thu, 30 Dec 2021 17:48:11 +0100 Subject: New upstream version --- .../0002-Python-3.10-compatibility-fix.patch | 109 --------------------- 1 file changed, 109 deletions(-) delete mode 100644 debian/patches/0002-Python-3.10-compatibility-fix.patch (limited to 'debian/patches/0002-Python-3.10-compatibility-fix.patch') diff --git a/debian/patches/0002-Python-3.10-compatibility-fix.patch b/debian/patches/0002-Python-3.10-compatibility-fix.patch deleted file mode 100644 index 52ffb09..0000000 --- a/debian/patches/0002-Python-3.10-compatibility-fix.patch +++ /dev/null @@ -1,109 +0,0 @@ -From: Gard Spreemann -Date: Sun, 21 Nov 2021 15:12:18 +0100 -Subject: Python 3.10 compatibility fix - -Importing Sequence et al. from collections has been deprecated since -Python 3.7. ---- - pyspike/DiscreteFunc.py | 6 +++--- - pyspike/PieceWiseConstFunc.py | 8 ++++---- - pyspike/PieceWiseLinFunc.py | 8 ++++---- - 3 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/pyspike/DiscreteFunc.py b/pyspike/DiscreteFunc.py -index caad290..48bc787 100644 ---- a/pyspike/DiscreteFunc.py -+++ b/pyspike/DiscreteFunc.py -@@ -5,7 +5,7 @@ - from __future__ import absolute_import, print_function - - import numpy as np --import collections -+import collections.abc - import pyspike - - -@@ -155,11 +155,11 @@ class DiscreteFunc(object): - multiplicity = np.sum(self.mp[1:-1]) - else: - # check if interval is as sequence -- assert isinstance(interval, collections.Sequence), \ -+ assert isinstance(interval, collections.abc.Sequence), \ - "Invalid value for `interval`. None, Sequence or Tuple \ - expected." - # check if interval is a sequence of intervals -- if not isinstance(interval[0], collections.Sequence): -+ if not isinstance(interval[0], collections.abc.Sequence): - # find the indices corresponding to the interval - start_ind, end_ind = get_indices(interval) - value = np.sum(self.y[start_ind:end_ind]) -diff --git a/pyspike/PieceWiseConstFunc.py b/pyspike/PieceWiseConstFunc.py -index 17fdd3f..e33c61d 100644 ---- a/pyspike/PieceWiseConstFunc.py -+++ b/pyspike/PieceWiseConstFunc.py -@@ -5,7 +5,7 @@ - from __future__ import absolute_import, print_function - - import numpy as np --import collections -+import collections.abc - import pyspike - - -@@ -39,7 +39,7 @@ class PieceWiseConstFunc(object): - - ind = np.searchsorted(self.x, t, side='right') - -- if isinstance(t, collections.Sequence): -+ if isinstance(t, collections.abc.Sequence): - # t is a sequence of values - # correct the cases t == x[0], t == x[-1] - ind[ind == 0] = 1 -@@ -173,10 +173,10 @@ class PieceWiseConstFunc(object): - return self.integral() / (self.x[-1]-self.x[0]) - - # check if interval is as sequence -- assert isinstance(interval, collections.Sequence), \ -+ assert isinstance(interval, collections.abc.Sequence), \ - "Invalid value for `interval`. None, Sequence or Tuple expected." - # check if interval is a sequence of intervals -- if not isinstance(interval[0], collections.Sequence): -+ if not isinstance(interval[0], collections.abc.Sequence): - # just one interval - a = self.integral(interval) / (interval[1]-interval[0]) - else: -diff --git a/pyspike/PieceWiseLinFunc.py b/pyspike/PieceWiseLinFunc.py -index 8faaec4..b3b503b 100644 ---- a/pyspike/PieceWiseLinFunc.py -+++ b/pyspike/PieceWiseLinFunc.py -@@ -5,7 +5,7 @@ - from __future__ import absolute_import, print_function - - import numpy as np --import collections -+import collections.abc - import pyspike - - -@@ -46,7 +46,7 @@ class PieceWiseLinFunc: - - ind = np.searchsorted(self.x, t, side='right') - -- if isinstance(t, collections.Sequence): -+ if isinstance(t, collections.abc.Sequence): - # t is a sequence of values - # correct the cases t == x[0], t == x[-1] - ind[ind == 0] = 1 -@@ -211,10 +211,10 @@ class PieceWiseLinFunc: - return self.integral() / (self.x[-1]-self.x[0]) - - # check if interval is as sequence -- assert isinstance(interval, collections.Sequence), \ -+ assert isinstance(interval, collections.abc.Sequence), \ - "Invalid value for `interval`. None, Sequence or Tuple expected." - # check if interval is a sequence of intervals -- if not isinstance(interval[0], collections.Sequence): -+ if not isinstance(interval[0], collections.abc.Sequence): - # just one interval - a = self.integral(interval) / (interval[1]-interval[0]) - else: -- cgit v1.2.3