[PKG-Openstack-devel] Bug#898732: python-cliff: Updates from Ubuntu package

Corey Bryant corey.bryant at canonical.com
Tue May 15 15:06:12 BST 2018


Package: python-cliff
Version: 2.11.0-1
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu cosmic ubuntu-patch

Dear Maintainer,

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

  * d/control, d/compat: Set debhelper>=10.
  * d/control: Enable autopkgtest-pkg-python tests.
  * d/control: Drop (Build-)Depends on python3-unicodecsv as its only
    needed for Python 2 (LP: #1736717).
  * d/p/align-parsed-call-with-cmd2-versions-0.7.3.patch: Cherry-picked
    from https://review.openstack.org/#/c/548626/ to fix AttributeError
    exception with use of cmd2 parsed() method (LP: #1751822).


Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers cosmic
  APT policy: (500, 'cosmic'), (500, 'bionic-security')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-20-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru python-cliff-2.11.0/debian/compat python-cliff-2.11.0/debian/compat
--- python-cliff-2.11.0/debian/compat	2018-03-03 11:52:29.000000000 -0500
+++ python-cliff-2.11.0/debian/compat	2018-05-15 10:01:20.000000000 -0400
@@ -1 +1 @@
-9
+10
diff -Nru python-cliff-2.11.0/debian/control python-cliff-2.11.0/debian/control
--- python-cliff-2.11.0/debian/control	2018-03-03 11:52:29.000000000 -0500
+++ python-cliff-2.11.0/debian/control	2018-05-15 10:01:20.000000000 -0400
@@ -6,7 +6,7 @@
  Jan Dittberner <jandd at debian.org>,
  Thomas Goirand <zigo at debian.org>,
 Build-Depends:
- debhelper (>= 9),
+ debhelper (>= 10),
  dh-python,
  openstack-pkg-tools,
  python-all,
@@ -42,12 +42,12 @@
  python3-stevedore (>= 1.20.0),
  python3-testscenarios,
  python3-testtools (>= 2.2.0),
- python3-unicodecsv,
  python3-yaml,
 Standards-Version: 4.1.3
 Vcs-Browser: https://salsa.debian.org/openstack-team/python/python-cliff
 Vcs-Git: https://salsa.debian.org/openstack-team/python/python-cliff.git
 Homepage: https://github.com/dreamhost/cliff
+Testsuite: autopkgtest-pkg-python
 
 Package: python-cliff
 Architecture: all
@@ -103,7 +103,6 @@
  python3-pyparsing,
  python3-six,
  python3-stevedore (>= 1.20.0),
- python3-unicodecsv,
  ${misc:Depends},
  ${python3:Depends},
 Recommends:
diff -Nru python-cliff-2.11.0/debian/patches/align-parsed-call-with-cmd2-versions-0.7.3.patch python-cliff-2.11.0/debian/patches/align-parsed-call-with-cmd2-versions-0.7.3.patch
--- python-cliff-2.11.0/debian/patches/align-parsed-call-with-cmd2-versions-0.7.3.patch	1969-12-31 19:00:00.000000000 -0500
+++ python-cliff-2.11.0/debian/patches/align-parsed-call-with-cmd2-versions-0.7.3.patch	2018-05-15 10:01:20.000000000 -0400
@@ -0,0 +1,35 @@
+From a63cfc3aa9cbd5ade625317b1fb2d5c75b9a8b82 Mon Sep 17 00:00:00 2001
+From: Corey Bryant <corey.bryant at canonical.com>
+Date: Wed, 28 Feb 2018 10:49:24 -0500
+Subject: [PATCH] Align parsed() call with cmd2 versions >= 0.7.3
+
+In version 0.7.3, cmd2 moved the parsed method from class Cmd()
+to class ParserManager().
+
+Change-Id: Ie0c057ffaeaa05c4f5e0f3599aab850245c55066
+Closes-Bug: #1751822
+---
+ cliff/interactive.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/cliff/interactive.py b/cliff/interactive.py
+index 74b5f54..9aaba97 100644
+--- a/cliff/interactive.py
++++ b/cliff/interactive.py
+@@ -111,7 +111,12 @@ class InteractiveApp(cmd2.Cmd):
+             # Dispatch to the underlying help command,
+             # which knows how to provide help for extension
+             # commands.
+-            self.default(self.parsed('help ' + arg))
++            try:
++                # NOTE(coreycb): This try path can be removed once
++                # global-requirements has cmd2 >= 0.7.3.
++                self.default(self.parsed('help ' + arg))
++            except AttributeError:
++                self.default(self.parser_manager.parsed('help ' + arg))
+         else:
+             cmd2.Cmd.do_help(self, arg)
+             cmd_names = sorted([n for n, v in self.command_manager])
+-- 
+2.15.1
+
diff -Nru python-cliff-2.11.0/debian/patches/series python-cliff-2.11.0/debian/patches/series
--- python-cliff-2.11.0/debian/patches/series	1969-12-31 19:00:00.000000000 -0500
+++ python-cliff-2.11.0/debian/patches/series	2018-05-15 10:01:20.000000000 -0400
@@ -0,0 +1 @@
+align-parsed-call-with-cmd2-versions-0.7.3.patch


More information about the Openstack-devel mailing list