Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-qtconsole for 
openSUSE:Factory checked in at 2022-11-06 12:43:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-qtconsole (Old)
 and      /work/SRC/openSUSE:Factory/.python-qtconsole.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-qtconsole"

Sun Nov  6 12:43:06 2022 rev:26 rq:1033841 version:5.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-qtconsole/python-qtconsole.changes        
2022-08-29 09:43:11.887831286 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-qtconsole.new.2275/python-qtconsole.changes  
    2022-11-06 12:43:30.201847951 +0100
@@ -1,0 +2,14 @@
+Sat Nov  5 19:52:20 UTC 2022 - Arun Persaud <a...@gmx.de>
+
+- update to version 5.4.0:
+  * Additions
+    + Add ConsoleWidget.gui_completion_height option to configure the
+      maximum number of rows or height in pixels of completions when
+      the ConsoleWidget.gui_completion option has values 'ncurses' or
+      'droplist', respectively.
+  * Changes
+    + Fix some errors with PySide6 6.4.0.
+    + Fix mixed input and print statements on macOS.
+    + Drop usage of disutils.
+
+-------------------------------------------------------------------

Old:
----
  qtconsole-5.3.2.tar.gz

New:
----
  qtconsole-5.4.0.tar.gz

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

Other differences:
------------------
++++++ python-qtconsole.spec ++++++
--- /var/tmp/diff_new_pack.wtroVs/_old  2022-11-06 12:43:30.637850555 +0100
+++ /var/tmp/diff_new_pack.wtroVs/_new  2022-11-06 12:43:30.641850579 +0100
@@ -24,7 +24,7 @@
 %bcond_with libalternatives
 %endif
 Name:           python-qtconsole
-Version:        5.3.2
+Version:        5.4.0
 Release:        0
 Summary:        Jupyter Qt console
 License:        BSD-3-Clause
@@ -55,11 +55,11 @@
 Conflicts:      python-traitlets = 5.2.2
 Provides:       python-jupyter_qtconsole = %{version}
 Obsoletes:      python-jupyter_qtconsole < %{version}
+BuildArch:      noarch
 %if "%{python_flavor}" == "%{primary_python}"
 Provides:       jupyter-qtconsole = %{version}-%{release}
 Obsoletes:      jupyter-qtconsole < %{version}-%{release}
 %endif
-BuildArch:      noarch
 %if %{with libalternatives}
 BuildRequires:  alts
 Requires:       alts

++++++ qtconsole-5.3.2.tar.gz -> qtconsole-5.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-5.3.2/PKG-INFO new/qtconsole-5.4.0/PKG-INFO
--- old/qtconsole-5.3.2/PKG-INFO        2022-08-28 03:42:44.820807200 +0200
+++ new/qtconsole-5.4.0/PKG-INFO        2022-11-02 02:09:43.602053400 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: qtconsole
-Version: 5.3.2
+Version: 5.4.0
 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-5.3.2/docs/source/changelog.rst 
new/qtconsole-5.4.0/docs/source/changelog.rst
--- old/qtconsole-5.3.2/docs/source/changelog.rst       2022-08-28 
03:39:29.000000000 +0200
+++ new/qtconsole-5.4.0/docs/source/changelog.rst       2022-11-02 
02:05:05.000000000 +0100
@@ -3,6 +3,31 @@
 Changes in Jupyter Qt console
 =============================
 
+.. _5.4:
+
+5.4
+~~~
+
+5.4.0
+-----
+
+`5.4.0 on GitHub <https://github.com/jupyter/qtconsole/milestones/5.4.0>`__
+
+Additions
++++++++++
+
+* Add ConsoleWidget.gui_completion_height option to configure the maximum
+  number of rows or height in pixels of completions when the
+  ConsoleWidget.gui_completion option has values 'ncurses' or 'droplist',
+  respectively.
+
+Changes
++++++++
+
+* Fix some errors with PySide6 6.4.0.
+* Fix mixed input and print statements on macOS.
+* Drop usage of disutils.
+
 .. _5.3:
 
 5.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-5.3.2/qtconsole/_version.py 
new/qtconsole-5.4.0/qtconsole/_version.py
--- old/qtconsole-5.3.2/qtconsole/_version.py   2022-08-28 03:41:29.000000000 
+0200
+++ new/qtconsole-5.4.0/qtconsole/_version.py   2022-11-02 02:08:44.000000000 
+0100
@@ -1,2 +1,2 @@
-version_info = (5, 3, 2)
+version_info = (5, 4, 0)
 __version__ = '.'.join(map(str, version_info))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-5.3.2/qtconsole/completion_html.py 
