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-06-24 09:45:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-qtconsole (Old) and /work/SRC/openSUSE:Factory/.python-qtconsole.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-qtconsole" Fri Jun 24 09:45:14 2022 rev:24 rq:984518 version:5.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-qtconsole/python-qtconsole.changes 2022-04-11 23:50:12.106414540 +0200 +++ /work/SRC/openSUSE:Factory/.python-qtconsole.new.1548/python-qtconsole.changes 2022-06-24 09:45:15.681674963 +0200 @@ -1,0 +2,8 @@ +Wed Jun 22 13:36:44 UTC 2022 - Arun Persaud <a...@gmx.de> + +- update to version 5.3.1: + * Fix segfault when performing code completion on Qt6. + * Fix mixed input and print statements. + * Fix switching syntax highlighting styles on PySide2 and PySide6. + +------------------------------------------------------------------- Old: ---- qtconsole-5.3.0.tar.gz New: ---- qtconsole-5.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-qtconsole.spec ++++++ --- /var/tmp/diff_new_pack.5gdI0A/_old 2022-06-24 09:45:16.229675347 +0200 +++ /var/tmp/diff_new_pack.5gdI0A/_new 2022-06-24 09:45:16.233675349 +0200 @@ -24,7 +24,7 @@ %bcond_with libalternatives %endif Name: python-qtconsole -Version: 5.3.0 +Version: 5.3.1 Release: 0 Summary: Jupyter Qt console License: BSD-3-Clause @@ -52,6 +52,8 @@ Requires: python-jupyter-client >= 4.1 Requires: python-jupyter-core Requires: python-traitlets +Conflicts: python-traitlets = 5.2.1 +Conflicts: python-traitlets = 5.2.2 Provides: python-jupyter_qtconsole = %{version} Obsoletes: python-jupyter_qtconsole < %{version} BuildArch: noarch ++++++ qtconsole-5.3.0.tar.gz -> qtconsole-5.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/PKG-INFO new/qtconsole-5.3.1/PKG-INFO --- old/qtconsole-5.3.0/PKG-INFO 2022-03-28 19:04:57.685921200 +0200 +++ new/qtconsole-5.3.1/PKG-INFO 2022-06-05 19:29:31.648980600 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: qtconsole -Version: 5.3.0 +Version: 5.3.1 Summary: Jupyter Qt console Home-page: http://jupyter.org Author: Jupyter Development Team @@ -102,5 +102,3 @@ - [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html) [[PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf)] - [Issues](https://github.com/jupyter/qtconsole/issues) - [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter) - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/docs/source/changelog.rst new/qtconsole-5.3.1/docs/source/changelog.rst --- old/qtconsole-5.3.0/docs/source/changelog.rst 2022-03-28 19:03:21.000000000 +0200 +++ new/qtconsole-5.3.1/docs/source/changelog.rst 2022-06-05 19:26:33.000000000 +0200 @@ -8,6 +8,15 @@ 5.3 ~~~ +5.3.1 +----- + +`5.3.1 on GitHub <https://github.com/jupyter/qtconsole/milestones/5.3.1>`__ + +* Fix segfault when performing code completion on Qt6. +* Fix mixed input and print statements. +* Fix switching syntax highlighting styles on PySide2 and PySide6. + 5.3.0 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole/_version.py new/qtconsole-5.3.1/qtconsole/_version.py --- old/qtconsole-5.3.0/qtconsole/_version.py 2022-03-28 19:04:07.000000000 +0200 +++ new/qtconsole-5.3.1/qtconsole/_version.py 2022-06-05 19:28:45.000000000 +0200 @@ -1,2 +1,2 @@ -version_info = (5, 3, 0) +version_info = (5, 3, 1) __version__ = '.'.join(map(str, version_info)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole/console_widget.py new/qtconsole-5.3.1/qtconsole/console_widget.py --- old/qtconsole-5.3.0/qtconsole/console_widget.py 2022-03-28 18:38:07.000000000 +0200 +++ new/qtconsole-5.3.1/qtconsole/console_widget.py 2022-05-30 03:57:55.000000000 +0200 @@ -1692,15 +1692,6 @@ return columnize(items, separator, displaywidth) - def _get_block_plain_text(self, block): - """ Given a QTextBlock, return its unformatted text. - """ - cursor = QtGui.QTextCursor(block) - cursor.movePosition(QtGui.QTextCursor.StartOfBlock) - cursor.movePosition(QtGui.QTextCursor.EndOfBlock, - QtGui.QTextCursor.KeepAnchor) - return cursor.selection().toPlainText() - def _get_cursor(self): """ Get a cursor at the current insert position. """ @@ -1768,7 +1759,7 @@ return None else: cursor = self._control.textCursor() - text = self._get_block_plain_text(cursor.block()) + text = cursor.block().text() return text[len(prompt):] def _get_input_buffer_cursor_pos(self): @@ -2428,7 +2419,6 @@ while self._reading: QtCore.QCoreApplication.processEvents() return self._get_input_buffer(force=True).rstrip('\n') - else: self._reading_callback = lambda: \ callback(self._get_input_buffer(force=True).rstrip('\n')) @@ -2489,6 +2479,12 @@ If set, a separator will be written before the prompt. """ self._flush_pending_stream() + + # This is necessary to solve out-of-order insertion of mixed stdin and + # stdout stream texts. + # Fixes spyder-ide/spyder#17710 + QtCore.QCoreApplication.processEvents() + cursor = self._get_end_cursor() # Save the current position to support _append*(before_prompt=True). @@ -2513,6 +2509,7 @@ # Write the prompt. if separator: self._append_plain_text(self._prompt_sep) + if prompt is None: if self._prompt_html is None: self._append_plain_text(self._prompt) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole/frontend_widget.py new/qtconsole-5.3.1/qtconsole/frontend_widget.py --- old/qtconsole-5.3.0/qtconsole/frontend_widget.py 2021-11-14 19:48:23.000000000 +0100 +++ new/qtconsole-5.3.1/qtconsole/frontend_widget.py 2022-05-29 18:43:26.000000000 +0200 @@ -67,7 +67,7 @@ # paragraph break characters, non-breaking spaces, etc. Here we acquire # the string as plain text so we can compare it. current_block = self.currentBlock() - string = self._frontend._get_block_plain_text(current_block) + string = current_block.text() # Only highlight if we can identify a prompt, but make sure not to # highlight the prompt. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole/mainwindow.py new/qtconsole-5.3.1/qtconsole/mainwindow.py --- old/qtconsole-5.3.0/qtconsole/mainwindow.py 2022-03-27 20:25:58.000000000 +0200 +++ new/qtconsole-5.3.1/qtconsole/mainwindow.py 2022-05-29 18:43:26.000000000 +0200 @@ -8,6 +8,7 @@ # Distributed under the terms of the Modified BSD License. import sys import webbrowser +from functools import partial from threading import Thread from jupyter_core.paths import jupyter_runtime_dir @@ -625,11 +626,9 @@ self.syntax_style_menu = self.view_menu.addMenu("&Syntax Style") style_group = QtWidgets.QActionGroup(self) for style in available_syntax_styles: - action = QtWidgets.QAction("{}".format(style), self, - triggered=lambda v, - syntax_style=style: - self.set_syntax_style( - syntax_style=syntax_style)) + action = QtWidgets.QAction("{}".format(style), self) + action.triggered.connect(partial(self.set_syntax_style, + style)) action.setCheckable(True) style_group.addAction(action) self.syntax_style_menu.addAction(action) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole/tests/test_00_console_widget.py new/qtconsole-5.3.1/qtconsole/tests/test_00_console_widget.py --- old/qtconsole-5.3.0/qtconsole/tests/test_00_console_widget.py 2022-03-27 20:25:58.000000000 +0200 +++ new/qtconsole-5.3.1/qtconsole/tests/test_00_console_widget.py 2022-05-30 03:57:55.000000000 +0200 @@ -207,6 +207,58 @@ assert control.toPlainText().strip().split()[-1] == "abcd" +@flaky(max_runs=15) +def test_input_and_print(qtconsole, qtbot): + """ + Test that we print correctly mixed input and print statements. + + This is a regression test for spyder-ide/spyder#17710. + """ + window = qtconsole.window + shell = window.active_frontend + control = shell._control + + def wait_for_input(): + qtbot.waitUntil( + lambda: control.toPlainText().splitlines()[-1] == 'Write input: ' + ) + + # Wait until the console is fully up + qtbot.waitUntil(lambda: shell._prompt_html is not None, + timeout=SHELL_TIMEOUT) + + # Run a for loop with mixed input and print statements + code = """ +user_input = None +while user_input != '': + user_input = input('Write input: ') + print('Input was entered!') +""" + shell.execute(code) + wait_for_input() + + # Interact with the 'for' loop for a certain number of repetitions + repetitions = 3 + for _ in range(repetitions): + qtbot.keyClicks(control, '1') + qtbot.keyClick(control, QtCore.Qt.Key_Enter) + wait_for_input() + + # Get out of the for loop + qtbot.keyClick(control, QtCore.Qt.Key_Enter) + qtbot.waitUntil(lambda: not shell._reading) + qtbot.waitUntil(lambda: shell._prompt_html is not None, + timeout=SHELL_TIMEOUT) + + # Assert that printed correctly the expected output in the console. + output = ( + " ...: \n" + + "Write input: 1\nInput was entered!\n" * repetitions + + "Write input: \nInput was entered!\n" + ) + assert output in control.toPlainText() + + @pytest.mark.skipif(no_display, reason="Doesn't work without a display") class TestConsoleWidget(unittest.TestCase): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole/tests/test_jupyter_widget.py new/qtconsole-5.3.1/qtconsole/tests/test_jupyter_widget.py --- old/qtconsole-5.3.0/qtconsole/tests/test_jupyter_widget.py 2022-03-27 20:25:58.000000000 +0200 +++ new/qtconsole-5.3.1/qtconsole/tests/test_jupyter_widget.py 2022-05-29 18:43:26.000000000 +0200 @@ -1,8 +1,9 @@ import unittest import sys +from packaging.version import parse import pytest -from qtpy import QT6 +from qtpy import QT6, QT_VERSION from qtpy import QtWidgets, QtGui from qtpy.QtTest import QTest @@ -52,8 +53,6 @@ w._show_interpreter_prompt(1) w.other_output_prefix = '[other] ' w.syntax_style = 'default' - control = w._control - document = control.document() msg = dict( execution_count=1, @@ -61,6 +60,9 @@ ) w._append_custom(w._insert_other_input, msg, before_prompt=True) + control = w._control + document = control.document() + self.assertEqual(document.blockCount(), 6) self.assertEqual(document.toPlainText(), ( 'Header\n' @@ -72,7 +74,21 @@ )) # Check proper syntax highlighting - if QT6: + if QT6 and parse(QT_VERSION) >= parse('6.3'): + html = ( + '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n' + '<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">\n' + 'p, li { white-space: pre-wrap; }\n' + 'hr { height: 1px; border-width: 0; }\n' + '</style></head><body style=\" font-family:\'Monospace\'; font-size:9pt; font-weight:400; font-style:normal;\">\n' + '<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Header</p>\n' + '<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>\n' + '<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">[other] In [</span><span style=" font-weight:700; color:#000080;">1</span><span style=" color:#000080;">]:</span> a = 1 + 1</p>\n' + '<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0...:</span> b = range(10)</p>\n' + '<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>\n' + '<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#000080;">In [</span><span style=" font-weight:700; color:#000080;">2</span><span style=" color:#000080;">]:</span> </p></body></html>' + ) + elif QT6 and parse(QT_VERSION) < parse('6.3'): html = ( '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">\n' '<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">\n' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole.egg-info/PKG-INFO new/qtconsole-5.3.1/qtconsole.egg-info/PKG-INFO --- old/qtconsole-5.3.0/qtconsole.egg-info/PKG-INFO 2022-03-28 19:04:57.000000000 +0200 +++ new/qtconsole-5.3.1/qtconsole.egg-info/PKG-INFO 2022-06-05 19:29:31.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: qtconsole -Version: 5.3.0 +Version: 5.3.1 Summary: Jupyter Qt console Home-page: http://jupyter.org Author: Jupyter Development Team @@ -102,5 +102,3 @@ - [Documentation for Project Jupyter](https://jupyter.readthedocs.io/en/latest/index.html) [[PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf)] - [Issues](https://github.com/jupyter/qtconsole/issues) - [Technical support - Jupyter Google Group](https://groups.google.com/forum/#!forum/jupyter) - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole.egg-info/SOURCES.txt new/qtconsole-5.3.1/qtconsole.egg-info/SOURCES.txt --- old/qtconsole-5.3.0/qtconsole.egg-info/SOURCES.txt 2022-03-28 19:04:57.000000000 +0200 +++ new/qtconsole-5.3.1/qtconsole.egg-info/SOURCES.txt 2022-06-05 19:29:31.000000000 +0200 @@ -67,5 +67,4 @@ qtconsole/tests/test_frontend_widget.py qtconsole/tests/test_jupyter_widget.py qtconsole/tests/test_kill_ring.py -qtconsole/tests/test_styles.py -scripts/jupyter-qtconsole \ No newline at end of file +qtconsole/tests/test_styles.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/qtconsole.egg-info/requires.txt new/qtconsole-5.3.1/qtconsole.egg-info/requires.txt --- old/qtconsole-5.3.0/qtconsole.egg-info/requires.txt 2022-03-28 19:04:57.000000000 +0200 +++ new/qtconsole-5.3.1/qtconsole.egg-info/requires.txt 2022-06-05 19:29:31.000000000 +0200 @@ -1,4 +1,4 @@ -traitlets +traitlets!=5.2.1,!=5.2.2 ipython_genutils jupyter_core jupyter_client>=4.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/scripts/jupyter-qtconsole new/qtconsole-5.3.1/scripts/jupyter-qtconsole --- old/qtconsole-5.3.0/scripts/jupyter-qtconsole 2020-10-24 17:40:22.000000000 +0200 +++ new/qtconsole-5.3.1/scripts/jupyter-qtconsole 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -#!/usr/bin/env python -from qtconsole.qtconsoleapp import main - -if __name__ == '__main__': - main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtconsole-5.3.0/setup.py new/qtconsole-5.3.1/setup.py --- old/qtconsole-5.3.0/setup.py 2022-03-27 20:25:58.000000000 +0200 +++ new/qtconsole-5.3.1/setup.py 2022-06-01 18:21:57.000000000 +0200 @@ -24,7 +24,6 @@ # get on with it #----------------------------------------------------------------------------- -from glob import glob import io import os @@ -53,7 +52,6 @@ setup_args = dict( name = name, version = version_ns['__version__'], - scripts = glob(pjoin('scripts', '*')), packages = packages, package_data = package_data, description = "Jupyter Qt console", @@ -68,7 +66,7 @@ keywords = ['Interactive', 'Interpreter', 'Shell'], python_requires = '>= 3.7', install_requires = [ - 'traitlets', + 'traitlets!=5.2.1,!=5.2.2', 'ipython_genutils', 'jupyter_core', 'jupyter_client>=4.1',