Your message dated Mon, 01 Jan 2018 14:56:45 +0000
with message-id <[email protected]>
and subject line Bug#884873: fixed in python-pyperclip 1.6.0-1
has caused the Debian Bug report #884873,
regarding python-pyperclip: move to gtk+3 to avoid use of mutual exclusive
gtk+2/gtk+3 modules
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
884873: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884873
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-pyperclip
Version: 1.5.32-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu bionic ubuntu-patch
Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
* d/p/move-to-gtk3.patch: Use GTK+3 instead of GTK+2 (LP: #1722553).
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 python-pyperclip-1.5.32/debian/control
python-pyperclip-1.5.32/debian/control
--- python-pyperclip-1.5.32/debian/control 2017-11-03 03:05:14.000000000
-0400
+++ python-pyperclip-1.5.32/debian/control 2017-12-19 16:25:22.000000000
-0500
@@ -13,7 +13,7 @@
Package: python-pyperclip
Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, xclip | xsel |
python-gtk2 | python-qt4
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, xclip | xsel |
python-gi | python-qt4
Description: Cross-platform clipboard module for Python
This module is a cross-platform Python module for copy and paste clipboard
functions.
@@ -22,7 +22,7 @@
Package: python3-pyperclip
Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, xclip | xsel
| python3-pyqt4
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, xclip | xsel
| python3-gi | python3-pyqt4
Description: Cross-platform clipboard module for Python3
This module is a cross-platform Python3 module for copy and paste clipboard
functions.
diff -Nru python-pyperclip-1.5.32/debian/patches/move-to-gtk3.patch
python-pyperclip-1.5.32/debian/patches/move-to-gtk3.patch
--- python-pyperclip-1.5.32/debian/patches/move-to-gtk3.patch 1969-12-31
19:00:00.000000000 -0500
+++ python-pyperclip-1.5.32/debian/patches/move-to-gtk3.patch 2017-12-19
16:25:22.000000000 -0500
@@ -0,0 +1,97 @@
+Description: Switch from GTK+2 to GTK+3 to avoid import of mutually exclusive
+ modules that resulted in the following error:
+ AttributeError: When using gi.repository you must not import static modules
like
+ "gobject". Please change all occurrences of "import gobject" to
+ "from gi.repository import GObject". See:
+ https://bugzilla.gnome.org/show_bug.cgi?id=709183
+Author: Corey Bryant <[email protected]>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1722553
+Origin: https://github.com/asweigart/pyperclip/pull/111
+Forwarded: yes
+
+--- a/pyperclip/__init__.py
++++ b/pyperclip/__init__.py
+@@ -20,12 +20,13 @@
+ sudo apt-get install xclip
+ sudo apt-get install xsel
+
+-Otherwise on Linux, you will need the gtk or PyQt5/PyQt4 modules installed.
++Otherwise on Linux, you will need the gi (GTK+ 3) or PyQt5/PyQt4 modules
installed.
++gtk (GTK +2) is still supported as an older alternative to gi.
+
+ gtk and PyQt4 modules are not available for Python 3,
+ and this module does not work with PyGObject yet.
+
+-Note: There seem sto be a way to get gtk on Python 3, according to:
++Note: There seems to be a way to get gtk on Python 3, according to:
+
https://askubuntu.com/questions/697397/python3-is-not-supporting-gtk-module
+
+ Cygwin is currently not supported.
+@@ -104,11 +105,18 @@
+ # Setup for the LINUX platform:
+ if HAS_DISPLAY:
+ try:
+- import gtk # check if gtk is installed
++ import gi # check if gi is installed (for GTK+ 3)
+ except ImportError:
+- pass # We want to fail fast for all non-ImportError exceptions.
++ try:
++ import gtk # check if gtk is installed (fallback to GTK+ 2)
++ except ImportError:
++ pass # We want to fail fast for all non-ImportError
exceptions.
++ else:
++ return init_gtk_clipboard()
+ else:
+- return init_gtk_clipboard()
++ if gi.version_info[0] >= 3:
++ return init_gi_clipboard()
++ pass
+
+ if _executable_exists("xclip"):
+ return init_xclip_clipboard()
+@@ -161,6 +169,7 @@
+ clipboard_types = {'pbcopy': init_osx_pbcopy_clipboard,
+ 'pyobjc': init_osx_pyobjc_clipboard,
+ 'gtk': init_gtk_clipboard,
++ 'gi': init_gi_clipboard,
+ 'qt': init_qt_clipboard, # TODO - split this into
'qtpy', 'pyqt4', and 'pyqt5'
+ 'xclip': init_xclip_clipboard,
+ 'xsel': init_xsel_clipboard,
+--- a/pyperclip/clipboards.py
++++ b/pyperclip/clipboards.py
+@@ -57,7 +57,6 @@
+ import gtk
+
+ def copy_gtk(text):
+- global cb
+ cb = gtk.Clipboard()
+ cb.set_text(text)
+ cb.store()
+@@ -73,6 +72,27 @@
+ return copy_gtk, paste_gtk
+
+
++def init_gi_clipboard():
++ import gi
++ gi.require_version('Gtk', '3.0')
++ from gi.repository import Gtk, Gdk
++ cb = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
++
++ def copy_gi(text):
++ cb.set_text(text, -1)
++ cb.store()
++
++ def paste_gi():
++ clipboardContents = cb.wait_for_text()
++ # for python 2, returns None if the clipboard is blank.
++ if clipboardContents is None:
++ return ''
++ else:
++ return clipboardContents
++
++ return copy_gi, paste_gi
++
++
+ def init_qt_clipboard():
+ # $DISPLAY should exist
+
diff -Nru python-pyperclip-1.5.32/debian/patches/series
python-pyperclip-1.5.32/debian/patches/series
--- python-pyperclip-1.5.32/debian/patches/series 1969-12-31
19:00:00.000000000 -0500
+++ python-pyperclip-1.5.32/debian/patches/series 2017-12-19
16:25:22.000000000 -0500
@@ -0,0 +1 @@
+move-to-gtk3.patch
--- End Message ---
--- Begin Message ---
Source: python-pyperclip
Source-Version: 1.6.0-1
We believe that the bug you reported is fixed in the latest version of
python-pyperclip, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sebastien Delafond <[email protected]> (supplier of updated python-pyperclip
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Mon, 01 Jan 2018 14:58:23 +0100
Source: python-pyperclip
Binary: python-pyperclip python3-pyperclip
Architecture: source
Version: 1.6.0-1
Distribution: unstable
Urgency: medium
Maintainer: Sebastien Delafond <[email protected]>
Changed-By: Sebastien Delafond <[email protected]>
Description:
python-pyperclip - Cross-platform clipboard module for Python
python3-pyperclip - Cross-platform clipboard module for Python3
Closes: 884873
Changes:
python-pyperclip (1.6.0-1) unstable; urgency=medium
.
* New upstream version 1.6.0
* dos2unix pyperclip/*.py
* Use GTK+3 instead of GTK+2 (Closes: #884873). Thanks to Corey Bryant
for the patch.
Checksums-Sha1:
8316fad5c3d7046561ebb78fb8abc436701ef977 1757 python-pyperclip_1.6.0-1.dsc
da5e8dcb0de6784f8539e27b5c5f9cf28902e0d3 13332
python-pyperclip_1.6.0.orig.tar.xz
96b6f789575e6dab0c3f88184c673599d083b478 3760
python-pyperclip_1.6.0-1.debian.tar.xz
e0fc472f8d082204667bf657dbbb23e09090b455 7849
python-pyperclip_1.6.0-1_amd64.buildinfo
Checksums-Sha256:
cd520d16bdeb1328317eecad210b0f48eb5cff1e0f3d124768ba96f930700277 1757
python-pyperclip_1.6.0-1.dsc
7338050f2470f23c42608cd9c4b924699668b5a51f83dbf90568207af580374b 13332
python-pyperclip_1.6.0.orig.tar.xz
eceeef5ab426f7522230d15e80c0c847d86a343abba65100f0ca7aee7f0dedc9 3760
python-pyperclip_1.6.0-1.debian.tar.xz
5618b97c59184a13a91b992ba4680784b4f1486a8522c82bad1b6a7375f4333c 7849
python-pyperclip_1.6.0-1_amd64.buildinfo
Files:
ea3710a617b546bff0007773622b5627 1757 python optional
python-pyperclip_1.6.0-1.dsc
788fd4d8c2c77b4c96b364bd1762a5bd 13332 python optional
python-pyperclip_1.6.0.orig.tar.xz
4cd708ec649f9cc5f9085e48997335bf 3760 python optional
python-pyperclip_1.6.0-1.debian.tar.xz
d81ca8e9d976a40719529804bdc0e382 7849 python optional
python-pyperclip_1.6.0-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEAqSkbVtrXP4xJMh3EL6Jg/PVnWQFAlpKQMAACgkQEL6Jg/PV
nWSNdAgAvjb1uo8JW0+dEyoFJ+mdFULpbuKN5nY72eQKGsUvKzJ2kIJO2CRgAsab
Rg1Fo+JATYyFZvmKQdyPYNRLGo1DfoAH0Q5dc5T9m4l10xMSdtucPFiOr2JAHeVD
6nEvmpc8ZxcQJmvHUugMuBl/G6ZTPlzNlNB3OlwuZtYlYMD9zMrXCHyidYJwMxYn
0c2RoxF8xbJxeQXmS48qmFcahx85ca/vSIjCASYM0tW4gM+wiTZFSHDAKx5hD4ZK
ZrYSpJ+AAYMJxewI2XwHTjdGPfayuiLSKKOls96UqpfcmAqAdY5WssvpMOs8Ty7/
8k0tZ5MpPt59iH86ae+qCFUuKlArBA==
=q04h
-----END PGP SIGNATURE-----
--- End Message ---