Package: release.debian.org
Severity: normal
X-Debbugs-Cc: josef81...@gmail.com, t...@debian.org, ruben.undh...@gmail.com
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package scikit-rf.

[ Reason ]
This update allows the python package to import without error by importing the collections.abc python package in replacement of the collections python package because collections.abc contains the Sequence and MutableMapping attributes (see #1032392).

[ Impact ]
With this fix, the package does not throw an AttributeError when being imported in a python console. scikit-rf has no reverse-dependencies, so there is no impact on other packages.

[ Tests ]
dh_auto_test runs during the build and would fail the build if tests failed. I installed the new .deb and ran `import skrf` and `from skrf import Network` in a python console. No error was thrown and running `skrf` produces <module 'skrf' from '/usr/lib/python3/dist-packages/skrf/__init__.py'> as expected. The updates were also reviewed by the DD who signed and uploaded the package.

[ Risks ]
scikit-rf has no reverse-dependencies so there are no risks.

[ Checklist ]
  [X] all changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in testing

unblock: scikit-rf/0.15.4-2.1

--
Josef Schneider

GPG Fingerprint 3267 0331 DB61 A817 7D25 4D05 5A44 BC12 F2A8 E58F
diff -Nru scikit-rf-0.15.4/debian/changelog scikit-rf-0.15.4/debian/changelog
--- scikit-rf-0.15.4/debian/changelog   2020-12-02 09:46:23.000000000 +0100
+++ scikit-rf-0.15.4/debian/changelog   2023-04-04 19:53:06.000000000 +0200
@@ -1,3 +1,11 @@
+scikit-rf (0.15.4-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch to import python package collections.abc instead of collections.
+    + Fixes AttributeError when importing the package (Closes: #1032392).
+
+ -- Josef Schneider <josef81...@gmail.com>  Tue, 04 Apr 2023 19:53:06 +0200
+
 scikit-rf (0.15.4-2) unstable; urgency=medium
 
   * First source-only upload
diff -Nru scikit-rf-0.15.4/debian/patches/0002-import-collections-abc.patch 
scikit-rf-0.15.4/debian/patches/0002-import-collections-abc.patch
--- scikit-rf-0.15.4/debian/patches/0002-import-collections-abc.patch   
1970-01-01 01:00:00.000000000 +0100
+++ scikit-rf-0.15.4/debian/patches/0002-import-collections-abc.patch   
2023-04-04 19:53:06.000000000 +0200
@@ -0,0 +1,43 @@
+From eb86566f22b80cf782585dc04d872fc11b437946 Mon Sep 17 00:00:00 2001
+From: Josef Schneider <josef81...@gmail.com>
+Date: Tue, 4 Apr 2023 20:04:21 +0200
+Subject: [PATCH] import collections abc
+
+---
+ skrf/util.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/skrf/util.py b/skrf/util.py
+index b9566f3..355ec0e 100644
+--- a/skrf/util.py
++++ b/skrf/util.py
+@@ -32,7 +32,7 @@ import six.moves.cPickle as pickle
+ 
+ import numpy as npy
+ from datetime import datetime
+-import collections
++import collections.abc
+ import pprint
+ import re
+ from subprocess import Popen, PIPE
+@@ -286,7 +286,7 @@ def findReplace(directory, find, replace, filePattern):
+ 
+ # general purpose objects
+ 
+-class HomoList(collections.Sequence):
++class HomoList(collections.abc.Sequence):
+     '''
+ 
+     A Homogeneous Sequence
+@@ -384,7 +384,7 @@ class HomoList(collections.Sequence):
+         return pprint.pformat(self.store)
+ 
+ 
+-class HomoDict(collections.MutableMapping):
++class HomoDict(collections.abc.MutableMapping):
+     '''
+     A Homogeneous Mutable Mapping
+ 
+-- 
+2.38.1
+
diff -Nru scikit-rf-0.15.4/debian/patches/series 
scikit-rf-0.15.4/debian/patches/series
--- scikit-rf-0.15.4/debian/patches/series      2020-12-02 09:45:36.000000000 
+0100
+++ scikit-rf-0.15.4/debian/patches/series      2023-04-04 19:53:06.000000000 
+0200
@@ -1 +1,2 @@
 0001-Included-script-should-run-with-Python-3.patch
+0002-import-collections-abc.patch

Attachment: OpenPGP_0x5A44BC12F2A8E58F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to