Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-click for openSUSE:Factory 
checked in at 2022-04-05 19:55:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-click (Old)
 and      /work/SRC/openSUSE:Factory/.python-click.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-click"

Tue Apr  5 19:55:23 2022 rev:16 rq:966639 version:8.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-click/python-click.changes        
2021-10-20 20:24:19.085379327 +0200
+++ /work/SRC/openSUSE:Factory/.python-click.new.1900/python-click.changes      
2022-04-05 19:55:42.366064563 +0200
@@ -1,0 +2,15 @@
+Sun Mar 27 11:02:05 UTC 2022 - Dirk M??ller <dmuel...@suse.com>
+
+- update to 8.0.4:
+  * ``open_file`` recognizes ``Path("-")`` as a standard stream, the
+    same as the string ``"-"``. :issue:`2106`
+  * The ``option`` and ``argument`` decorators preserve the type
+    annotation of the decorated function. :pr:`2155`
+  * A callable default value can customize its help text by overriding
+    ``__str__`` instead of always showing ``(dynamic)``. :issue:`2099`
+  * Fix a typo in the Bash completion script that affected file and
+    directory completion. If this script was generated by a previous
+    version, it should be regenerated. :issue:`2163`
+  *  Fix typing for ``echo`` and ``secho`` file argument.
+
+-------------------------------------------------------------------

Old:
----
  click-8.0.3.tar.gz

New:
----
  click-8.0.4.tar.gz

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

Other differences:
------------------
++++++ python-click.spec ++++++
--- /var/tmp/diff_new_pack.WMqDsT/_old  2022-04-05 19:55:42.842059256 +0200
+++ /var/tmp/diff_new_pack.WMqDsT/_new  2022-04-05 19:55:42.846059211 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-click
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 %define skip_python2 1
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-click
-Version:        8.0.3
+Version:        8.0.4
 Release:        0
 Summary:        A wrapper around optparse for command line utilities
 License:        BSD-3-Clause

++++++ click-8.0.3.tar.gz -> click-8.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/CHANGES.rst new/click-8.0.4/CHANGES.rst
--- old/click-8.0.3/CHANGES.rst 2021-10-10 20:06:49.000000000 +0200
+++ new/click-8.0.4/CHANGES.rst 2022-02-18 21:30:31.000000000 +0100
@@ -1,5 +1,23 @@
 .. currentmodule:: click
 
+Version 8.0.4
+-------------
+
+Released 2022-02-18
+
+-   ``open_file`` recognizes ``Path("-")`` as a standard stream, the
+    same as the string ``"-"``. :issue:`2106`
+-   The ``option`` and ``argument`` decorators preserve the type
+    annotation of the decorated function. :pr:`2155`
+-   A callable default value can customize its help text by overriding
+    ``__str__`` instead of always showing ``(dynamic)``. :issue:`2099`
+-   Fix a typo in the Bash completion script that affected file and
+    directory completion. If this script was generated by a previous
+    version, it should be regenerated. :issue:`2163`
+-   Fix typing for ``echo`` and ``secho`` file argument.
+    :issue:`2174, 2185`
+
+
 Version 8.0.3
 -------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/PKG-INFO new/click-8.0.4/PKG-INFO
--- old/click-8.0.3/PKG-INFO    2021-10-10 20:07:14.952687500 +0200
+++ new/click-8.0.4/PKG-INFO    2022-02-18 21:31:08.819345700 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: click
-Version: 8.0.3
+Version: 8.0.4
 Summary: Composable command line interface toolkit
 Home-page: https://palletsprojects.com/p/click/
 Author: Armin Ronacher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/docs/options.rst 
new/click-8.0.4/docs/options.rst
--- old/click-8.0.3/docs/options.rst    2021-10-10 19:20:35.000000000 +0200
+++ new/click-8.0.4/docs/options.rst    2022-02-18 05:22:12.000000000 +0100
@@ -538,10 +538,10 @@
 specify it for ``--version`` to work.  For more information, see
 :ref:`callback-evaluation-order`.
 
