Hello community,

here is the log from the commit of package python-qtconsole for 
openSUSE:Factory checked in at 2020-09-17 14:49:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-qtconsole (Old)
 and      /work/SRC/openSUSE:Factory/.python-qtconsole.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-qtconsole"

Thu Sep 17 14:49:31 2020 rev:12 rq:834970 version:4.7.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-qtconsole/python-qtconsole.changes        
2020-08-29 20:44:55.669529739 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-qtconsole.new.4249/python-qtconsole.changes  
    2020-09-17 14:52:06.083982611 +0200
@@ -1,0 +2,11 @@
+Wed Sep 16 11:27:20 UTC 2020 - Benjamin Greiner <[email protected]>
+
+- skip two tests: gh#jupyter/qtconsole#443 
+
+-------------------------------------------------------------------
+Sat Sep  5 16:23:19 UTC 2020 - Arun Persaud <[email protected]>
+
+- update to version 4.7.7:
+  * Change font width calculation to use horizontalAdvance
+
+-------------------------------------------------------------------

Old:
----
  qtconsole-4.7.6.tar.gz

New:
----
  qtconsole-4.7.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-qtconsole.spec ++++++
--- /var/tmp/diff_new_pack.xUt6Ix/_old  2020-09-17 14:52:11.015987319 +0200
+++ /var/tmp/diff_new_pack.xUt6Ix/_new  2020-09-17 14:52:11.019987323 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define         skip_python2 1
 Name:           python-qtconsole
-Version:        4.7.6
+Version:        4.7.7
 Release:        0
 Summary:        Jupyter Qt console
 License:        BSD-3-Clause
@@ -114,7 +114,8 @@
 
 %check
 export QT_QPA_PLATFORM="offscreen"
-%pytest
+# test skips: https://github.com/jupyter/qtconsole/issues/443
+%pytest -k "not (test_00 and (test_scroll or test_debug))"
 
 %post -n jupyter-qtconsole
 %python_install_alternative jupyter-qtconsole

++++++ qtconsole-4.7.6.tar.gz -> qtconsole-4.7.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.6/PKG-INFO new/qtconsole-4.7.7/PKG-INFO
--- old/qtconsole-4.7.6/PKG-INFO        2020-08-17 19:23:57.000000000 +0200
+++ new/qtconsole-4.7.7/PKG-INFO        2020-09-03 06:02:46.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: qtconsole
-Version: 4.7.6
+Version: 4.7.7
 Summary: Jupyter Qt console
 Home-page: http://jupyter.org
 Author: Jupyter Development Team
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.6/docs/source/changelog.rst 
new/qtconsole-4.7.7/docs/source/changelog.rst
--- old/qtconsole-4.7.6/docs/source/changelog.rst       2020-08-17 
19:21:44.000000000 +0200
+++ new/qtconsole-4.7.7/docs/source/changelog.rst       2020-09-03 
05:55:38.000000000 +0200
@@ -8,6 +8,15 @@
 4.7
 ~~~
 
+.. _4.7.7:
+
+4.7.7
+-----
+
+`4.7.7 on GitHub <https://github.com/jupyter/qtconsole/milestones/4.7.7>`__
+
+* Change font width calculation to use horizontalAdvance
+
 .. _4.7.6:
 
 4.7.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.6/qtconsole/_version.py 
new/qtconsole-4.7.7/qtconsole/_version.py
--- old/qtconsole-4.7.6/qtconsole/_version.py   2020-08-17 19:23:05.000000000 
+0200
+++ new/qtconsole-4.7.7/qtconsole/_version.py   2020-09-03 06:01:53.000000000 
+0200
@@ -1,2 +1,2 @@
-version_info = (4, 7, 6)
+version_info = (4, 7, 7)
 __version__ = '.'.join(map(str, version_info))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.6/qtconsole/completion_html.py 
new/qtconsole-4.7.7/qtconsole/completion_html.py
--- old/qtconsole-4.7.6/qtconsole/completion_html.py    2020-08-17 
19:19:15.000000000 +0200
+++ new/qtconsole-4.7.7/qtconsole/completion_html.py    2020-09-03 
05:53:18.000000000 +0200
@@ -309,7 +309,7 @@
         self._consecutive_tab = 1
         # Calculate the number of characters available.
         width = self._text_edit.document().textWidth()
-        char_width = 
QtGui.QFontMetrics(self._console_widget.font).boundingRect(' ').width()
+        char_width = self._console_widget._get_font_width()
         displaywidth = int(max(10, (width / char_width) - 1))
         items_m, ci = text.compute_item_matrix(items, empty=' ',
                                                displaywidth=displaywidth)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.6/qtconsole/console_widget.py 
new/qtconsole-4.7.7/qtconsole/console_widget.py
--- old/qtconsole-4.7.6/qtconsole/console_widget.py     2020-08-17 
19:19:15.000000000 +0200
+++ new/qtconsole-4.7.7/qtconsole/console_widget.py     2020-09-03 
05:53:18.000000000 +0200
@@ -488,7 +488,7 @@
         # a fudge factor of one character here.
         # Note 2: QFontMetrics.maxWidth is not used here or anywhere else due
         # to a Qt bug on certain Mac OS systems where it returns 0.
-        width = font_metrics.boundingRect(' ').width() * self.console_width + 
margin
+        width = self._get_font_width() * self.console_width + margin
         width += style.pixelMetric(QtWidgets.QStyle.PM_ScrollBarExtent)
 
         if self.paging == 'hsplit':
@@ -752,12 +752,20 @@
         """
         return self._control.document().defaultFont()
 
+    def _get_font_width(self, font=None):
+        if font is None:
+            font = self.font
+        font_metrics = QtGui.QFontMetrics(font)
+        if hasattr(font_metrics, 'horizontalAdvance'):
+            return font_metrics.horizontalAdvance(' ')
+        else:
+            return font_metrics.width(' ')
+
     def _set_font(self, font):
         """ Sets the base font for the ConsoleWidget to the specified QFont.
         """
-        font_metrics = QtGui.QFontMetrics(font)
         self._control.setTabStopWidth(
-            self.tab_width * font_metrics.boundingRect(' ').width()
+            self.tab_width * self._get_font_width(font)
         )
 
         self._completion_widget.setFont(font)
@@ -893,8 +901,7 @@
     def _set_tab_width(self, tab_width):
         """ Sets the width (in terms of space characters) for tab characters.
         """
-        font_metrics = QtGui.QFontMetrics(self.font)
-        self._control.setTabStopWidth(tab_width * font_metrics.boundingRect(' 
').width())
+        self._control.setTabStopWidth(tab_width * self._get_font_width())
 
         self._tab_width = tab_width
 
@@ -1637,7 +1644,7 @@
         """
         # Calculate the number of characters available.
         width = self._control.document().textWidth()
-        char_width = QtGui.QFontMetrics(self.font).boundingRect(' ').width()
+        char_width = self._get_font_width()
         displaywidth = max(10, (width / char_width) - 1)
 
         return columnize(items, separator, displaywidth)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.6/qtconsole.egg-info/PKG-INFO 
new/qtconsole-4.7.7/qtconsole.egg-info/PKG-INFO
--- old/qtconsole-4.7.6/qtconsole.egg-info/PKG-INFO     2020-08-17 
19:23:54.000000000 +0200
+++ new/qtconsole-4.7.7/qtconsole.egg-info/PKG-INFO     2020-09-03 
06:02:43.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: qtconsole
-Version: 4.7.6
+Version: 4.7.7
 Summary: Jupyter Qt console
 Home-page: http://jupyter.org
 Author: Jupyter Development Team


Reply via email to