new/qtconsole-5.4.0/qtconsole/completion_html.py
--- old/qtconsole-5.3.2/qtconsole/completion_html.py    2021-03-17 
02:07:09.000000000 +0100
+++ new/qtconsole-5.4.0/qtconsole/completion_html.py    2022-10-29 
18:58:15.000000000 +0200
@@ -124,7 +124,7 @@
     _slice_start = 0
     _slice_len = 4
 
-    def __init__(self, console_widget):
+    def __init__(self, console_widget, rows=10):
         """ Create a completion widget that is attached to the specified Qt
             text edit widget.
         """
@@ -133,6 +133,7 @@
 
         self._text_edit = console_widget._control
         self._console_widget = console_widget
+        self._rows = rows if rows > 0 else 10
         self._text_edit.installEventFilter(self)
         self._sliding_interval = None
         self._justified_items = None
@@ -312,7 +313,7 @@
         displaywidth = int(max(10, (width / char_width) - 1))
         items_m, ci = text.compute_item_matrix(items, empty=' ',
                                                displaywidth=displaywidth)
-        self._sliding_interval = SlidingInterval(len(items_m)-1)
+        self._sliding_interval = SlidingInterval(len(items_m)-1, 
width=self._rows)
 
         self._items = items_m
         self._size = (ci['rows_numbers'], ci['columns_numbers'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-5.3.2/qtconsole/completion_widget.py 
new/qtconsole-5.4.0/qtconsole/completion_widget.py
--- old/qtconsole-5.3.2/qtconsole/completion_widget.py  2022-03-27 
20:25:58.000000000 +0200
+++ new/qtconsole-5.4.0/qtconsole/completion_widget.py  2022-10-29 
18:58:15.000000000 +0200
@@ -15,7 +15,7 @@
     # 'QObject' interface
     #--------------------------------------------------------------------------
 
-    def __init__(self, console_widget):
+    def __init__(self, console_widget, height=0):
         """ Create a completion widget that is attached to the specified Qt
             text edit widget.
         """
@@ -24,6 +24,7 @@
         super().__init__(parent=console_widget)
 
         self._text_edit = text_edit
+        self._height_max = height if height > 0 else self.sizeHint().height()
         self.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
         self.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
         self.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
@@ -104,7 +105,6 @@
         """ Shows the completion widget with 'items' at the position specified
             by 'cursor'.
         """
-        text_edit = self._text_edit
         point = self._get_top_left_position(cursor)
         self.clear()
         path_items = []
@@ -132,15 +132,16 @@
             list_item.setText(text)
             self.addItem(list_item)
 
-        height = self.sizeHint().height()
         if QT6:
             screen_rect = self.screen().availableGeometry()
         else:
             screen_rect = 
QtWidgets.QApplication.desktop().availableGeometry(self)
-        if (screen_rect.size().height() + screen_rect.y() -
-                point.y() - height < 0):
-            point = text_edit.mapToGlobal(text_edit.cursorRect().topRight())
-            point.setY(int(point.y() - height))
+        screen_height = screen_rect.height()
+        height = int(min(self._height_max, screen_height - 50)) # -50px
+        if ((screen_height - point.y() - height) < 0):
+            point = 
self._text_edit.mapToGlobal(self._text_edit.cursorRect().topRight())
+            py = point.y()
+            point.setY(int(py - min(height, py - 10))) # -10px
         w = (self.sizeHintForColumn(0) +
              self.verticalScrollBar().sizeHint().width() +
              2 * self.frameWidth())
@@ -161,20 +162,7 @@
     def _get_top_left_position(self, cursor):
         """ Get top left position for this widget.
         """
-        point = self._text_edit.cursorRect(cursor).center()
-        point_size = self._text_edit.font().pointSize()
-
-        if sys.platform == 'darwin':
-            delta = int((point_size * 1.20) ** 0.98)
-        elif os.name == 'nt':
-            delta = int((point_size * 1.20) ** 1.05)
-        else:
-            delta = int((point_size * 1.20) ** 0.98)
-
-        y = delta - (point_size / 2)
-        point.setY(int(point.y() + y))
-        point = self._text_edit.mapToGlobal(point)
-        return point
+        return 
self._text_edit.mapToGlobal(self._text_edit.cursorRect().bottomRight())
 
     def _complete_current(self):
         """ Perform the completion with the currently selected item.
@@ -200,6 +188,7 @@
         # Update widget position
         cursor = self._text_edit.textCursor()
         point = self._get_top_left_position(cursor)
+        point.setY(self.y())
         self.move(point)
 
         # Update current item
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-5.3.2/qtconsole/console_widget.py 
new/qtconsole-5.4.0/qtconsole/console_widget.py
--- old/qtconsole-5.3.2/qtconsole/console_widget.py     2022-08-28 
03:35:39.000000000 +0200
+++ new/qtconsole-5.4.0/qtconsole/console_widget.py     2022-11-02 
01:49:56.000000000 +0100
@@ -91,6 +91,16 @@
                                 `tab` and arrow keys.
                     """
     )
+    gui_completion_height = Integer(0, config=True,
+        help="""
+        Set Height for completion.
+
+        'droplist'
+            Height in pixels.
+        'ncurses'
+            Maximum number of rows.
+        """
+    )
     # NOTE: this value can only be specified during initialization.
     kind = Enum(['plain', 'rich'], default_value='plain', config=True,
         help="""
@@ -265,9 +275,9 @@
         self._append_before_prompt_cursor = self._control.textCursor()
         self._ansi_processor = QtAnsiCodeProcessor()
         if self.gui_completion == 'ncurses':
-            self._completion_widget = CompletionHtml(self)
+            self._completion_widget = CompletionHtml(self, 
self.gui_completion_height)
         elif self.gui_completion == 'droplist':
-            self._completion_widget = CompletionWidget(self)
+            self._completion_widget = CompletionWidget(self, 
self.gui_completion_height)
         elif self.gui_completion == 'plain':
             self._completion_widget = CompletionPlain(self)
 
@@ -2132,18 +2142,22 @@
                         remove = False
                         fill = False
                         if act.area == 'screen':
-                            cursor.select(cursor.Document)
+                            cursor.select(QtGui.QTextCursor.Document)
                             remove = True
                         if act.area == 'line':
                             if act.erase_to == 'all': 
-                                cursor.select(cursor.LineUnderCursor)
+                                
cursor.select(QtGui.QTextCursor.LineUnderCursor)
                                 remove = True
                             elif act.erase_to == 'start':
-                                cursor.movePosition(cursor.StartOfLine, 
cursor.KeepAnchor)
+                                cursor.movePosition(
+                                    QtGui.QTextCursor.StartOfLine,
+                                    QtGui.QTextCursor.KeepAnchor)
                                 remove = True
                                 fill = True
                             elif act.erase_to == 'end':
-                                cursor.movePosition(cursor.EndOfLine, 
cursor.KeepAnchor)
+                                cursor.movePosition(
+                                    QtGui.QTextCursor.EndOfLine,
+                                    QtGui.QTextCursor.KeepAnchor)
                                 remove = True
                         if remove: 
                             
nspace=cursor.selectionEnd()-cursor.selectionStart() if fill else 0
@@ -2159,12 +2173,13 @@
                         cursor.deletePreviousChar()
 
                         if os.name == 'nt':
-                            cursor.select(cursor.Document)
+                            cursor.select(QtGui.QTextCursor.Document)
                             cursor.removeSelectedText()
 
                     elif act.action == 'carriage-return':
                         cursor.movePosition(
-                            cursor.StartOfLine, cursor.MoveAnchor)
+                            QtGui.QTextCursor.StartOfLine,
+                            QtGui.QTextCursor.MoveAnchor)
 
                     elif act.action == 'beep':
                         QtWidgets.QApplication.instance().beep()
@@ -2172,10 +2187,11 @@
                     elif act.action == 'backspace':
                         if not cursor.atBlockStart():
                             cursor.movePosition(
-                                cursor.PreviousCharacter, cursor.MoveAnchor)
+                                QtGui.QTextCursor.PreviousCharacter,
+                                QtGui.QTextCursor.MoveAnchor)
 
                     elif act.action == 'newline':
-                        cursor.movePosition(cursor.EndOfLine)
+                        cursor.movePosition(QtGui.QTextCursor.EndOfLine)
 
                 # simulate replacement mode
                 if substring is not None:
@@ -2183,11 +2199,11 @@
                     if not (hasattr(cursor,'_insert_mode') and 
cursor._insert_mode):
                         pos = cursor.position()
                         cursor2 = QtGui.QTextCursor(cursor)  # 
self._get_line_end_pos() is the previous line, don't use it
-                        cursor2.movePosition(cursor2.EndOfLine)
+                        cursor2.movePosition(QtGui.QTextCursor.EndOfLine)
                         remain = cursor2.position() - pos    # number of 
characters until end of line
                         n=len(substring)
                         swallow = min(n, remain)             # number of 
character to swallow
-                        cursor.setPosition(pos+swallow,cursor.KeepAnchor)
+                        
cursor.setPosition(pos+swallow,QtGui.QTextCursor.KeepAnchor)
                     cursor.insertText(substring,format)
         else:
             cursor.insertText(text)
@@ -2483,7 +2499,13 @@
         # This is necessary to solve out-of-order insertion of mixed stdin and
         # stdout stream texts.
         # Fixes spyder-ide/spyder#17710
-        if not sys.platform == 'darwin':
+        if sys.platform == 'darwin':
+            # Although this makes our tests hang on Mac, users confirmed that
+            # it's needed on that platform too.
+            # Fixes spyder-ide/spyder#19888
+            if not os.environ.get('QTCONSOLE_TESTING'):
+                QtCore.QCoreApplication.processEvents()
+        else:
             QtCore.QCoreApplication.processEvents()
 
         cursor = self._get_end_cursor()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-5.3.2/qtconsole/frontend_widget.py 
new/qtconsole-5.4.0/qtconsole/frontend_widget.py
--- old/qtconsole-5.3.2/qtconsole/frontend_widget.py    2022-08-28 
02:04:32.000000000 +0200
+++ new/qtconsole-5.4.0/qtconsole/frontend_widget.py    2022-11-02 
01:49:56.000000000 +0100
@@ -733,7 +733,8 @@
         """Clears the current line of output."""
         cursor = self._control.textCursor()
         cursor.beginEditBlock()
-        cursor.movePosition(cursor.StartOfLine, cursor.KeepAnchor)
+        cursor.movePosition(QtGui.QTextCursor.StartOfLine,
+                            QtGui.QTextCursor.KeepAnchor)
         cursor.insertText('')
         cursor.endEditBlock()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-5.3.2/qtconsole/qtconsoleapp.py 
new/qtconsole-5.4.0/qtconsole/qtconsoleapp.py
--- old/qtconsole-5.3.2/qtconsole/qtconsoleapp.py       2022-03-27 
20:25:58.000000000 +0200
+++ new/qtconsole-5.4.0/qtconsole/qtconsoleapp.py       2022-10-29 
17:56:10.000000000 +0200
@@ -7,7 +7,6 @@
 # Copyright (c) Jupyter Development Team.
 # Distributed under the terms of the Modified BSD License.
 
-from distutils.version import LooseVersion
 import os
 import signal
 import sys
@@ -416,8 +415,11 @@
     def initialize(self, argv=None):
         # Fixes launching issues with Big Sur
         # https://bugreports.qt.io/browse/QTBUG-87014, fixed in qt 5.15.2
-        if sys.platform == 'darwin' and LooseVersion(QT_VERSION) < 
LooseVersion('5.15.2'):
-            os.environ['QT_MAC_WANTS_LAYER'] = '1'
+        if sys.platform == 'darwin':
+            v_5_15_2 = QtCore.QVersionNumber.fromString('5.15.2')[0]
+            v_current = QtCore.QVersionNumber.fromString(QT_VERSION)[0]
+            if v_current < v_5_15_2:
+                os.environ['QT_MAC_WANTS_LAYER'] = '1'
         self._init_asyncio_patch()
         self.init_qt_app()
         super().initialize(argv)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtconsole-5.3.2/qtconsole/tests/test_00_console_widget.py 
new/qtconsole-5.4.0/qtconsole/tests/test_00_console_widget.py
--- old/qtconsole-5.3.2/qtconsole/tests/test_00_console_widget.py       
2022-05-30 03:57:55.000000000 +0200
+++ new/qtconsole-5.4.0/qtconsole/tests/test_00_console_widget.py       
2022-11-02 01:49:56.000000000 +0100
@@ -278,7 +278,7 @@
         QtWidgets.QApplication.quit()
 
     def assert_text_equal(self, cursor, text):
-        cursor.select(cursor.Document)
+        cursor.select(QtGui.QTextCursor.Document)
         selection = cursor.selectedText()
         self.assertEqual(selection, text)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-5.3.2/qtconsole.egg-info/PKG-INFO 
new/qtconsole-5.4.0/qtconsole.egg-info/PKG-INFO
--- old/qtconsole-5.3.2/qtconsole.egg-info/PKG-INFO     2022-08-28 
03:42:44.000000000 +0200
+++ new/qtconsole-5.4.0/qtconsole.egg-info/PKG-INFO     2022-11-02 
02:09:43.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: qtconsole
-Version: 5.3.2
+Version: 5.4.0
 Summary: Jupyter Qt console
 Home-page: http://jupyter.org
 Author: Jupyter Development Team

Reply via email to