Package: cmd2 Version: 0.7.7-1 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu bionic ubuntu-patch
Dear Maintainer, In Ubuntu, the attached patch was applied to achieve the following: * d/p/drop-import-gtk.patch: Drop import of gtk now that pyperclip uses gi. NOTE: This requires the corresponding patch to python-pyperclip in Bug#884873 (python-pyperclip: move to gtk+3 to avoid use of mutual exclusive gtk+2/gtk+3 modules). Thanks for considering the patch. -- System Information: Debian Release: buster/sid APT prefers bionic APT policy: (500, 'bionic'), (500, 'artful-updates') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.13.0-19-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)
diff -Nru cmd2-0.7.7/debian/patches/drop-import-gtk.patch cmd2-0.7.7/debian/patches/drop-import-gtk.patch --- cmd2-0.7.7/debian/patches/drop-import-gtk.patch 1969-12-31 19:00:00.000000000 -0500 +++ cmd2-0.7.7/debian/patches/drop-import-gtk.patch 2017-12-19 16:47:30.000000000 -0500 @@ -0,0 +1,25 @@ +Description: Drop import of gtk now that pyperclip uses gi (GTK+3). +Author: Corey Bryant <corey.bry...@canonical.com> +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1722553 +Origin: https://github.com/python-cmd2/cmd2/pull/242 +Forwarded: yes + +--- a/cmd2.py ++++ b/cmd2.py +@@ -46,16 +46,6 @@ + import pyparsing + import pyperclip + +-# On some systems, pyperclip will import gtk for its clipboard functionality. +-# The following code is a workaround for gtk interfering with printing from a background +-# thread while the CLI thread is blocking in raw_input() in Python 2 on Linux. +-try: +- # noinspection PyUnresolvedReferences +- import gtk +- gtk.set_interactive(0) +-except ImportError: +- pass +- + # next(it) gets next item of iterator it. This is a replacement for calling it.next() in Python 2 and next(it) in Py3 + from six import next + diff -Nru cmd2-0.7.7/debian/patches/series cmd2-0.7.7/debian/patches/series --- cmd2-0.7.7/debian/patches/series 2017-08-27 08:30:40.000000000 -0400 +++ cmd2-0.7.7/debian/patches/series 2017-12-19 16:45:41.000000000 -0500 @@ -0,0 +1 @@ +drop-import-gtk.patch