-A callback is a function that is invoked with two parameters: the current
-:class:`Context` and the value.  The context provides some useful features
-such as quitting the application and gives access to other already
-processed parameters.
+A callback is a function that is invoked with three parameters: the
+current :class:`Context`, the current :class:`Parameter`, and the value.
+The context provides some useful features such as quitting the
+application and gives access to other already processed parameters.
 
 Here an example for a ``--version`` flag:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/requirements/dev.txt 
new/click-8.0.4/requirements/dev.txt
--- old/click-8.0.3/requirements/dev.txt        2021-10-08 22:28:04.000000000 
+0200
+++ new/click-8.0.4/requirements/dev.txt        2022-02-18 21:15:20.000000000 
+0100
@@ -1,141 +1,54 @@
+# SHA1:54b5b77ec8c7a0064ffa93b2fd16cb0130ba177c
 #
-# This file is autogenerated by pip-compile
+# This file is autogenerated by pip-compile-multi
 # To update, run:
 #
-#    pip-compile requirements/dev.in
+#    pip-compile-multi
 #
-alabaster==0.7.12
-    # via sphinx
-attrs==21.2.0
-    # via pytest
-babel==2.9.1
-    # via sphinx
-backports.entry-points-selectable==1.1.0
-    # via virtualenv
-certifi==2021.5.30
-    # via requests
+-r docs.txt
+-r tests.txt
+-r typing.txt
 cfgv==3.3.1
     # via pre-commit
-charset-normalizer==2.0.6
-    # via requests
-click==8.0.1
-    # via pip-tools
-distlib==0.3.3
-    # via virtualenv
-docutils==0.16
+click==8.0.3
     # via
-    #   sphinx
-    #   sphinx-tabs
-filelock==3.3.0
+    #   pip-compile-multi
+    #   pip-tools
+distlib==0.3.4
+    # via virtualenv
+filelock==3.6.0
     # via
     #   tox
     #   virtualenv
-identify==2.3.0
+identify==2.4.10
     # via pre-commit
-idna==3.2
-    # via requests
-imagesize==1.2.0
-    # via sphinx
-iniconfig==1.1.1
-    # via pytest
-jinja2==3.0.2
-    # via sphinx
-markupsafe==2.0.1
-    # via jinja2
-mypy-extensions==0.4.3
-    # via mypy
-mypy==0.910
-    # via -r requirements/typing.in
 nodeenv==1.6.0
     # via pre-commit
-packaging==21.0
-    # via
-    #   pallets-sphinx-themes
-    #   pytest
-    #   sphinx
-    #   tox
-pallets-sphinx-themes==2.0.1
-    # via -r requirements/docs.in
-pep517==0.11.0
+pep517==0.12.0
     # via pip-tools
-pip-tools==6.3.0
+pip-compile-multi==2.4.3
     # via -r requirements/dev.in
-platformdirs==2.4.0
+pip-tools==6.5.1
+    # via pip-compile-multi
+platformdirs==2.5.0
     # via virtualenv
-pluggy==1.0.0
-    # via
-    #   pytest
-    #   tox
-pre-commit==2.15.0
+pre-commit==2.17.0
     # via -r requirements/dev.in
-py==1.10.0
-    # via
-    #   pytest
-    #   tox
-pygments==2.10.0
-    # via
-    #   sphinx
-    #   sphinx-tabs
-pyparsing==2.4.7
-    # via packaging
-pytest==6.2.5
-    # via -r requirements/tests.in
-pytz==2021.3
-    # via babel
-pyyaml==5.4.1
+pyyaml==6.0
     # via pre-commit
-requests==2.26.0
-    # via sphinx
 six==1.16.0
     # via
     #   tox
     #   virtualenv
-snowballstemmer==2.1.0
-    # via sphinx
-sphinx-issues==1.2.0
-    # via -r requirements/docs.in
-sphinx-tabs==3.2.0
-    # via -r requirements/docs.in
-sphinx==4.2.0
-    # via
-    #   -r requirements/docs.in
-    #   pallets-sphinx-themes
-    #   sphinx-issues
-    #   sphinx-tabs
-    #   sphinxcontrib-log-cabinet
-sphinxcontrib-applehelp==1.0.2
-    # via sphinx
-sphinxcontrib-devhelp==1.0.2
-    # via sphinx
-sphinxcontrib-htmlhelp==2.0.0
-    # via sphinx
-sphinxcontrib-jsmath==1.0.1
-    # via sphinx
-sphinxcontrib-log-cabinet==1.0.1
-    # via -r requirements/docs.in
-sphinxcontrib-qthelp==1.0.3
-    # via sphinx
-sphinxcontrib-serializinghtml==1.1.5
-    # via sphinx
-toml==0.10.2
-    # via
-    #   mypy
-    #   pre-commit
-    #   pytest
-    #   tox
-tomli==1.2.1
-    # via pep517
-tox==3.24.4
+toposort==1.7
+    # via pip-compile-multi
+tox==3.24.5
     # via -r requirements/dev.in
