Hello community,
here is the log from the commit of package python-qtconsole for
openSUSE:Factory checked in at 2020-08-29 20:44:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-qtconsole (Old)
and /work/SRC/openSUSE:Factory/.python-qtconsole.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-qtconsole"
Sat Aug 29 20:44:40 2020 rev:11 rq:830424 version:4.7.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-qtconsole/python-qtconsole.changes
2020-07-01 14:27:26.562906704 +0200
+++
/work/SRC/openSUSE:Factory/.python-qtconsole.new.3399/python-qtconsole.changes
2020-08-29 20:44:55.669529739 +0200
@@ -1,0 +2,9 @@
+Fri Aug 28 16:30:17 UTC 2020 - Benjamin Greiner <[email protected]>
+
+- Update to 4.7.6
+ * Replace qApp with QApplication.instance().
+ * Fix QFontMetrics.width deprecation.
+- use alternatives for entry point
+- SIP is not used anymore
+
+-------------------------------------------------------------------
Old:
----
qtconsole-4.7.5.tar.gz
New:
----
qtconsole-4.7.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-qtconsole.spec ++++++
--- /var/tmp/diff_new_pack.i0ODQh/_old 2020-08-29 20:44:56.237529977 +0200
+++ /var/tmp/diff_new_pack.i0ODQh/_new 2020-08-29 20:44:56.241529978 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-qtconsole
-Version: 4.7.5
+Version: 4.7.6
Release: 0
Summary: Jupyter Qt console
License: BSD-3-Clause
@@ -43,7 +43,6 @@
Requires: python-ipython_genutils
Requires: python-jupyter-client >= 4.1
Requires: python-jupyter-core
-Requires: python-sip
Requires: python-traitlets
Provides: python-jupyter_qtconsole = %{version}
Obsoletes: python-jupyter_qtconsole < %{version}
@@ -55,12 +54,9 @@
BuildRequires: %{python_module ipykernel >= 4.1}
BuildRequires: %{python_module ipython_genutils}
BuildRequires: %{python_module jupyter-client >= 4.1}
-BuildRequires: %{python_module nose}
-BuildRequires: %{python_module pexpect}
BuildRequires: %{python_module pytest-qt}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module qt5}
-BuildRequires: %{python_module sip}
BuildRequires: %{python_module traitlets}
# /SECTION
%python_subpackages
@@ -114,10 +110,18 @@
%suse_update_desktop_file -i -r jupyter-qtconsole "System;TerminalEmulator;"
popd
+%python_clone -a %{buildroot}%{_bindir}/jupyter-qtconsole
+
%check
export QT_QPA_PLATFORM="offscreen"
%pytest
+%post -n jupyter-qtconsole
+%python_install_alternative jupyter-qtconsole
+
+%postun -n jupyter-qtconsole
+%python_uninstall_alternative jupyter-qtconsole
+
%files %{python_files}
%license LICENSE
%{python_sitelib}/qtconsole-%{version}-py*.egg-info
@@ -125,7 +129,7 @@
%files -n jupyter-qtconsole
%license LICENSE
-%{_bindir}/jupyter-qtconsole
+%python_alternative %{_bindir}/jupyter-qtconsole
%{_datadir}/applications/jupyter-qtconsole.desktop
%{_datadir}/icons/hicolor/scalable/apps/JupyterQtConsole.svg
++++++ qtconsole-4.7.5.tar.gz -> qtconsole-4.7.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-4.7.5/PKG-INFO new/qtconsole-4.7.6/PKG-INFO
--- old/qtconsole-4.7.5/PKG-INFO 2020-06-22 18:43:00.000000000 +0200
+++ new/qtconsole-4.7.6/PKG-INFO 2020-08-17 19:23:57.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: qtconsole
-Version: 4.7.5
+Version: 4.7.6
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.5/docs/source/changelog.rst
new/qtconsole-4.7.6/docs/source/changelog.rst
--- old/qtconsole-4.7.5/docs/source/changelog.rst 2020-06-22
18:39:16.000000000 +0200
+++ new/qtconsole-4.7.6/docs/source/changelog.rst 2020-08-17
19:21:44.000000000 +0200
@@ -8,6 +8,16 @@
4.7
~~~
+.. _4.7.6:
+
+4.7.6
+-----
+
+`4.7.6 on GitHub <https://github.com/jupyter/qtconsole/milestones/4.7.6>`__
+
+* Replace qApp with QApplication.instance().
+* Fix QFontMetrics.width deprecation.
+
.. _4.7.5:
4.7.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-4.7.5/qtconsole/_version.py
new/qtconsole-4.7.6/qtconsole/_version.py
--- old/qtconsole-4.7.5/qtconsole/_version.py 2020-06-22 18:40:40.000000000
+0200
+++ new/qtconsole-4.7.6/qtconsole/_version.py 2020-08-17 19:23:05.000000000
+0200
@@ -1,2 +1,2 @@
-version_info = (4, 7, 5)
+version_info = (4, 7, 6)
__version__ = '.'.join(map(str, version_info))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-4.7.5/qtconsole/call_tip_widget.py
new/qtconsole-4.7.6/qtconsole/call_tip_widget.py
--- old/qtconsole-4.7.5/qtconsole/call_tip_widget.py 2020-06-22
18:28:02.000000000 +0200
+++ new/qtconsole-4.7.6/qtconsole/call_tip_widget.py 2020-08-17
19:19:15.000000000 +0200
@@ -157,9 +157,9 @@
# Locate and show the widget. Place the tip below the current line
# unless it would be off the screen. In that case, decide the best
# location based trying to minimize the area that goes off-screen.
- padding = 3 # Distance in pixels between cursor bounds and tip box.
+ padding = 3 # Distance in pixels between cursor bounds and tip box.
cursor_rect = text_edit.cursorRect(cursor)
- screen_rect = QtWidgets.qApp.desktop().screenGeometry(text_edit)
+ screen_rect =
QtWidgets.QApplication.instance().desktop().screenGeometry(text_edit)
point = text_edit.mapToGlobal(cursor_rect.bottomRight())
point.setY(point.y() + padding)
tip_height = self.size().height()
@@ -244,7 +244,7 @@
# If Enter events always came after Leave events, we wouldn't need
# this check. But on Mac OS, it sometimes happens the other way
# around when the tooltip is created.
- QtWidgets.qApp.topLevelAt(QtGui.QCursor.pos()) != self):
+ QtWidgets.QApplication.instance().topLevelAt(QtGui.QCursor.pos())
!= self):
self._hide_timer.start(300, self)
def _format_tooltip(self, doc):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-4.7.5/qtconsole/completion_html.py
new/qtconsole-4.7.6/qtconsole/completion_html.py
--- old/qtconsole-4.7.5/qtconsole/completion_html.py 2020-06-22
18:36:48.000000000 +0200
+++ new/qtconsole-4.7.6/qtconsole/completion_html.py 2020-08-17
19:19:15.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).width(' ')
+ char_width =
QtGui.QFontMetrics(self._console_widget.font).boundingRect(' ').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.5/qtconsole/console_widget.py
new/qtconsole-4.7.6/qtconsole/console_widget.py
--- old/qtconsole-4.7.5/qtconsole/console_widget.py 2020-06-22
18:36:48.000000000 +0200
+++ new/qtconsole-4.7.6/qtconsole/console_widget.py 2020-08-17
19:19:15.000000000 +0200
@@ -420,7 +420,7 @@
new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
self._ctrl_down_remap[key],
QtCore.Qt.NoModifier)
- QtWidgets.qApp.sendEvent(obj, new_event)
+ QtWidgets.QApplication.instance().sendEvent(obj, new_event)
return True
elif obj == self._control:
@@ -488,8 +488,9 @@
# 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.width(' ') * self.console_width + margin
+ width = font_metrics.boundingRect(' ').width() * self.console_width +
margin
width += style.pixelMetric(QtWidgets.QStyle.PM_ScrollBarExtent)
+
if self.paging == 'hsplit':
width = width * 2 + splitwidth
@@ -755,7 +756,9 @@
""" Sets the base font for the ConsoleWidget to the specified QFont.
"""
font_metrics = QtGui.QFontMetrics(font)
- self._control.setTabStopWidth(self.tab_width * font_metrics.width(' '))
+ self._control.setTabStopWidth(
+ self.tab_width * font_metrics.boundingRect(' ').width()
+ )
self._completion_widget.setFont(font)
self._control.document().setDefaultFont(font)
@@ -891,7 +894,7 @@
""" Sets the width (in terms of space characters) for tab characters.
"""
font_metrics = QtGui.QFontMetrics(self.font)
- self._control.setTabStopWidth(tab_width * font_metrics.width(' '))
+ self._control.setTabStopWidth(tab_width * font_metrics.boundingRect('
').width())
self._tab_width = tab_width
@@ -1327,13 +1330,13 @@
new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
QtCore.Qt.Key_Return,
QtCore.Qt.NoModifier)
- QtWidgets.qApp.sendEvent(self._control, new_event)
+ QtWidgets.QApplication.instance().sendEvent(self._control,
new_event)
intercepted = True
else:
new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
QtCore.Qt.Key_Delete,
QtCore.Qt.NoModifier)
- QtWidgets.qApp.sendEvent(self._control, new_event)
+ QtWidgets.QApplication.instance().sendEvent(self._control,
new_event)
intercepted = True
#------ Alt modifier
---------------------------------------------------
@@ -1566,14 +1569,14 @@
new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
QtCore.Qt.Key_PageDown,
QtCore.Qt.NoModifier)
- QtWidgets.qApp.sendEvent(self._page_control, new_event)
+ QtWidgets.QApplication.instance().sendEvent(self._page_control,
new_event)
return True
elif key == QtCore.Qt.Key_Backspace:
new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
QtCore.Qt.Key_PageUp,
QtCore.Qt.NoModifier)
- QtWidgets.qApp.sendEvent(self._page_control, new_event)
+ QtWidgets.QApplication.instance().sendEvent(self._page_control,
new_event)
return True
# vi/less -like key bindings
@@ -1581,7 +1584,7 @@
new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
QtCore.Qt.Key_Down,
QtCore.Qt.NoModifier)
- QtWidgets.qApp.sendEvent(self._page_control, new_event)
+ QtWidgets.QApplication.instance().sendEvent(self._page_control,
new_event)
return True
# vi/less -like key bindings
@@ -1589,7 +1592,7 @@
new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,
QtCore.Qt.Key_Up,
QtCore.Qt.NoModifier)
- QtWidgets.qApp.sendEvent(self._page_control, new_event)
+ QtWidgets.QApplication.instance().sendEvent(self._page_control,
new_event)
return True
return False
@@ -1634,7 +1637,7 @@
"""
# Calculate the number of characters available.
width = self._control.document().textWidth()
- char_width = QtGui.QFontMetrics(self.font).width(' ')
+ char_width = QtGui.QFontMetrics(self.font).boundingRect(' ').width()
displaywidth = max(10, (width / char_width) - 1)
return columnize(items, separator, displaywidth)
@@ -2093,7 +2096,7 @@
cursor.StartOfLine, cursor.KeepAnchor)
elif act.action == 'beep':
- QtWidgets.qApp.beep()
+ QtWidgets.QApplication.instance().beep()
elif act.action == 'backspace':
if not cursor.atBlockStart():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-4.7.5/qtconsole.egg-info/PKG-INFO
new/qtconsole-4.7.6/qtconsole.egg-info/PKG-INFO
--- old/qtconsole-4.7.5/qtconsole.egg-info/PKG-INFO 2020-06-22
18:42:58.000000000 +0200
+++ new/qtconsole-4.7.6/qtconsole.egg-info/PKG-INFO 2020-08-17
19:23:54.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: qtconsole
-Version: 4.7.5
+Version: 4.7.6
Summary: Jupyter Qt console
Home-page: http://jupyter.org
Author: Jupyter Development Team