diff options
| author | Sebastian Ramacher <[email protected]> | 2023-01-21 21:29:09 +0100 |
|---|---|---|
| committer | git-ubuntu importer <[email protected]> | 2023-01-24 23:25:43 +0000 |
| commit | b5672701f4fd6080aa0eacb988df2a277612300b (patch) | |
| tree | 6dc044dee63c9394d41e8df24a34c5b0cb98588d | |
| parent | 821289cffec79d640a131b8e2500935134de4099 (diff) | |
1:1.1.28-2.1 (patches unapplied)import/1%1.1.28-2.1ubuntu/oracular-develubuntu/oracularubuntu/noble-develubuntu/nobleubuntu/mantic-develubuntu/manticubuntu/lunar-proposedubuntu/lunar-develubuntu/lunardebian/bookworm
Imported using git-ubuntu import.
Notes
Notes:
[ Bas Couwenberg ]
* Non-maintainer upload.
* Add upstream patches to fix test failure with python3.11.
(Closes: #1028996)
| -rw-r--r-- | debian/changelog | 9 | ||||
| -rw-r--r-- | debian/patches/replace-getargspec-with-getfullargspec.patch | 31 | ||||
| -rw-r--r-- | debian/patches/replace-more-occurrences-of-getargspec-with-getfullargspec.patch | 70 | ||||
| -rw-r--r-- | debian/patches/series | 2 |
4 files changed, 112 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 2a93a6f..94d3354 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 <[email protected]> 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 --git a/debian/patches/replace-getargspec-with-getfullargspec.patch b/debian/patches/replace-getargspec-with-getfullargspec.patch new file mode 100644 index 0000000..8388066 --- /dev/null +++ b/debian/patches/replace-getargspec-with-getfullargspec.patch @@ -0,0 +1,31 @@ +Description: replace getargspec() with getfullargspec() + inspect.getargspec() doesn't work anymore with Python3.11 +Author: Maurizio Lombardi <[email protected]> +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 --git a/debian/patches/replace-more-occurrences-of-getargspec-with-getfullargspec.patch b/debian/patches/replace-more-occurrences-of-getargspec-with-getfullargspec.patch new file mode 100644 index 0000000..b50db4e --- /dev/null +++ b/debian/patches/replace-more-occurrences-of-getargspec-with-getfullargspec.patch @@ -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 <[email protected]> +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 --git a/debian/patches/series b/debian/patches/series index e69de29..0d2ee57 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -0,0 +1,2 @@ +replace-getargspec-with-getfullargspec.patch +replace-more-occurrences-of-getargspec-with-getfullargspec.patch |