-typing-extensions==3.10.0.2
-    # via mypy
-urllib3==1.26.7
-    # via requests
-virtualenv==20.8.1
+virtualenv==20.13.1
     # via
     #   pre-commit
     #   tox
-wheel==0.37.0
+wheel==0.37.1
     # via pip-tools
 
 # The following packages are considered to be unsafe in a requirements file:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/requirements/docs.txt 
new/click-8.0.4/requirements/docs.txt
--- old/click-8.0.3/requirements/docs.txt       2021-10-08 22:28:04.000000000 
+0200
+++ new/click-8.0.4/requirements/docs.txt       2022-02-18 21:15:20.000000000 
+0100
@@ -1,58 +1,59 @@
+# SHA1:34fd4ca6516e97c7348e6facdd9c4ebb68209d1c
 #
-# This file is autogenerated by pip-compile
+# This file is autogenerated by pip-compile-multi
 # To update, run:
 #
-#    pip-compile requirements/docs.in
+#    pip-compile-multi
 #
 alabaster==0.7.12
     # via sphinx
 babel==2.9.1
     # via sphinx
-certifi==2021.5.30
+certifi==2021.10.8
     # via requests
-charset-normalizer==2.0.6
+charset-normalizer==2.0.12
     # via requests
 docutils==0.16
     # via
     #   sphinx
     #   sphinx-tabs
-idna==3.2
+idna==3.3
     # via requests
-imagesize==1.2.0
+imagesize==1.3.0
     # via sphinx
-jinja2==3.0.2
+jinja2==3.0.3
     # via sphinx
 markupsafe==2.0.1
     # via jinja2
-packaging==21.0
+packaging==21.3
     # via
     #   pallets-sphinx-themes
     #   sphinx
-pallets-sphinx-themes==2.0.1
+pallets-sphinx-themes==2.0.2
     # via -r requirements/docs.in
-pygments==2.10.0
+pygments==2.11.2
     # via
     #   sphinx
     #   sphinx-tabs
-pyparsing==2.4.7
+pyparsing==3.0.7
     # via packaging
 pytz==2021.3
     # via babel
-requests==2.26.0
+requests==2.27.1
     # via sphinx
-snowballstemmer==2.1.0
+snowballstemmer==2.2.0
     # via sphinx
-sphinx-issues==1.2.0
-    # via -r requirements/docs.in
-sphinx-tabs==3.2.0
-    # via -r requirements/docs.in
-sphinx==4.2.0
+sphinx==4.4.0
     # via
     #   -r requirements/docs.in
     #   pallets-sphinx-themes
     #   sphinx-issues
     #   sphinx-tabs
     #   sphinxcontrib-log-cabinet
+sphinx-issues==3.0.1
+    # via -r requirements/docs.in
+sphinx-tabs==3.2.0
+    # via -r requirements/docs.in
 sphinxcontrib-applehelp==1.0.2
     # via sphinx
 sphinxcontrib-devhelp==1.0.2
@@ -67,8 +68,5 @@
     # via sphinx
 sphinxcontrib-serializinghtml==1.1.5
     # via sphinx
-urllib3==1.26.7
+urllib3==1.26.8
     # via requests
-
-# The following packages are considered to be unsafe in a requirements file:
-# setuptools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/requirements/tests.txt 
new/click-8.0.4/requirements/tests.txt
--- old/click-8.0.3/requirements/tests.txt      2021-10-08 22:28:04.000000000 
+0200
+++ new/click-8.0.4/requirements/tests.txt      2022-02-18 21:15:20.000000000 
+0100
@@ -1,20 +1,21 @@
+# SHA1:43b07f68ee4dcf187dce9de79fc8dd462f1c99d6
 #
