Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ptpython for openSUSE:Factory 
checked in at 2022-12-15 19:24:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ptpython (Old)
 and      /work/SRC/openSUSE:Factory/.python-ptpython.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ptpython"

Thu Dec 15 19:24:52 2022 rev:9 rq:1042873 version:3.0.22

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ptpython/python-ptpython.changes  
2022-12-07 17:36:16.168967691 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-ptpython.new.1835/python-ptpython.changes    
    2022-12-15 19:25:03.616006829 +0100
@@ -1,0 +2,7 @@
+Tue Dec 13 16:19:12 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- Update to version 3.0.22 
+  * New features:
+  - Improve rendering performance when there are many completions.
+
+-------------------------------------------------------------------

Old:
----
  ptpython-3.0.21.tar.gz

New:
----
  ptpython-3.0.22.tar.gz

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

Other differences:
------------------
++++++ python-ptpython.spec ++++++
--- /var/tmp/diff_new_pack.nYNMuU/_old  2022-12-15 19:25:04.060009355 +0100
+++ /var/tmp/diff_new_pack.nYNMuU/_new  2022-12-15 19:25:04.064009378 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-ptpython
-Version:        3.0.21
+Version:        3.0.22
 Release:        0
 Summary:        Python REPL build on top of prompt_toolkit
 License:        ISC

++++++ ptpython-3.0.21.tar.gz -> ptpython-3.0.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-3.0.21/CHANGELOG 
new/ptpython-3.0.22/CHANGELOG
--- old/ptpython-3.0.21/CHANGELOG       2022-11-25 15:50:04.000000000 +0100
+++ new/ptpython-3.0.22/CHANGELOG       2022-12-06 23:18:03.000000000 +0100
@@ -1,6 +1,13 @@
 CHANGELOG
 =========
 
+3.0.22: 2022-12-06
+------------------
+
+New features:
+- Improve rendering performance when there are many completions.
+
+
 3.0.21: 2022-11-25
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-3.0.21/PKG-INFO new/ptpython-3.0.22/PKG-INFO
--- old/ptpython-3.0.21/PKG-INFO        2022-11-25 15:51:34.470952300 +0100
+++ new/ptpython-3.0.22/PKG-INFO        2022-12-06 23:19:00.209290300 +0100
@@ -1,11 +1,9 @@
 Metadata-Version: 2.1
 Name: ptpython
-Version: 3.0.21
+Version: 3.0.22
 Summary: Python REPL build on top of prompt_toolkit
 Home-page: https://github.com/prompt-toolkit/ptpython
 Author: Jonathan Slenders
-License: UNKNOWN
-Platform: UNKNOWN
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
@@ -301,5 +299,3 @@
 .. |PyPI| image:: https://pypip.in/version/ptpython/badge.svg
     :target: https://pypi.python.org/pypi/ptpython/
     :alt: Latest Version
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-3.0.21/ptpython/completer.py 
new/ptpython-3.0.22/ptpython/completer.py
--- old/ptpython-3.0.21/ptpython/completer.py   2022-11-25 14:56:06.000000000 
+0100
+++ new/ptpython-3.0.22/ptpython/completer.py   2022-12-06 23:17:31.000000000 
+0100
@@ -476,14 +476,22 @@
         Complete dictionary keys.
         """
 
-        def abbr_meta(text: str) -> str:
+        def meta_repr(value: object) -> Callable[[], str]:
             "Abbreviate meta text, make sure it fits on one line."
-            # Take first line, if multiple lines.
-            if len(text) > 20:
-                text = text[:20] + "..."
-            if "\n" in text:
-                text = text.split("\n", 1)[0] + "..."
-            return text
+            # We return a function, so that it gets computed when it's needed.
+            # When there are many completions, that improves the performance
+            # quite a bit (for the multi-column completion menu, we only need
+            # to display one meta text).
+            def get_value_repr() -> str:
+                text = self._do_repr(value)
+
+                # Take first line, if multiple lines.
+                if "\n" in text:
+                    text = text.split("\n", 1)[0] + "..."
+
+                return text
+
+            return get_value_repr
 
         match = self.item_lookup_pattern.search(document.text_before_cursor)
         if match is not None:
@@ -512,12 +520,8 @@
                                 k_repr + "]",
                                 -len(key),
                                 display=f"[{k_repr}]",
-                                display_meta=abbr_meta(self._do_repr(v)),
+                                display_meta=meta_repr(v),
                             )
-                        except KeyError:
-                            # `result[k]` lookup failed. Trying to complete
-                            # broken object.
-                            pass
                         except ReprFailedError:
                             pass
 
@@ -532,7 +536,7 @@
                                     k_repr + "]",
                                     -len(key),
                                     display=f"[{k_repr}]",
-                                    
display_meta=abbr_meta(self._do_repr(result[k])),
+                                    display_meta=meta_repr(result[k]),
                                 )
                             except KeyError:
                                 # `result[k]` lookup failed. Trying to complete
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-3.0.21/ptpython.egg-info/PKG-INFO 
new/ptpython-3.0.22/ptpython.egg-info/PKG-INFO
--- old/ptpython-3.0.21/ptpython.egg-info/PKG-INFO      2022-11-25 
15:51:34.000000000 +0100
+++ new/ptpython-3.0.22/ptpython.egg-info/PKG-INFO      2022-12-06 
23:19:00.000000000 +0100
@@ -1,11 +1,9 @@
 Metadata-Version: 2.1
 Name: ptpython
-Version: 3.0.21
+Version: 3.0.22
 Summary: Python REPL build on top of prompt_toolkit
 Home-page: https://github.com/prompt-toolkit/ptpython
 Author: Jonathan Slenders
-License: UNKNOWN
-Platform: UNKNOWN
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
@@ -301,5 +299,3 @@
 .. |PyPI| image:: https://pypip.in/version/ptpython/badge.svg
     :target: https://pypi.python.org/pypi/ptpython/
     :alt: Latest Version
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-3.0.21/ptpython.egg-info/entry_points.txt 
new/ptpython-3.0.22/ptpython.egg-info/entry_points.txt
--- old/ptpython-3.0.21/ptpython.egg-info/entry_points.txt      2022-11-25 
15:51:34.000000000 +0100
+++ new/ptpython-3.0.22/ptpython.egg-info/entry_points.txt      2022-12-06 
23:19:00.000000000 +0100
@@ -5,4 +5,3 @@
 ptpython = ptpython.entry_points.run_ptpython:run
 ptpython3 = ptpython.entry_points.run_ptpython:run
 ptpython3.9 = ptpython.entry_points.run_ptpython:run
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ptpython-3.0.21/setup.py new/ptpython-3.0.22/setup.py
--- old/ptpython-3.0.21/setup.py        2022-11-25 15:48:43.000000000 +0100
+++ new/ptpython-3.0.22/setup.py        2022-12-06 23:18:30.000000000 +0100
@@ -11,7 +11,7 @@
 setup(
     name="ptpython",
     author="Jonathan Slenders",
-    version="3.0.21",
+    version="3.0.22",
     url="https://github.com/prompt-toolkit/ptpython";,
     description="Python REPL build on top of prompt_toolkit",
     long_description=long_description,

Reply via email to