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 2021-05-11 23:04:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-qtconsole (Old)
and /work/SRC/openSUSE:Factory/.python-qtconsole.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-qtconsole"
Tue May 11 23:04:19 2021 rev:17 rq:892211 version:5.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-qtconsole/python-qtconsole.changes
2021-04-01 14:18:11.144061671 +0200
+++
/work/SRC/openSUSE:Factory/.python-qtconsole.new.2988/python-qtconsole.changes
2021-05-11 23:04:27.996873871 +0200
@@ -1,0 +2,9 @@
+Mon May 10 12:31:24 UTC 2021 - Ben Greiner <[email protected]>
+
+- Update to version 5.1.0
+ * Two new keyboard shortcuts: Ctrl + Up/Down to go to the
+ beginning/end of the buffer.
+ * Monkeypatch RegexLexer only while in use by qtconsole.
+ * Import Empty from queue module.
+
+-------------------------------------------------------------------
Old:
----
qtconsole-5.0.3.tar.gz
New:
----
qtconsole-5.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-qtconsole.spec ++++++
--- /var/tmp/diff_new_pack.4zuE9V/_old 2021-05-11 23:04:28.640870934 +0200
+++ /var/tmp/diff_new_pack.4zuE9V/_new 2021-05-11 23:04:28.640870934 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-qtconsole
-Version: 5.0.3
+Version: 5.1.0
Release: 0
Summary: Jupyter Qt console
License: BSD-3-Clause
@@ -118,7 +118,7 @@
export QT_QPA_PLATFORM="offscreen"
# test skips: https://github.com/jupyter/qtconsole/issues/443
# now with test_input too. But does not seem to happen on the build server,
only locally.
-%pytest -k "not (test_00 and (test_scroll or test_debug or test_input))"
+%pytest -ra -k "not (test_00 and (test_scroll or test_debug or test_input))"
%post
%python_install_alternative jupyter-qtconsole
++++++ qtconsole-5.0.3.tar.gz -> qtconsole-5.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-5.0.3/PKG-INFO new/qtconsole-5.1.0/PKG-INFO
--- old/qtconsole-5.0.3/PKG-INFO 2021-03-16 17:47:06.401562500 +0100
+++ new/qtconsole-5.1.0/PKG-INFO 2021-05-02 19:54:49.339788200 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: qtconsole
-Version: 5.0.3
+Version: 5.1.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.0.3/docs/source/changelog.rst
new/qtconsole-5.1.0/docs/source/changelog.rst
--- old/qtconsole-5.0.3/docs/source/changelog.rst 2021-03-16
17:44:00.000000000 +0100
+++ new/qtconsole-5.1.0/docs/source/changelog.rst 2021-05-02
19:52:38.000000000 +0200
@@ -3,6 +3,29 @@
Changes in Jupyter Qt console
=============================
+.. _5.1:
+
+5.1
+~~~
+
+5.1.0
+-----
+
+`5.1.0 on GitHub <https://github.com/jupyter/qtconsole/milestones/5.1.0>`__
+
+Additions
++++++++++
+
+- Two new keyboard shortcuts: Ctrl + Up/Down to go to the beginning/end
+ of the buffer.
+
+Changes
++++++++
+
+- Monkeypatch RegexLexer only while in use by qtconsole.
+- Import Empty from queue module.
+
+
.. _5.0:
5.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-5.0.3/qtconsole/_version.py
new/qtconsole-5.1.0/qtconsole/_version.py
--- old/qtconsole-5.0.3/qtconsole/_version.py 2021-03-16 17:46:16.000000000
+0100
+++ new/qtconsole-5.1.0/qtconsole/_version.py 2021-05-02 19:54:08.000000000
+0200
@@ -1,2 +1,2 @@
-version_info = (5, 0, 3)
+version_info = (5, 1, 0)
__version__ = '.'.join(map(str, version_info))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-5.0.3/qtconsole/console_widget.py
new/qtconsole-5.1.0/qtconsole/console_widget.py
--- old/qtconsole-5.0.3/qtconsole/console_widget.py 2021-01-21
18:20:43.000000000 +0100
+++ new/qtconsole-5.1.0/qtconsole/console_widget.py 2021-05-02
19:44:56.000000000 +0200
@@ -1358,6 +1358,12 @@
QtWidgets.QApplication.instance().sendEvent(self._control,
new_event)
intercepted = True
+ elif key == QtCore.Qt.Key_Down:
+ self._scroll_to_end()
+
+ elif key == QtCore.Qt.Key_Up:
+ self._control.verticalScrollBar().setValue(0)
+
#------ Alt modifier
---------------------------------------------------
elif alt_down:
@@ -2055,10 +2061,28 @@
cursor.endEditBlock()
return text
+ def _viewport_at_end(self):
+ """Check if the viewport is at the end of the document."""
+ viewport = self._control.viewport()
+ end_scroll_pos = self._control.cursorForPosition(
+ QtCore.QPoint(viewport.width() - 1, viewport.height() - 1)
+ ).position()
+ end_doc_pos = self._get_end_pos()
+ return end_doc_pos - end_scroll_pos <= 1
+
+ def _scroll_to_end(self):
+ """Scroll to the end of the document."""
+ end_scroll = (self._control.verticalScrollBar().maximum()
+ - self._control.verticalScrollBar().pageStep())
+ # Only scroll down
+ if end_scroll > self._control.verticalScrollBar().value():
+ self._control.verticalScrollBar().setValue(end_scroll)
+
def _insert_plain_text(self, cursor, text, flush=False):
""" Inserts plain text using the specified cursor, processing ANSI
codes
if enabled.
"""
+ should_autoscroll = self._viewport_at_end()
# maximumBlockCount() can be different from self.buffer_size in
# case input prompt is active.
buffer_size = self._control.document().maximumBlockCount()
@@ -2080,12 +2104,6 @@
if buffer_size > 0:
text = self._get_last_lines(text, buffer_size)
- viewport = self._control.viewport()
- end_scroll_pos = self._control.cursorForPosition(
- QtCore.QPoint(viewport.width()-1, viewport.height()-1)
- ).position()
- end_doc_pos = self._get_end_pos()
-
cursor.beginEditBlock()
if self.ansi_codes:
for substring in self._ansi_processor.split_string(text):
@@ -2146,12 +2164,8 @@
cursor.insertText(text)
cursor.endEditBlock()
- if end_doc_pos - end_scroll_pos <= 1:
- end_scroll = (self._control.verticalScrollBar().maximum()
- - self._control.verticalScrollBar().pageStep())
- # Only scroll down
- if end_scroll > self._control.verticalScrollBar().value():
- self._control.verticalScrollBar().setValue(end_scroll)
+ if should_autoscroll:
+ self._scroll_to_end()
def _insert_plain_text_into_buffer(self, cursor, text):
""" Inserts text into the input buffer using the specified cursor
(which
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-5.0.3/qtconsole/pygments_highlighter.py
new/qtconsole-5.1.0/qtconsole/pygments_highlighter.py
--- old/qtconsole-5.0.3/qtconsole/pygments_highlighter.py 2020-11-21
05:27:38.000000000 +0100
+++ new/qtconsole-5.1.0/qtconsole/pygments_highlighter.py 2021-05-02
19:44:56.000000000 +0200
@@ -74,7 +74,19 @@
# Monkeypatch!
-RegexLexer.get_tokens_unprocessed = get_tokens_unprocessed
+from contextlib import contextmanager
+
+
+@contextmanager
+def _lexpatch():
+
+ try:
+ orig = RegexLexer.get_tokens_unprocessed
+ RegexLexer.get_tokens_unprocessed = get_tokens_unprocessed
+ yield
+ finally:
+ pass
+ RegexLexer.get_tokens_unprocessed = orig
class PygmentsBlockUserData(QtGui.QTextBlockUserData):
@@ -117,24 +129,26 @@
""" Highlight a block of text.
"""
prev_data = self.currentBlock().previous().userData()
- if prev_data is not None:
- self._lexer._saved_state_stack = prev_data.syntax_stack
- elif hasattr(self._lexer, '_saved_state_stack'):
- del self._lexer._saved_state_stack
-
- # Lex the text using Pygments
- index = 0
- for token, text in self._lexer.get_tokens(string):
- length = qstring_length(text)
- self.setFormat(index, length, self._get_format(token))
- index += length
-
- if hasattr(self._lexer, '_saved_state_stack'):
- data = PygmentsBlockUserData(
- syntax_stack=self._lexer._saved_state_stack)
- self.currentBlock().setUserData(data)
- # Clean up for the next go-round.
- del self._lexer._saved_state_stack
+ with _lexpatch():
+ if prev_data is not None:
+ self._lexer._saved_state_stack = prev_data.syntax_stack
+ elif hasattr(self._lexer, "_saved_state_stack"):
+ del self._lexer._saved_state_stack
+
+ # Lex the text using Pygments
+ index = 0
+ for token, text in self._lexer.get_tokens(string):
+ length = qstring_length(text)
+ self.setFormat(index, length, self._get_format(token))
+ index += length
+
+ if hasattr(self._lexer, "_saved_state_stack"):
+ data = PygmentsBlockUserData(
+ syntax_stack=self._lexer._saved_state_stack
+ )
+ self.currentBlock().setUserData(data)
+ # Clean up for the next go-round.
+ del self._lexer._saved_state_stack
#---------------------------------------------------------------------------
# 'PygmentsHighlighter' interface
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-5.0.3/qtconsole/tests/test_comms.py
new/qtconsole-5.1.0/qtconsole/tests/test_comms.py
--- old/qtconsole-5.0.3/qtconsole/tests/test_comms.py 2020-11-21
05:27:38.000000000 +0100
+++ new/qtconsole-5.1.0/qtconsole/tests/test_comms.py 2021-05-02
19:44:56.000000000 +0200
@@ -1,9 +1,8 @@
import time
+from queue import Empty
import unittest
-from jupyter_client.blocking.channels import Empty
-
from qtconsole.manager import QtKernelManager
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/qtconsole-5.0.3/qtconsole.egg-info/PKG-INFO
new/qtconsole-5.1.0/qtconsole.egg-info/PKG-INFO
--- old/qtconsole-5.0.3/qtconsole.egg-info/PKG-INFO 2021-03-16
17:47:03.000000000 +0100
+++ new/qtconsole-5.1.0/qtconsole.egg-info/PKG-INFO 2021-05-02
19:54:48.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: qtconsole
-Version: 5.0.3
+Version: 5.1.0
Summary: Jupyter Qt console
Home-page: http://jupyter.org
Author: Jupyter Development Team