summaryrefslogtreecommitdiff
path: root/src/click/decorators.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2021-05-18 19:33:21 -0700
committerDavid Lord <davidism@gmail.com>2021-05-18 19:33:21 -0700
commit26c9b926dfd9ad9baa0b7ca764fc798a0149c455 (patch)
treef7f95593b596c60d732c370ee785e7c5b5f92c82 /src/click/decorators.py
parentc0013d3e84da335d48e9d747f39e18f163977f01 (diff)
downloadclick-26c9b926dfd9ad9baa0b7ca764fc798a0149c455.tar.gz
update changelog about version_option
package name must match installed name, or be passed with package_name=
Diffstat (limited to 'src/click/decorators.py')
-rw-r--r--src/click/decorators.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/click/decorators.py b/src/click/decorators.py
index 0c095ca..5940e69 100644
--- a/src/click/decorators.py
+++ b/src/click/decorators.py
@@ -330,7 +330,10 @@ def version_option(
value for messages.
.. versionchanged:: 8.0
- Use :mod:`importlib.metadata` instead of ``pkg_resources``.
+ Use :mod:`importlib.metadata` instead of ``pkg_resources``. The
+ version is detected based on the package name, not the entry
+ point name. The Python package name must match the installed
+ package name, or be passed with ``package_name=``.
"""
if message is None:
message = _("%(prog)s, version %(version)s")