-# This file is autogenerated by pip-compile
+# This file is autogenerated by pip-compile-multi
 # To update, run:
 #
-#    pip-compile requirements/tests.in
+#    pip-compile-multi
 #
-attrs==21.2.0
+attrs==21.4.0
     # via pytest
 iniconfig==1.1.1
     # via pytest
-packaging==21.0
+packaging==21.3
     # via pytest
 pluggy==1.0.0
     # via pytest
-py==1.10.0
+py==1.11.0
     # via pytest
-pyparsing==2.4.7
+pyparsing==3.0.7
     # via packaging
 pytest==6.2.5
     # via -r requirements/tests.in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/requirements/typing.txt 
new/click-8.0.4/requirements/typing.txt
--- old/click-8.0.3/requirements/typing.txt     2021-10-08 22:28:04.000000000 
+0200
+++ new/click-8.0.4/requirements/typing.txt     2022-02-18 21:15:20.000000000 
+0100
@@ -1,14 +1,15 @@
+# SHA1:7983aaa01d64547827c20395d77e248c41b2572f
 #
-# This file is autogenerated by pip-compile
+# This file is autogenerated by pip-compile-multi
 # To update, run:
 #
-#    pip-compile requirements/typing.in
+#    pip-compile-multi
 #
+mypy==0.931
+    # via -r requirements/typing.in
 mypy-extensions==0.4.3
     # via mypy
-mypy==0.910
-    # via -r requirements/typing.in
-toml==0.10.2
+tomli==2.0.1
     # via mypy
-typing-extensions==3.10.0.2
+typing-extensions==4.1.1
     # via mypy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/setup.cfg new/click-8.0.4/setup.cfg
--- old/click-8.0.3/setup.cfg   2021-10-10 20:07:14.952687500 +0200
+++ new/click-8.0.4/setup.cfg   2022-02-18 21:31:08.819345700 +0100
@@ -29,7 +29,7 @@
 [options]
 packages = find:
 package_dir = = src
-include_package_data = true
+include_package_data = True
 python_requires = >= 3.6
 
 [options.packages.find]
@@ -41,14 +41,14 @@
        error
 
 [coverage:run]
-branch = true
+branch = True
 source = 
        click
        tests
 
 [coverage:paths]
 source = 
-       click
+       src
        */site-packages
 
 [flake8]
@@ -65,6 +65,7 @@
 [mypy]
 files = src/click
 python_version = 3.6
+show_error_codes = True
 disallow_subclassing_any = True
 disallow_untyped_calls = True
 disallow_untyped_defs = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/__init__.py 
new/click-8.0.4/src/click/__init__.py
--- old/click-8.0.3/src/click/__init__.py       2021-10-10 20:06:49.000000000 
+0200
+++ new/click-8.0.4/src/click/__init__.py       2022-02-18 21:30:31.000000000 
+0100
@@ -72,4 +72,4 @@
 from .utils import get_text_stream as get_text_stream
 from .utils import open_file as open_file
 
-__version__ = "8.0.3"
+__version__ = "8.0.4"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/_compat.py 
new/click-8.0.4/src/click/_compat.py
--- old/click-8.0.3/src/click/_compat.py        2021-10-08 18:57:05.000000000 
+0200
+++ new/click-8.0.4/src/click/_compat.py        2022-01-13 20:01:39.000000000 
+0100
@@ -388,9 +388,9 @@
 ) -> t.Tuple[t.IO, bool]:
     binary = "b" in mode
 
-    # Standard streams first.  These are simple because they don't need
-    # special handling for the atomic flag.  It's entirely ignored.
-    if filename == "-":
+    # Standard streams first. These are simple because they ignore the
+    # atomic flag. Use fsdecode to handle Path("-").
+    if os.fsdecode(filename) == "-":
         if any(m in mode for m in ["w", "a", "x"]):
             if binary:
                 return get_binary_stdout(), False
@@ -561,7 +561,6 @@
 
         return rv
 
-
 else:
 
     def _get_argv_encoding() -> str:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/_termui_impl.py 
