[Python-modules-team] Bug#1002187: junos-eznc: FTBFS: dh_auto_test: error: pybuild --test -i python{version} -p "3.10 3.9" returned exit code 13

Lukas Märdian slyon at ubuntu.com
Fri Jan 21 08:34:03 GMT 2022


Package: junos-eznc
Version: 2.1.7-3
Followup-For: Bug #1002187
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
X-Debbugs-Cc: slyon at ubuntu.com
Control: tags -1 patch

Dear Maintainer,

The 'collections.MutableMapping' alias was removed in Python 3.8,
'collections.abc.MutableMapping' should be used instead.

In Ubuntu, the attached patch was applied to achieve the following:

  * Cherry-pick upstream commits (partly) to fix FTBFS with Python 3.8+
    b9bff50 and 74631fc: use new collections.abc module (Closes: #1002187)

https://github.com/Juniper/py-junos-eznc/commit/b9bff50665e5b7375a75d6c885bc36a4b8468227
https://github.com/Juniper/py-junos-eznc/commit/74631fc97627bac8d7d40fb8ab4d382269f6b16f

Thanks for considering the patch.

Cheers,
  Lukas


-- System Information:
Debian Release: 11.0
  APT prefers impish-updates
  APT policy: (500, 'impish-updates'), (500, 'impish-security'), (500, 'impish'), (100, 'impish-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.13.0-23-generic (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru junos-eznc-2.1.7/debian/patches/74631fc97627bac8d7d40fb8ab4d382269f6b16f.patch junos-eznc-2.1.7/debian/patches/74631fc97627bac8d7d40fb8ab4d382269f6b16f.patch
--- junos-eznc-2.1.7/debian/patches/74631fc97627bac8d7d40fb8ab4d382269f6b16f.patch	1970-01-01 01:00:00.000000000 +0100
+++ junos-eznc-2.1.7/debian/patches/74631fc97627bac8d7d40fb8ab4d382269f6b16f.patch	2022-01-21 09:24:44.000000000 +0100
@@ -0,0 +1,25 @@
+From 74631fc97627bac8d7d40fb8ab4d382269f6b16f Mon Sep 17 00:00:00 2001
+From: Karthikeyan Singaravelan <tir.karthi at gmail.com>
+Date: Tue, 17 Nov 2020 05:53:10 +0000
+Subject: [PATCH] Use try/except instead of six.moves.
+
+---
+ lib/jnpr/junos/factcache.py       | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/lib/jnpr/junos/factcache.py b/lib/jnpr/junos/factcache.py
+index 4b2016785..a57216e96 100644
+--- a/lib/jnpr/junos/factcache.py
++++ b/lib/jnpr/junos/factcache.py
+@@ -1,7 +1,10 @@
+ import warnings
+ from pprint import pformat
+ 
+-from six.moves.collections_abc import MutableMapping
++try:
++    from collections.abc import MutableMapping
++except ImportError:
++    from collections import MutableMapping
+ 
+ import jnpr.junos.facts
+ from jnpr.junos.facts import __doc__ as facts_doc
diff -Nru junos-eznc-2.1.7/debian/patches/b9bff50665e5b7375a75d6c885bc36a4b8468227.patch junos-eznc-2.1.7/debian/patches/b9bff50665e5b7375a75d6c885bc36a4b8468227.patch
--- junos-eznc-2.1.7/debian/patches/b9bff50665e5b7375a75d6c885bc36a4b8468227.patch	1970-01-01 01:00:00.000000000 +0100
+++ junos-eznc-2.1.7/debian/patches/b9bff50665e5b7375a75d6c885bc36a4b8468227.patch	2022-01-21 09:24:44.000000000 +0100
@@ -0,0 +1,30 @@
+From b9bff50665e5b7375a75d6c885bc36a4b8468227 Mon Sep 17 00:00:00 2001
+From: Karthikeyan Singaravelan <tir.karthi at gmail.com>
+Date: Fri, 22 May 2020 04:07:32 +0000
+Subject: [PATCH] Import ABC from collections.abc for Python 3 compatibility.
+
+---
+ lib/jnpr/junos/factcache.py       | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/jnpr/junos/factcache.py b/lib/jnpr/junos/factcache.py
+index 396d106d7..84e2f8307 100644
+--- a/lib/jnpr/junos/factcache.py
++++ b/lib/jnpr/junos/factcache.py
+@@ -1,13 +1,14 @@
+-import collections
+ import warnings
+ from pprint import pformat
+ 
++from six.moves.collections_abc import MutableMapping
++
+ import jnpr.junos.facts
+ from jnpr.junos.facts import __doc__ as facts_doc
+ import jnpr.junos.exception
+ 
+ 
+-class _FactCache(collections.MutableMapping):
++class _FactCache(MutableMapping):
+     """
+     A dictionary-like object which performs on-demand fact gathering.
+ 
diff -Nru junos-eznc-2.1.7/debian/patches/series junos-eznc-2.1.7/debian/patches/series
--- junos-eznc-2.1.7/debian/patches/series	2019-09-04 10:15:03.000000000 +0200
+++ junos-eznc-2.1.7/debian/patches/series	2022-01-21 09:24:44.000000000 +0100
@@ -1,2 +1,4 @@
 0001-Do-not-provide-the-key-if-it-comes-from-the-SSH-conf.patch
 0002-Detect-format-set-when-using-insert-keyword.patch
+b9bff50665e5b7375a75d6c885bc36a4b8468227.patch
+74631fc97627bac8d7d40fb8ab4d382269f6b16f.patch


More information about the Python-modules-team mailing list