Hello community,

here is the log from the commit of package python-qtconsole for 
openSUSE:Leap:15.2 checked in at 2020-05-28 20:09:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-qtconsole (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-qtconsole.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-qtconsole"

Thu May 28 20:09:48 2020 rev:4 rq:809193 version:4.7.4

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-qtconsole/python-qtconsole.changes      
2020-04-28 20:12:08.516656925 +0200
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-qtconsole.new.3606/python-qtconsole.changes
    2020-05-28 20:09:50.542942960 +0200
@@ -1,0 +2,7 @@
+Sat May 23 20:35:57 UTC 2020 - Arun Persaud <[email protected]>
+
+- update to version 4.7.4:
+  * Fix completion widget text for paths and files.
+  * Make Qtconsole work on Python 3.8 and Windows.
+
+-------------------------------------------------------------------

Old:
----
  qtconsole-4.7.3.tar.gz

New:
----
  qtconsole-4.7.4.tar.gz

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

Other differences:
------------------
++++++ python-qtconsole.spec ++++++
--- /var/tmp/diff_new_pack.MNch3C/_old  2020-05-28 20:09:51.490945782 +0200
+++ /var/tmp/diff_new_pack.MNch3C/_new  2020-05-28 20:09:51.494945794 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define         skip_python2 1
 Name:           python-qtconsole
-Version:        4.7.3
+Version:        4.7.4
 Release:        0
 Summary:        Jupyter Qt console
 License:        BSD-3-Clause

++++++ qtconsole-4.7.3.tar.gz -> qtconsole-4.7.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.3/PKG-INFO new/qtconsole-4.7.4/PKG-INFO
--- old/qtconsole-4.7.3/PKG-INFO        2020-04-16 17:24:40.000000000 +0200
+++ new/qtconsole-4.7.4/PKG-INFO        2020-05-13 17:03:19.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: qtconsole
-Version: 4.7.3
+Version: 4.7.4
 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.3/docs/source/changelog.rst 
new/qtconsole-4.7.4/docs/source/changelog.rst
--- old/qtconsole-4.7.3/docs/source/changelog.rst       2020-04-16 
17:20:45.000000000 +0200
+++ new/qtconsole-4.7.4/docs/source/changelog.rst       2020-05-13 
16:58:39.000000000 +0200
@@ -8,6 +8,14 @@
 4.7
 ~~~
 
+4.7.4
+-----
+
+`4.7.4 on GitHub <https://github.com/jupyter/qtconsole/milestones/4.7.4>`__
+
+* Fix completion widget text for paths and files.
+* Make Qtconsole work on Python 3.8 and Windows.
+
 .. _4.7.3:
 
 4.7.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.3/qtconsole/_version.py 
new/qtconsole-4.7.4/qtconsole/_version.py
--- old/qtconsole-4.7.3/qtconsole/_version.py   2020-04-16 17:23:35.000000000 
+0200
+++ new/qtconsole-4.7.4/qtconsole/_version.py   2020-05-13 17:01:51.000000000 
+0200
@@ -1,2 +1,2 @@
-version_info = (4, 7, 3)
+version_info = (4, 7, 4)
 __version__ = '.'.join(map(str, version_info))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.3/qtconsole/call_tip_widget.py 
new/qtconsole-4.7.4/qtconsole/call_tip_widget.py
--- old/qtconsole-4.7.3/qtconsole/call_tip_widget.py    2020-02-09 
17:06:19.000000000 +0100
+++ new/qtconsole-4.7.4/qtconsole/call_tip_widget.py    2020-05-13 
16:46:51.000000000 +0200
@@ -85,8 +85,12 @@
         """ Reimplemented to disconnect signal handlers and event filter.
         """
         super(CallTipWidget, self).hideEvent(event)
-        self._text_edit.cursorPositionChanged.disconnect(
-            self._cursor_position_changed)
+        # This fixes issue jupyter/qtconsole#383
+        try:
+            self._text_edit.cursorPositionChanged.disconnect(
+                self._cursor_position_changed)
+        except TypeError:
+            pass
         self._text_edit.removeEventFilter(self)
 
     def leaveEvent(self, event):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.3/qtconsole/completion_widget.py 
new/qtconsole-4.7.4/qtconsole/completion_widget.py
--- old/qtconsole-4.7.3/qtconsole/completion_widget.py  2020-03-03 
02:19:12.000000000 +0100
+++ new/qtconsole-4.7.4/qtconsole/completion_widget.py  2020-05-13 
16:46:51.000000000 +0200
@@ -116,7 +116,8 @@
             else:
                 list_item = QtWidgets.QListWidgetItem()
                 list_item.setData(QtCore.Qt.UserRole, item)
-                list_item.setText(item.split('.')[-1])
+                # Need to split to only show last element of a dot completion
+                list_item.setText(item.split(".")[-1])
                 self.addItem(list_item)
 
         common_prefix = os.path.dirname(os.path.commonprefix(path_items))
@@ -126,7 +127,7 @@
             if common_prefix:
                 text = path_item.split(common_prefix)[-1]
             else:
-                text = item
+                text = path_item
             list_item.setText(text)
             self.addItem(list_item)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.3/qtconsole/console_widget.py 
new/qtconsole-4.7.4/qtconsole/console_widget.py
--- old/qtconsole-4.7.3/qtconsole/console_widget.py     2020-03-25 
17:22:00.000000000 +0100
+++ new/qtconsole-4.7.4/qtconsole/console_widget.py     2020-05-13 
16:46:51.000000000 +0200
@@ -430,7 +430,8 @@
                 return self._event_filter_page_keypress(event)
 
         # Make middle-click paste safe.
-        elif etype == QtCore.QEvent.MouseButtonRelease and \
+        elif getattr(event, 'button', False) and \
+                etype == QtCore.QEvent.MouseButtonRelease and \
                 event.button() == QtCore.Qt.MidButton and \
                 obj == self._control.viewport():
             cursor = self._control.cursorForPosition(event.pos())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.3/qtconsole/qtconsoleapp.py 
new/qtconsole-4.7.4/qtconsole/qtconsoleapp.py
--- old/qtconsole-4.7.3/qtconsole/qtconsoleapp.py       2020-01-25 
17:50:31.000000000 +0100
+++ new/qtconsole-4.7.4/qtconsole/qtconsoleapp.py       2020-05-13 
16:46:51.000000000 +0200
@@ -378,8 +378,39 @@
             cfg[new_name].merge(cfg[old_name])
             return cfg
 
+    def _init_asyncio_patch(self):
+        """
+        Same workaround fix as https://github.com/ipython/ipykernel/pull/456
+
+        Set default asyncio policy to be compatible with tornado
+        Tornado 6 (at least) is not compatible with the default
+        asyncio implementation on Windows
+        Pick the older SelectorEventLoopPolicy on Windows
+        if the known-incompatible default policy is in use.
+        do this as early as possible to make it a low priority and overrideable
+        ref: https://github.com/tornadoweb/tornado/issues/2608
+        FIXME: if/when tornado supports the defaults in asyncio,
+               remove and bump tornado requirement for py38
+        """
+        if sys.platform.startswith("win") and sys.version_info >= (3, 8):
+            import asyncio
+            try:
+                from asyncio import (
+                    WindowsProactorEventLoopPolicy,
+                    WindowsSelectorEventLoopPolicy,
+                )
+            except ImportError:
+                pass
+                # not affected
+            else:
+                if type(asyncio.get_event_loop_policy()) is 
WindowsProactorEventLoopPolicy:
+                    # WindowsProactorEventLoopPolicy is not compatible with 
tornado 6
+                    # fallback to the pre-3.8 default of Selector
+                    
asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())
+
     @catch_config_error
     def initialize(self, argv=None):
