Control: tags 1028996 + pending

Dear maintainer,

I've prepared an NMU for python-configshell-fb (versioned as 1:1.1.28-2.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Cheers
-- 
Sebastian Ramacher
diff -Nru python-configshell-fb-1.1.28/debian/changelog python-configshell-fb-1.1.28/debian/changelog
--- python-configshell-fb-1.1.28/debian/changelog	2021-01-23 01:31:23.000000000 +0100
+++ python-configshell-fb-1.1.28/debian/changelog	2023-01-21 21:29:09.000000000 +0100
@@ -1,3 +1,12 @@
+python-configshell-fb (1:1.1.28-2.1) unstable; urgency=medium
+
+  [ Bas Couwenberg ]
+  * Non-maintainer upload.
+  * Add upstream patches to fix test failure with python3.11.
+    (Closes: #1028996)
+
+ -- Sebastian Ramacher <sramac...@debian.org>  Sat, 21 Jan 2023 21:29:09 +0100
+
 python-configshell-fb (1:1.1.28-2) unstable; urgency=medium
 
   * d/t/control: Remove "Tests" header.  Use "@" as "Depends".
diff -Nru python-configshell-fb-1.1.28/debian/patches/replace-getargspec-with-getfullargspec.patch python-configshell-fb-1.1.28/debian/patches/replace-getargspec-with-getfullargspec.patch
--- python-configshell-fb-1.1.28/debian/patches/replace-getargspec-with-getfullargspec.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-configshell-fb-1.1.28/debian/patches/replace-getargspec-with-getfullargspec.patch	2023-01-21 21:29:07.000000000 +0100
@@ -0,0 +1,31 @@
+Description: replace getargspec() with getfullargspec()
+ inspect.getargspec() doesn't work anymore with Python3.11
+Author: Maurizio Lombardi <mlomb...@redhat.com>
+Origin: https://github.com/open-iscsi/configshell-fb/commit/f3ac914861bd605e3d634aeeb5e706abdbd39259
+Forwarded: not-needed
+Bug-Debian: https://bugs.debian.org/1028996
+
+--- a/configshell/node.py
++++ b/configshell/node.py
+@@ -1417,10 +1417,10 @@ class ConfigNode(object):
+         @type kparams: dict
+         @raise ExecutionError: When the check fails.
+         '''
+-        spec = inspect.getargspec(method)
++        spec = inspect.getfullargspec(method)
+         args = spec.args[1:]
+         pp = spec.varargs
+-        kw = spec.keywords
++        kw = spec.varkw
+ 
+         if spec.defaults is None:
+             nb_opt_params = 0
+@@ -1460,7 +1460,7 @@ class ConfigNode(object):
+                 "Missing required parameters %s"
+                 % ", ".join("'%s'" % missing for missing in missing_params))
+ 
+-        if spec.keywords is None:
++        if kw is None:
+             if len(unexpected_keywords) == 1:
+                 raise ExecutionError(
+                     "Unexpected keyword parameter '%s'."
diff -Nru python-configshell-fb-1.1.28/debian/patches/replace-more-occurrences-of-getargspec-with-getfullargspec.patch python-configshell-fb-1.1.28/debian/patches/replace-more-occurrences-of-getargspec-with-getfullargspec.patch
--- python-configshell-fb-1.1.28/debian/patches/replace-more-occurrences-of-getargspec-with-getfullargspec.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-configshell-fb-1.1.28/debian/patches/replace-more-occurrences-of-getargspec-with-getfullargspec.patch	2023-01-21 21:29:07.000000000 +0100
@@ -0,0 +1,70 @@
+Description: Replace more occurrences of getargspec() with getfullargspec()
+ Follow up for f3ac914861bd605e3d634aeeb5e706abdbd39259, getargspec was used at two more places.
+Author: Vojtech Trefny <vtre...@redhat.com>
+Origin: https://github.com/open-iscsi/configshell-fb/commit/343e46cbbbed339c67fe969cdf443af4c979f43e
+Forwarded: not-needed
+Bug-Debian: https://bugs.debian.org/1028996
+
+--- a/configshell/node.py
++++ b/configshell/node.py
+@@ -1575,12 +1575,12 @@ class ConfigNode(object):
+         @type command: str
+         '''
+         method = self.get_command_method(command)
+-        parameters, args, kwargs, default = inspect.getargspec(method)
+-        parameters = parameters[1:]
+-        if default is None:
++        spec = inspect.getfullargspec(method)
++        parameters = spec.args[1:]
++        if spec.defaults is None:
+             num_defaults = 0
+         else:
+-            num_defaults = len(default)
++            num_defaults = len(spec.defaults)
+ 
+         if num_defaults != 0:
+             required_parameters = parameters[:-num_defaults]
+@@ -1605,16 +1605,16 @@ class ConfigNode(object):
+         syntax += optional_parameters_str
+ 
+         comments = []
+-        if args is not None:
+-            syntax += "[%s...] " % args
+-        if kwargs is not None:
+-            syntax += "[%s=value...] " % (kwargs)
++        if spec.varargs is not None:
++            syntax += "[%s...] " % spec.varargs
++        if spec.varkw is not None:
++            syntax += "[%s=value...] " % (spec.varkw)
+ 
+         default_values = ''
+         if num_defaults > 0:
+             for index, param in enumerate(optional_parameters):
+-                if default[index] is not None:
+-                    default_values += "%s=%s " % (param, str(default[index]))
++                if spec.defaults[index] is not None:
++                    default_values += "%s=%s " % (param, str(spec.defaults[index]))
+ 
+         return syntax, comments, default_values
+ 
+@@ -1630,14 +1630,14 @@ class ConfigNode(object):
+         @rtype: ([str...], bool, bool)
+         '''
+         method = self.get_command_method(command)
+-        parameters, args, kwargs, default = inspect.getargspec(method)
+-        parameters = parameters[1:]
+-        if args is not None:
+-            free_pparams = args
++        spec = inspect.getfullargspec(method)
++        parameters = spec.args[1:]
++        if spec.varargs is not None:
++            free_pparams = spec.varargs
+         else:
+             free_pparams = False
+-        if kwargs is not None:
+-            free_kparams = kwargs
++        if spec.varkw is not None:
++            free_kparams = spec.varkw
+         else:
+             free_kparams = False
+         self.shell.log.debug("Signature is %s, %s, %s."
diff -Nru python-configshell-fb-1.1.28/debian/patches/series python-configshell-fb-1.1.28/debian/patches/series
--- python-configshell-fb-1.1.28/debian/patches/series	2021-01-22 16:19:36.000000000 +0100
+++ python-configshell-fb-1.1.28/debian/patches/series	2023-01-21 21:29:07.000000000 +0100
@@ -0,0 +1,2 @@
+replace-getargspec-with-getfullargspec.patch
+replace-more-occurrences-of-getargspec-with-getfullargspec.patch

Reply via email to