new/click-8.0.4/src/click/_termui_impl.py
--- old/click-8.0.3/src/click/_termui_impl.py   2021-10-08 22:28:04.000000000 
+0200
+++ new/click-8.0.4/src/click/_termui_impl.py   2022-01-13 20:01:39.000000000 
+0100
@@ -675,7 +675,6 @@
         _translate_ch_to_exc(rv)
         return rv
 
-
 else:
     import tty
     import termios
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/core.py 
new/click-8.0.4/src/click/core.py
--- old/click-8.0.3/src/click/core.py   2021-10-10 20:04:11.000000000 +0200
+++ new/click-8.0.4/src/click/core.py   2022-02-18 05:22:12.000000000 +0100
@@ -1,8 +1,8 @@
 import enum
 import errno
+import inspect
 import os
 import sys
-import typing
 import typing as t
 from collections import abc
 from contextlib import contextmanager
@@ -632,13 +632,13 @@
             self.obj = rv = object_type()
         return rv
 
-    @typing.overload
+    @t.overload
     def lookup_default(
         self, name: str, call: "te.Literal[True]" = True
     ) -> t.Optional[t.Any]:
         ...
 
-    @typing.overload
+    @t.overload
     def lookup_default(
         self, name: str, call: "te.Literal[False]" = ...
     ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:
@@ -956,7 +956,7 @@
 
         return results
 
-    @typing.overload
+    @t.overload
     def main(
         self,
         args: t.Optional[t.Sequence[str]] = None,
@@ -967,7 +967,7 @@
     ) -> "te.NoReturn":
         ...
 
-    @typing.overload
+    @t.overload
     def main(
         self,
         args: t.Optional[t.Sequence[str]] = None,
@@ -2172,13 +2172,13 @@
 
         return metavar
 
-    @typing.overload
+    @t.overload
     def get_default(
         self, ctx: Context, call: "te.Literal[True]" = True
     ) -> t.Optional[t.Any]:
         ...
 
-    @typing.overload
+    @t.overload
     def get_default(
         self, ctx: Context, call: bool = ...
     ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:
@@ -2472,7 +2472,7 @@
         elif prompt is False:
             prompt_text = None
         else:
-            prompt_text = t.cast(str, prompt)
+            prompt_text = prompt
 
         self.prompt = prompt_text
         self.confirmation_prompt = confirmation_prompt
@@ -2720,7 +2720,7 @@
                 default_string = f"({self.show_default})"
             elif isinstance(default_value, (list, tuple)):
                 default_string = ", ".join(str(d) for d in default_value)
-            elif callable(default_value):
+            elif inspect.isfunction(default_value):
                 default_string = _("(dynamic)")
             elif self.is_bool_flag and self.secondary_opts:
                 # For boolean flags that have distinct True/False opts,
@@ -2753,13 +2753,13 @@
 
         return ("; " if any_prefix_is_slash else " / ").join(rv), help
 
-    @typing.overload
+    @t.overload
     def get_default(
         self, ctx: Context, call: "te.Literal[True]" = True
     ) -> t.Optional[t.Any]:
         ...
 
-    @typing.overload
+    @t.overload
     def get_default(
         self, ctx: Context, call: bool = ...
     ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:
@@ -2770,7 +2770,7 @@
     ) -> t.Optional[t.Union[t.Any, t.Callable[[], t.Any]]]:
         # If we're a non boolean flag our default is more complex because
         # we need to look at all flags in the same group to figure out
-        # if we're the the default one in which case we return the flag
+        # if we're the default one in which case we return the flag
         # value as default.
         if self.is_flag and not self.is_bool_flag:
             for param in ctx.command.params:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/decorators.py 
new/click-8.0.4/src/click/decorators.py
--- old/click-8.0.3/src/click/decorators.py     2021-10-08 22:28:04.000000000 
+0200
+++ new/click-8.0.4/src/click/decorators.py     2022-01-13 20:04:10.000000000 
+0100
@@ -14,7 +14,7 @@
 from .utils import echo
 
 F = t.TypeVar("F", bound=t.Callable[..., t.Any])
-FC = t.TypeVar("FC", t.Callable[..., t.Any], Command)
+FC = t.TypeVar("FC", bound=t.Union[t.Callable[..., t.Any], Command])
 
 
 def pass_context(f: F) -> F:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/globals.py 
new/click-8.0.4/src/click/globals.py
--- old/click-8.0.3/src/click/globals.py        2021-10-08 22:28:04.000000000 
+0200
+++ new/click-8.0.4/src/click/globals.py        2022-01-13 20:01:39.000000000 
+0100
@@ -1,4 +1,3 @@
-import typing
 import typing as t
 from threading import local
 
@@ -9,12 +8,12 @@
 _local = local()
 
 
-@typing.overload
+@t.overload
 def get_current_context(silent: "te.Literal[False]" = False) -> "Context":
     ...
 
 
-@typing.overload
+@t.overload
 def get_current_context(silent: bool = ...) -> t.Optional["Context"]:
     ...
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/shell_completion.py 
new/click-8.0.4/src/click/shell_completion.py
--- old/click-8.0.3/src/click/shell_completion.py       2021-10-08 
18:57:05.000000000 +0200
+++ new/click-8.0.4/src/click/shell_completion.py       2022-01-13 
20:04:10.000000000 +0100
@@ -102,10 +102,10 @@
         IFS=',' read type value <<< "$completion"
 
         if [[ $type == 'dir' ]]; then
-            COMREPLY=()
+            COMPREPLY=()
             compopt -o dirnames
         elif [[ $type == 'file' ]]; then
-            COMREPLY=()
+            COMPREPLY=()
             compopt -o default
         elif [[ $type == 'plain' ]]; then
             COMPREPLY+=($value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/termui.py 
new/click-8.0.4/src/click/termui.py
--- old/click-8.0.3/src/click/termui.py 2021-10-10 19:48:13.000000000 +0200
+++ new/click-8.0.4/src/click/termui.py 2022-02-18 05:22:12.000000000 +0100
@@ -3,7 +3,6 @@
 import itertools
 import os
 import sys
-import typing
 import typing as t
 from gettext import gettext as _
 
@@ -94,7 +93,7 @@
     """Prompts a user for input.  This is a convenience function that can
     be used to prompt a user for input later.
 
-    If the user aborts the input by sending a interrupt signal, this
+    If the user aborts the input by sending an interrupt signal, this
     function will catch it and raise a :exc:`Abort` exception.
 
     :param text: the text to show for the prompt.
@@ -160,7 +159,6 @@
         if confirmation_prompt is True:
             confirmation_prompt = _("Repeat for confirmation")
 
-        confirmation_prompt = t.cast(str, confirmation_prompt)
         confirmation_prompt = _build_prompt(confirmation_prompt, prompt_suffix)
 
     while True:
@@ -182,7 +180,6 @@
         if not confirmation_prompt:
             return result
         while True:
-            confirmation_prompt = t.cast(str, confirmation_prompt)
             value2 = prompt_func(confirmation_prompt)
             if value2:
                 break
@@ -627,7 +624,7 @@
 
 def secho(
     message: t.Optional[t.Any] = None,
-    file: t.Optional[t.IO] = None,
+    file: t.Optional[t.IO[t.AnyStr]] = None,
     nl: bool = True,
     err: bool = False,
     color: t.Optional[bool] = None,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/testing.py 
new/click-8.0.4/src/click/testing.py
--- old/click-8.0.3/src/click/testing.py        2021-10-08 18:57:05.000000000 
+0200
+++ new/click-8.0.4/src/click/testing.py        2022-01-17 22:58:56.000000000 
+0100
@@ -464,16 +464,16 @@
             Added the ``temp_dir`` parameter.
         """
         cwd = os.getcwd()
-        t = tempfile.mkdtemp(dir=temp_dir)
-        os.chdir(t)
+        dt = tempfile.mkdtemp(dir=temp_dir)  # type: ignore[type-var]
+        os.chdir(dt)
 
         try:
-            yield t
+            yield t.cast(str, dt)
         finally:
             os.chdir(cwd)
 
             if temp_dir is None:
                 try:
-                    shutil.rmtree(t)
+                    shutil.rmtree(dt)
                 except OSError:  # noqa: B014
                     pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/types.py 
new/click-8.0.4/src/click/types.py
--- old/click-8.0.3/src/click/types.py  2021-10-10 19:20:35.000000000 +0200
+++ new/click-8.0.4/src/click/types.py  2022-01-13 20:01:39.000000000 +0100
@@ -744,26 +744,23 @@
 
 
 class Path(ParamType):
-    """The path type is similar to the :class:`File` type but it performs
-    different checks.  First of all, instead of returning an open file
-    handle it returns just the filename.  Secondly, it can perform various
-    basic checks about what the file or directory should be.
+    """The ``Path`` type is similar to the :class:`File` type, but
+    returns the filename instead of an open file. Various checks can be
+    enabled to validate the type of file and permissions.
 
-    :param exists: if set to true, the file or directory needs to exist for
-                   this value to be valid.  If this is not required and a
-                   file does indeed not exist, then all further checks are
-                   silently skipped.
-    :param file_okay: controls if a file is a possible value.
-    :param dir_okay: controls if a directory is a possible value.
-    :param writable: if true, a writable check is performed.
-    :param readable: if true, a readable check is performed.
-    :param resolve_path: if this is true, then the path is fully resolved
-                         before the value is passed onwards.  This means
-                         that it's absolute and symlinks are resolved.  It
-                         will not expand a tilde-prefix, as this is
-                         supposed to be done by the shell only.
-    :param allow_dash: If this is set to `True`, a single dash to indicate
-                       standard streams is permitted.
+    :param exists: The file or directory needs to exist for the value to
+        be valid. If this is not set to ``True``, and the file does not
+        exist, then all further checks are silently skipped.
+    :param file_okay: Allow a file as a value.
+    :param dir_okay: Allow a directory as a value.
+    :param writable: The file or directory must be writable.
+    :param readable: The file or directory must be readable.
+    :param resolve_path: Make the value absolute and resolve any
+        symlinks. A ``~`` is not expanded, as this is supposed to be
+        done by the shell only.
+    :param allow_dash: Allow a single dash as a value, which indicates
+        a standard stream (but does not open it). Use
+        :func:`~click.open_file` to handle opening this value.
     :param path_type: Convert the incoming path value to this type. If
         ``None``, keep Python's default, which is ``str``. Useful to
         convert to :class:`pathlib.Path`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click/utils.py 
new/click-8.0.4/src/click/utils.py
--- old/click-8.0.3/src/click/utils.py  2021-10-08 22:28:04.000000000 +0200
+++ new/click-8.0.4/src/click/utils.py  2022-02-18 21:25:30.000000000 +0100
@@ -203,7 +203,7 @@
 
 def echo(
     message: t.Optional[t.Any] = None,
-    file: t.Optional[t.IO] = None,
+    file: t.Optional[t.IO[t.Any]] = None,
     nl: bool = True,
     err: bool = False,
     color: t.Optional[bool] = None,
@@ -340,33 +340,42 @@
     lazy: bool = False,
     atomic: bool = False,
 ) -> t.IO:
-    """This is similar to how the :class:`File` works but for manual
-    usage.  Files are opened non lazy by default.  This can open regular
-    files as well as stdin/stdout if ``'-'`` is passed.
-
-    If stdin/stdout is returned the stream is wrapped so that the context
-    manager will not close the stream accidentally.  This makes it possible
-    to always use the function like this without having to worry to
-    accidentally close a standard stream::
+    """Open a file, with extra behavior to handle ``'-'`` to indicate
+    a standard stream, lazy open on write, and atomic write. Similar to
+    the behavior of the :class:`~click.File` param type.
+
+    If ``'-'`` is given to open ``stdout`` or ``stdin``, the stream is
+    wrapped so that using it in a context manager will not close it.
+    This makes it possible to use the function without accidentally
+    closing a standard stream:
+
+    .. code-block:: python
 
         with open_file(filename) as f:
             ...
 
-    .. versionadded:: 3.0
+    :param filename: The name of the file to open, or ``'-'`` for
+        ``stdin``/``stdout``.
+    :param mode: The mode in which to open the file.
+    :param encoding: The encoding to decode or encode a file opened in
+        text mode.
+    :param errors: The error handling mode.
+    :param lazy: Wait to open the file until it is accessed. For read
+        mode, the file is temporarily opened to raise access errors
+        early, then closed until it is read again.
+    :param atomic: Write to a temporary file and replace the given file
+        on close.
 
-    :param filename: the name of the file to open (or ``'-'`` for 
stdin/stdout).
-    :param mode: the mode in which to open the file.
-    :param encoding: the encoding to use.
-    :param errors: the error handling for this file.
-    :param lazy: can be flipped to true to open the file lazily.
-    :param atomic: in atomic mode writes go into a temporary file and it's
-                   moved on close.
+    .. versionadded:: 3.0
     """
     if lazy:
         return t.cast(t.IO, LazyFile(filename, mode, encoding, errors, 
atomic=atomic))
+
     f, should_close = open_stream(filename, mode, encoding, errors, 
atomic=atomic)
+
     if not should_close:
         f = t.cast(t.IO, KeepOpenFile(f))
+
     return f
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/src/click.egg-info/PKG-INFO 
new/click-8.0.4/src/click.egg-info/PKG-INFO
--- old/click-8.0.3/src/click.egg-info/PKG-INFO 2021-10-10 20:07:14.000000000 
+0200
+++ new/click-8.0.4/src/click.egg-info/PKG-INFO 2022-02-18 21:31:08.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: click
-Version: 8.0.3
+Version: 8.0.4
 Summary: Composable command line interface toolkit
 Home-page: https://palletsprojects.com/p/click/
 Author: Armin Ronacher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/tests/test_arguments.py 
new/click-8.0.4/tests/test_arguments.py
--- old/click-8.0.3/tests/test_arguments.py     2021-10-08 19:23:34.000000000 
+0200
+++ new/click-8.0.4/tests/test_arguments.py     2021-10-25 17:46:17.000000000 
+0200
@@ -120,9 +120,9 @@
         assert result.exit_code == 0
 
 
-def test_path_args(runner):
+def test_path_allow_dash(runner):
     @click.command()
-    @click.argument("input", type=click.Path(dir_okay=False, allow_dash=True))
+    @click.argument("input", type=click.Path(allow_dash=True))
     def foo(input):
         click.echo(input)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/tests/test_options.py 
new/click-8.0.4/tests/test_options.py
--- old/click-8.0.3/tests/test_options.py       2021-10-10 19:20:35.000000000 
+0200
+++ new/click-8.0.4/tests/test_options.py       2022-02-18 05:22:12.000000000 
+0100
@@ -305,6 +305,19 @@
     assert "(current user)" in result.output
 
 
+def test_dynamic_default_help_special_method(runner):
+    class Value:
+        def __call__(self):
+            return 42
+
+        def __str__(self):
+            return "special value"
+
+    opt = click.Option(["-a"], default=Value(), show_default=True)
+    ctx = click.Context(click.Command("cli"))
+    assert "special value" in opt.get_help_record(ctx)[1]
+
+
 @pytest.mark.parametrize(
     ("type", "expect"),
     [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/tests/test_utils.py 
new/click-8.0.4/tests/test_utils.py
--- old/click-8.0.3/tests/test_utils.py 2021-10-10 19:48:13.000000000 +0200
+++ new/click-8.0.4/tests/test_utils.py 2021-10-25 17:46:17.000000000 +0200
@@ -320,6 +320,22 @@
         assert result.output == "foobar\nmeep\n"
 
 
+def test_open_file_pathlib_dash(runner):
+    @click.command()
+    @click.argument(
+        "filename", type=click.Path(allow_dash=True, path_type=pathlib.Path)
+    )
+    def cli(filename):
+        click.echo(str(type(filename)))
+
+        with click.open_file(filename) as f:
+            click.echo(f.read())
+
+        result = runner.invoke(cli, ["-"], input="value")
+        assert result.exception is None
+        assert result.output == "pathlib.Path\nvalue\n"
+
+
 def test_open_file_ignore_errors_stdin(runner):
     @click.command()
     @click.argument("filename")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/click-8.0.3/tox.ini new/click-8.0.4/tox.ini
--- old/click-8.0.3/tox.ini     2021-10-08 18:57:05.000000000 +0200
+++ new/click-8.0.4/tox.ini     2022-02-18 05:22:12.000000000 +0100
@@ -1,6 +1,6 @@
 [tox]
 envlist =
-    py{39,38,37,36,py3}
+    py3{11,10,9,8,7,6},pypy3{8,7}
     style
     typing
     docs

Reply via email to