Hello community,

here is the log from the commit of package python-click-completion for 
openSUSE:Leap:15.2 checked in at 2020-04-14 14:22:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-click-completion (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-click-completion.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-click-completion"

Tue Apr 14 14:22:17 2020 rev:2 rq:793627 version:0.5.2

Changes:
--------
--- 
/work/SRC/openSUSE:Leap:15.2/python-click-completion/python-click-completion.changes
        2020-03-09 18:00:11.392663354 +0100
+++ 
/work/SRC/openSUSE:Leap:15.2/.python-click-completion.new.3248/python-click-completion.changes
      2020-04-14 14:24:07.545415312 +0200
@@ -1,0 +2,7 @@
+Tue Mar 31 12:13:46 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com>
+
+- Update to 0.5.2
+  * fix slow completion on projects that provide a cached 
+    get_command_short_help
+
+-------------------------------------------------------------------

Old:
----
  click-completion-0.5.1.tar.gz

New:
----
  click-completion-0.5.2.tar.gz

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

Other differences:
------------------
++++++ python-click-completion.spec ++++++
--- /var/tmp/diff_new_pack.Plyya4/_old  2020-04-14 14:24:07.925415596 +0200
+++ /var/tmp/diff_new_pack.Plyya4/_new  2020-04-14 14:24:07.925415596 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-click-completion
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-click-completion
-Version:        0.5.1
+Version:        0.5.2
 Release:        0
 Summary:        Fish, Bash, Zsh and PowerShell completion for Click
 License:        MIT

++++++ click-completion-0.5.1.tar.gz -> click-completion-0.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-completion-0.5.1/README.md 
new/click-completion-0.5.2/README.md
--- old/click-completion-0.5.1/README.md        2019-03-24 10:31:53.000000000 
+0100
+++ new/click-completion-0.5.2/README.md        2019-10-15 18:18:56.000000000 
+0200
@@ -46,10 +46,6 @@
 `click-completion` obviously depends on `click`. `Jinja2` is used to
  generate the shell specific code.
 
-The shell currently used can be automatically detected when `psutil` is
-installed. When not installed, the functions that require the shell type
-are raising an exception if the shell type is not passed explicitly.
-
 And of course to make it useful, you'll need to use fish, Bash, Zsh or
 PowerShell.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-completion-0.5.1/click_completion/__init__.py 
new/click-completion-0.5.2/click_completion/__init__.py
--- old/click-completion-0.5.1/click_completion/__init__.py     2019-03-24 
10:31:53.000000000 +0100
+++ new/click-completion-0.5.2/click_completion/__init__.py     2019-10-15 
18:18:56.000000000 +0200
@@ -13,7 +13,7 @@
 from click_completion.lib import get_auto_shell
 from click_completion.patch import patch as _patch
 
-__version__ = '0.5.1'
+__version__ = '0.5.2'
 
 _initialized = False
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-completion-0.5.1/click_completion/core.py 
new/click-completion-0.5.2/click_completion/core.py
--- old/click-completion-0.5.1/click_completion/core.py 2019-03-24 
10:31:53.000000000 +0100
+++ new/click-completion-0.5.2/click_completion/core.py 2019-10-15 
18:18:56.000000000 +0200
@@ -114,6 +114,9 @@
     else:
         for param in ctx.command.get_params(ctx):
             if (completion_configuration.complete_options or incomplete and 
not incomplete[:1].isalnum()) and isinstance(param, Option):
+                # filter hidden click.Option
+                if getattr(param, 'hidden', False):
+                    continue
                 for opt in param.opts:
                     if match(opt, incomplete):
                         choices.append((opt, param.help))
@@ -124,9 +127,8 @@
                         choices.append((opt, None))
         if isinstance(ctx.command, MultiCommand):
             for name in ctx.command.list_commands(ctx):
-                command = ctx.command.get_command(ctx, name)
-                if match(name, incomplete) and not command.hidden:
-                    choices.append((name, command.get_short_help_str()))
+                if match(name, incomplete):
+                    choices.append((name, 
ctx.command.get_command_short_help(ctx, name)))
 
     for item, help in choices:
         yield (item, help)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-completion-0.5.1/click_completion/lib.py 
new/click-completion-0.5.2/click_completion/lib.py
--- old/click-completion-0.5.1/click_completion/lib.py  2019-03-24 
10:31:53.000000000 +0100
+++ new/click-completion-0.5.2/click_completion/lib.py  2019-10-15 
18:18:56.000000000 +0200
@@ -121,7 +121,5 @@
 
 
 def get_auto_shell():
-    """Returns the current shell
-
-    This feature depends on psutil and will not work if it is not available"""
+    """Returns the current shell"""
     return shellingham.detect_shell()[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-completion-0.5.1/click_completion/patch.py 
new/click-completion-0.5.2/click_completion/patch.py
--- old/click-completion-0.5.1/click_completion/patch.py        2019-03-24 
10:31:53.000000000 +0100
+++ new/click-completion-0.5.2/click_completion/patch.py        2019-10-15 
18:18:56.000000000 +0200
@@ -75,7 +75,29 @@
     str
         The sub command short help
     """
-    return self.get_command(ctx, cmd_name).short_help
+    return self.get_command(ctx, cmd_name).get_short_help_str()
+
+
+def multicommand_get_command_hidden(self, ctx, cmd_name):
+    """Returns the short help of a subcommand
+
+    It allows MultiCommand subclasses to implement more efficient ways to 
provide the subcommand hidden attribute, for
+    example by leveraging some caching.
+
+    Parameters
+    ----------
+    ctx : click.core.Context
+        The current context
+    cmd_name :
+        The sub command name
+
+    Returns
+    -------
+    bool
+        The sub command hidden status
+    """
+    cmd = self.get_command(ctx, cmd_name)
+    return cmd.hidden if cmd else False
 
 
 def _shellcomplete(cli, prog_name, complete_var=None):
@@ -139,4 +161,5 @@
     click.types.ParamType.complete = param_type_complete
     click.types.Choice.complete = choice_complete
     click.core.MultiCommand.get_command_short_help = 
multicommand_get_command_short_help
+    click.core.MultiCommand.get_command_hidden = 
multicommand_get_command_hidden
     click.core._bashcomplete = _shellcomplete
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/click-completion-0.5.1/examples/click-completion-callback 
new/click-completion-0.5.2/examples/click-completion-callback
--- old/click-completion-0.5.1/examples/click-completion-callback       
2019-03-24 10:31:53.000000000 +0100
+++ new/click-completion-0.5.2/examples/click-completion-callback       
2019-10-15 18:18:56.000000000 +0200
@@ -22,7 +22,7 @@
 
 @click.command()
 @click.option('--install', is_flag=True, callback=install_callback, 
expose_value=False,
-              help="Install completion for the current shell. Make sure to 
have psutil installed.")
+              help="Install completion for the current shell.")
 @click.option('--upper/--lower', default=None, help="Change text to upper or 
lower case")
 @click.argument('args', nargs=-1)
 def echo(upper, args):


Reply via email to