+        self._init_asyncio_patch()
         self.init_qt_app()
         super(JupyterQtConsoleApp, self).initialize(argv)
         if self._dispatching:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtconsole-4.7.3/qtconsole/tests/test_completion_widget.py 
new/qtconsole-4.7.4/qtconsole/tests/test_completion_widget.py
--- old/qtconsole-4.7.3/qtconsole/tests/test_completion_widget.py       
2020-01-25 17:50:31.000000000 +0100
+++ new/qtconsole-4.7.4/qtconsole/tests/test_completion_widget.py       
2020-05-13 16:46:51.000000000 +0200
@@ -1,4 +1,7 @@
 # -*- coding: utf-8 -*-
+import os
+import tempfile
+import shutil
 import unittest
 
 import pytest
@@ -10,6 +13,23 @@
 from . import no_display
 
 
+class TemporaryDirectory(object):
+    """
+    Context manager for tempfile.mkdtemp().
+    This class is available in python +v3.2.
+    See: https://gist.github.com/cpelley/10e2eeaf60dacc7956bb
+    """
+
+    def __enter__(self):
+        self.dir_name = tempfile.mkdtemp()
+        return self.dir_name
+
+    def __exit__(self, exc_type, exc_value, traceback):
+        shutil.rmtree(self.dir_name)
+
+
+TemporaryDirectory = getattr(tempfile, 'TemporaryDirectory',
+                             TemporaryDirectory)
 
 
 @pytest.mark.skipif(no_display, reason="Doesn't work without a display")
@@ -60,3 +80,19 @@
 
         self.assertEqual(self.text_edit.toPlainText(), "item1")
         self.assertFalse(w.isVisible())
+
+    def test_common_path_complete(self):
+        with TemporaryDirectory() as tmpdir:
+            items = [
+                os.path.join(tmpdir, "common/common1/item1"),
+                os.path.join(tmpdir, "common/common1/item2"),
+                os.path.join(tmpdir, "common/common1/item3")]
+            for item in items:
+                os.makedirs(item)
+            w = CompletionWidget(self.console)
+            w.show_items(self.text_edit.textCursor(), items)
+            self.assertEqual(w.currentItem().text(), '/item1')
+            QTest.keyClick(w, QtCore.Qt.Key_Down)
+            self.assertEqual(w.currentItem().text(), '/item2')
+            QTest.keyClick(w, QtCore.Qt.Key_Down)
+            self.assertEqual(w.currentItem().text(), '/item3')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtconsole-4.7.3/qtconsole.egg-info/PKG-INFO 
new/qtconsole-4.7.4/qtconsole.egg-info/PKG-INFO
--- old/qtconsole-4.7.3/qtconsole.egg-info/PKG-INFO     2020-04-16 
17:24:39.000000000 +0200
+++ new/qtconsole-4.7.4/qtconsole.egg-info/PKG-INFO     2020-05-13 
17:03:17.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: qtconsole
-Version: 4.7.3
+Version: 4.7.4
 Summary: Jupyter Qt console
 Home-page: http://jupyter.org
 Author: Jupyter Development Team


Reply via email to