[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#858838: marked as done (unblock: python-qtawesome/0.4.4+ds1-1 (pre-approval))



Your message dated Tue, 11 Apr 2017 14:15:00 +0000
with message-id <cfe96ba6-57bb-c32e-d710-ce12664576d4@thykier.net>
and subject line Re: Bug#858838: unblock: python-qtawesome/0.4.4+ds1-1
has caused the Debian Bug report #858838,
regarding unblock: python-qtawesome/0.4.4+ds1-1 (pre-approval)
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 owner@bugs.debian.org
immediately.)


-- 
858838: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858838
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package python-qtawesome

An important bug was found on the QtAwesome Python library but was
wrongly assigned to spyder at the time of the freeze (#844601). Upstream
then released version 0.4.4, which only contains the fix for the said
bug.

I have prepared an update including the new upstream release fixing this
bug, also merged a downstream fix from Ubuntu and improved the DEP-8
tests to cover all supported Python versions. The corresponding debdiff
is attached with this email. I would like to request your approval for
pushing this update to unstable and letting it migrate to Stretch.

Best regards,
Ghis

unblock python-qtawesome/0.4.4+ds1-1

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru python-qtawesome-0.4.3/CHANGELOG.md python-qtawesome-0.4.4+ds1/CHANGELOG.md
--- python-qtawesome-0.4.3/CHANGELOG.md	2017-01-22 13:13:15.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/CHANGELOG.md	2017-01-28 22:03:42.000000000 +0000
@@ -1,5 +1,19 @@
 # History of changes
 
+## Version 0.4.4 (2017-01-28)
+
+### Bugs fixed
+
+**Pull requests**
+
+* [PR 70](https://github.com/spyder-ide/qtawesome/pull/70) - PR: Prevent segfaults when importing QtAwesome out of a of QApplication
+
+In this release 1 pull request was merged
+
+
+----
+
+
 ## Version 0.4.3 (2017-01-22)
 
 ### Bugs fixed
diff -Nru python-qtawesome-0.4.3/debian/changelog python-qtawesome-0.4.4+ds1/debian/changelog
--- python-qtawesome-0.4.3/debian/changelog	2017-01-24 00:47:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/debian/changelog	2017-03-27 14:50:02.000000000 +0100
@@ -1,3 +1,14 @@
+python-qtawesome (0.4.4+ds1-1) unstable; urgency=medium
+
+  * Filter spurious bytecode files from tarball
+  * New upstream release (Closes: #844601)
+  * Call xvfb-run with -a -s "-screen 0 1024x768x24 +extension GLX" to fix
+    segfaults on Ubuntu.
+    Thanks to Dmitry Shachnev
+  * Run autopkgtests for all supported Python versions
+
+ -- Ghislain Antony Vaillant <ghisvail@gmail.com>  Mon, 27 Mar 2017 14:50:02 +0100
+
 python-qtawesome (0.4.3-1) unstable; urgency=medium
 
   * Switch to git-dpm
diff -Nru python-qtawesome-0.4.3/debian/copyright python-qtawesome-0.4.4+ds1/debian/copyright
--- python-qtawesome-0.4.3/debian/copyright	2017-01-24 00:47:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/debian/copyright	2017-03-27 14:50:02.000000000 +0100
@@ -1,6 +1,8 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: qtawesome
 Source: https://github.com/spyder-ide/qtawesome
+Comment: Spurious bytecode files are excluded.
+Files-Excluded: qtawesome/tests/__pycache__/*
 
 Files: *
 Copyright: 2015 The Spyder Development Team
diff -Nru python-qtawesome-0.4.3/debian/.git-dpm python-qtawesome-0.4.4+ds1/debian/.git-dpm
--- python-qtawesome-0.4.3/debian/.git-dpm	2017-01-24 00:47:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/debian/.git-dpm	2017-03-27 14:50:02.000000000 +0100
@@ -1,11 +1,11 @@
 # see git-dpm(1) from git-dpm package
-a699b9288646c00802eaaa95c0d1e353decd6364
-a699b9288646c00802eaaa95c0d1e353decd6364
-503eba56b88b7cb3cd3930dbb13ccc91ce5057ff
-503eba56b88b7cb3cd3930dbb13ccc91ce5057ff
-python-qtawesome_0.4.3.orig.tar.gz
-c03d11d444a1c8ce704c40720e36125d01a3cf6b
-158547
+bd70c9f1881f0a3bede47757db183a7a2ddc7cff
+bd70c9f1881f0a3bede47757db183a7a2ddc7cff
+1852c97f07a08c89330741387f9ea36dee74a8bf
+1852c97f07a08c89330741387f9ea36dee74a8bf
+python-qtawesome_0.4.4+ds1.orig.tar.gz
+528605f1d2ba0e760508b73153d9bd45da88283e
+158896
 debianTag="debian/%e%v"
 patchedTag="patched/%e%v"
 upstreamTag="upstream/%e%u"
diff -Nru python-qtawesome-0.4.3/debian/patches/0001-Make-intersphinx-link-with-system-documentation.patch python-qtawesome-0.4.4+ds1/debian/patches/0001-Make-intersphinx-link-with-system-documentation.patch
--- python-qtawesome-0.4.3/debian/patches/0001-Make-intersphinx-link-with-system-documentation.patch	2017-01-24 00:47:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/debian/patches/0001-Make-intersphinx-link-with-system-documentation.patch	2017-03-27 14:50:02.000000000 +0100
@@ -1,4 +1,4 @@
-From 797dd345de78a16bd7cf50b38cbabc4f494554d4 Mon Sep 17 00:00:00 2001
+From f63f0017409f13b480f535e07be54671f2a15048 Mon Sep 17 00:00:00 2001
 From: Ghislain Antony Vaillant <ghisvail@gmail.com>
 Date: Mon, 11 Jul 2016 15:12:19 +0100
 Subject: Make intersphinx link with system documentation
diff -Nru python-qtawesome-0.4.3/debian/patches/0002-Use-system-fonts.patch python-qtawesome-0.4.4+ds1/debian/patches/0002-Use-system-fonts.patch
--- python-qtawesome-0.4.3/debian/patches/0002-Use-system-fonts.patch	2017-01-24 00:47:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/debian/patches/0002-Use-system-fonts.patch	2017-03-27 14:50:02.000000000 +0100
@@ -1,4 +1,4 @@
-From a699b9288646c00802eaaa95c0d1e353decd6364 Mon Sep 17 00:00:00 2001
+From bd70c9f1881f0a3bede47757db183a7a2ddc7cff Mon Sep 17 00:00:00 2001
 From: Ghislain Antony Vaillant <ghisvail@gmail.com>
 Date: Mon, 23 Jan 2017 23:31:11 +0000
 Subject: Use system fonts
@@ -8,10 +8,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/qtawesome/iconic_font.py b/qtawesome/iconic_font.py
-index 597bd59..704d957 100644
+index af67000..0ab618e 100644
 --- a/qtawesome/iconic_font.py
 +++ b/qtawesome/iconic_font.py
-@@ -28,7 +28,7 @@ from six import unichr
+@@ -30,7 +30,7 @@ from six import unichr
  
  # Linux packagers, please set this to True if you want to make qtawesome
  # use system fonts
diff -Nru python-qtawesome-0.4.3/debian/rules python-qtawesome-0.4.4+ds1/debian/rules
--- python-qtawesome-0.4.3/debian/rules	2017-01-24 00:47:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/debian/rules	2017-03-27 14:50:02.000000000 +0100
@@ -20,5 +20,5 @@
 ifeq (,$(findstring nocheck,$(DEB_BUILD_PROFILES)))
 	PYBUILD_SYSTEM=custom \
 	PYBUILD_TEST_ARGS="cd {build_dir}; {interpreter} {dir}/example.py" \
-		xvfb-run dh_auto_test
+		xvfb-run -a -s "-screen 0 1024x768x24 +extension GLX" dh_auto_test
 endif
diff -Nru python-qtawesome-0.4.3/debian/tests/control python-qtawesome-0.4.4+ds1/debian/tests/control
--- python-qtawesome-0.4.3/debian/tests/control	2017-01-24 00:47:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/debian/tests/control	2017-03-27 14:50:02.000000000 +0100
@@ -1,5 +1,23 @@
-Test-Command: xvfb-run python example.py
-Depends: python-qtawesome, xauth, xvfb
+Test-Command: set -e
+ ; cp example.py "$AUTOPKGTEST_TMP"
+ ; for py in $(pyversions -r 2>/dev/null)
+ ; do cd "$AUTOPKGTEST_TMP"
+ ; echo "Testing with $py:"
+ ; xvfb-run -a -s "-screen 0 1024x768x24 +extension GLX" $py example.py
+ ; done
+Depends: python-all,
+         python-qtawesome,
+         xauth,
+         xvfb
 
-Test-Command: xvfb-run python3 example.py
-Depends: python3-qtawesome, xauth, xvfb
+Test-Command: set -e
+ ; cp example.py "$AUTOPKGTEST_TMP"
+ ; for py in $(py3versions -r 2>/dev/null)
+ ; do cd "$AUTOPKGTEST_TMP"
+ ; echo "Testing with $py:"
+ ; xvfb-run -a -s "-screen 0 1024x768x24 +extension GLX" $py example.py
+ ; done
+Depends: python3-all,
+         python3-qtawesome,
+         xauth,
+         xvfb
diff -Nru python-qtawesome-0.4.3/debian/watch python-qtawesome-0.4.4+ds1/debian/watch
--- python-qtawesome-0.4.3/debian/watch	2017-01-24 00:47:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/debian/watch	2017-03-27 14:50:02.000000000 +0100
@@ -1,3 +1,5 @@
 version=4
-opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
+opts=repacksuffix=+ds1,\
+dversionmangle=s/\+(debian|dfsg|ds|deb)(\.?\d+)?$//,\
+uversionmangle=s/(rc|a|b|c)/~$1/ \
 https://pypi.debian.net/QtAwesome/QtAwesome@ANY_VERSION@@ARCHIVE_EXT@
diff -Nru python-qtawesome-0.4.3/MANIFEST.in python-qtawesome-0.4.4+ds1/MANIFEST.in
--- python-qtawesome-0.4.3/MANIFEST.in	2017-01-22 13:11:27.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/MANIFEST.in	2017-01-28 00:24:20.000000000 +0000
@@ -3,3 +3,4 @@
 exclude docs/*.yml
 include CHANGELOG.md LICENSE README.md
 include example.py
+recursive-include qtawesome/tests *
diff -Nru python-qtawesome-0.4.3/PKG-INFO python-qtawesome-0.4.4+ds1/PKG-INFO
--- python-qtawesome-0.4.3/PKG-INFO	2017-01-22 13:16:00.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/PKG-INFO	2017-01-28 22:06:02.000000000 +0000
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: QtAwesome
-Version: 0.4.3
+Version: 0.4.4
 Summary: FontAwesome icons in PyQt and PySide applications
 Home-page: https://github.com/spyder-ide/qtawesome
 Author: Sylvain Corlay
diff -Nru python-qtawesome-0.4.3/qtawesome/iconic_font.py python-qtawesome-0.4.4+ds1/qtawesome/iconic_font.py
--- python-qtawesome-0.4.3/qtawesome/iconic_font.py	2017-01-19 16:14:22.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/qtawesome/iconic_font.py	2017-01-28 00:24:20.000000000 +0000
@@ -18,11 +18,13 @@
 import json
 import os
 import hashlib
+import warnings
 
 # Third party imports
 from qtpy.QtCore import QObject, QPoint, QRect, qRound, Qt
 from qtpy.QtGui import (QColor, QFont, QFontDatabase, QIcon, QIconEngine,
                         QPainter, QPixmap)
+from qtpy.QtWidgets import QApplication
 from six import unichr
 
 
@@ -205,38 +207,41 @@
                 os.path.dirname(os.path.realpath(__file__)), 'fonts')
 
         # Load font
-        id_ = QFontDatabase.addApplicationFont(os.path.join(directory,
-                                                            ttf_filename))
-        loadedFontFamilies = QFontDatabase.applicationFontFamilies(id_)
-        if(loadedFontFamilies):
-            self.fontname[prefix] = loadedFontFamilies[0]
-        else:
-            raise FontError(u"Font at '{0}' appears to be empty. "
-                            "If you are on Windows 10, please read "
-                            "https://support.microsoft.com/en-us/kb/3053676 "
-                            "to know how to prevent Windows from blocking "
-                            "the fonts that come with QtAwesome.".format(
-                            os.path.join(directory, ttf_filename)))
-
-        with open(os.path.join(directory, charmap_filename), 'r') as codes:
-            self.charmap[prefix] = json.load(codes, object_hook=hook)
-
-        # Verify that vendorized fonts are not corrupt
-        if not SYSTEM_FONTS:
-            md5_hashes = {'fontawesome-webfont.ttf':
-                          'a3de2170e4e9df77161ea5d3f31b2668',
-                          'elusiveicons-webfont.ttf':
-                          '207966b04c032d5b873fd595a211582e'}
-            ttf_hash = md5_hashes.get(ttf_filename, None)
-            if ttf_hash is not None:
-                hasher = hashlib.md5()
-                with open(os.path.join(directory, ttf_filename), 'rb') as f:
-                    content = f.read()
-                    hasher.update(content)
-                ttf_calculated_hash_code = hasher.hexdigest()
-                if ttf_calculated_hash_code != ttf_hash:
-                    raise FontError(u"Font is corrupt at: '{0}'".format(
-                                    os.path.join(directory, ttf_filename)))
+        if QApplication.instance() is not None:
+            id_ = QFontDatabase.addApplicationFont(os.path.join(directory,
+                                                                ttf_filename))
+            loadedFontFamilies = QFontDatabase.applicationFontFamilies(id_)
+            if(loadedFontFamilies):
+                self.fontname[prefix] = loadedFontFamilies[0]
+            else:
+                raise FontError(u"Font at '{0}' appears to be empty. "
+                                "If you are on Windows 10, please read "
+                                "https://support.microsoft.com/";
+                                "en-us/kb/3053676 "
+                                "to know how to prevent Windows from blocking "
+                                "the fonts that come with QtAwesome.".format(
+                                        os.path.join(directory, ttf_filename)))
+
+            with open(os.path.join(directory, charmap_filename), 'r') as codes:
+                self.charmap[prefix] = json.load(codes, object_hook=hook)
+
+            # Verify that vendorized fonts are not corrupt
+            if not SYSTEM_FONTS:
+                md5_hashes = {'fontawesome-webfont.ttf':
+                              'a3de2170e4e9df77161ea5d3f31b2668',
+                              'elusiveicons-webfont.ttf':
+                              '207966b04c032d5b873fd595a211582e'}
+                ttf_hash = md5_hashes.get(ttf_filename, None)
+                if ttf_hash is not None:
+                    hasher = hashlib.md5()
+                    with open(os.path.join(directory, ttf_filename),
+                              'rb') as f:
+                        content = f.read()
+                        hasher.update(content)
+                    ttf_calculated_hash_code = hasher.hexdigest()
+                    if ttf_calculated_hash_code != ttf_hash:
+                        raise FontError(u"Font is corrupt at: '{0}'".format(
+                                        os.path.join(directory, ttf_filename)))
 
     def icon(self, *names, **kwargs):
         """Return a QIcon object corresponding to the provided icon name."""
@@ -247,17 +252,22 @@
             error = '"options" must be a list of size {0}'.format(len(names))
             raise Exception(error)
 
-        parsed_options = []
-        for i in range(len(options_list)):
-            specific_options = options_list[i]
-            parsed_options.append(self._parse_options(specific_options,
-                                                      general_options,
-                                                      names[i]))
+        if QApplication.instance() is not None:
+            parsed_options = []
+            for i in range(len(options_list)):
+                specific_options = options_list[i]
+                parsed_options.append(self._parse_options(specific_options,
+                                                          general_options,
+                                                          names[i]))
 
-        # Process high level API
-        api_options = parsed_options
+            # Process high level API
+            api_options = parsed_options
 
-        return self._icon_by_painter(self.painter, api_options)
+            return self._icon_by_painter(self.painter, api_options)
+        else:
+            warnings.warn("You need to have a running "
+                          "QApplication to use QtAwesome!")
+            return QIcon()
 
     def _parse_options(self, specific_options, general_options, name):
         options = dict(_default_options, **general_options)
diff -Nru python-qtawesome-0.4.3/qtawesome/tests/test_qtawesome.py python-qtawesome-0.4.4+ds1/qtawesome/tests/test_qtawesome.py
--- python-qtawesome-0.4.3/qtawesome/tests/test_qtawesome.py	1970-01-01 01:00:00.000000000 +0100
+++ python-qtawesome-0.4.4+ds1/qtawesome/tests/test_qtawesome.py	2017-01-28 00:24:20.000000000 +0000
@@ -0,0 +1,16 @@
+r"""
+Tests for QtAwesome.
+"""
+# Standard library imports
+import subprocess
+
+# Test Library imports
+import pytest
+
+def test_segfault_import():
+    output_number = subprocess.call('python -c "import qtawesome '
+                                    '; qtawesome.icon()"', shell=True)
+    assert output_number == 0
+    
+if __name__ == "__main__":
+    pytest.main()
diff -Nru python-qtawesome-0.4.3/qtawesome/_version.py python-qtawesome-0.4.4+ds1/qtawesome/_version.py
--- python-qtawesome-0.4.3/qtawesome/_version.py	2017-01-22 13:14:54.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/qtawesome/_version.py	2017-01-28 22:05:23.000000000 +0000
@@ -1,2 +1,2 @@
-version_info = (0, 4, 3)
+version_info = (0, 4, 4)
 __version__ = '.'.join(map(str, version_info))
diff -Nru python-qtawesome-0.4.3/QtAwesome.egg-info/PKG-INFO python-qtawesome-0.4.4+ds1/QtAwesome.egg-info/PKG-INFO
--- python-qtawesome-0.4.3/QtAwesome.egg-info/PKG-INFO	2017-01-22 13:16:00.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/QtAwesome.egg-info/PKG-INFO	2017-01-28 22:06:01.000000000 +0000
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: QtAwesome
-Version: 0.4.3
+Version: 0.4.4
 Summary: FontAwesome icons in PyQt and PySide applications
 Home-page: https://github.com/spyder-ide/qtawesome
 Author: Sylvain Corlay
diff -Nru python-qtawesome-0.4.3/QtAwesome.egg-info/SOURCES.txt python-qtawesome-0.4.4+ds1/QtAwesome.egg-info/SOURCES.txt
--- python-qtawesome-0.4.3/QtAwesome.egg-info/SOURCES.txt	2017-01-22 13:16:00.000000000 +0000
+++ python-qtawesome-0.4.4+ds1/QtAwesome.egg-info/SOURCES.txt	2017-01-28 22:06:02.000000000 +0000
@@ -24,4 +24,6 @@
 qtawesome/fonts/elusiveicons-webfont-charmap.json
 qtawesome/fonts/elusiveicons-webfont.ttf
 qtawesome/fonts/fontawesome-webfont-charmap.json
-qtawesome/fonts/fontawesome-webfont.ttf
\ No newline at end of file
+qtawesome/fonts/fontawesome-webfont.ttf
+qtawesome/tests/test_qtawesome.py
+qtawesome/tests/__pycache__/test_qtawesome.cpython-35-PYTEST.pyc
\ No newline at end of file

--- End Message ---
--- Begin Message ---
Ghislain Vaillant:
> control: tags -1 - moreinfo
> 
> On 05/04/17 18:21, Niels Thykier wrote:
>> Please go ahead and remove the moreinfo tag once the upload has been
>> performed and built on all relevant release architectures.
> 
> Uploaded to unstable.
> 
> Thanks,
> Ghis

Unblocked, thanks.

~Niels

--- End Message ---

Reply to: