Skip to content
Myr

update changelog about version_option

Before adoption: this commit came in with the history the project adopted, so no landing records it.

package name must match installed name, or be passed with package_name=

authored by David Lord · committed by David Lord · parent c0013d3 · Browse files · 2 files+8 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−3 removed

  • other:+8 added−3 removed

2 files+8 added−3 removed

modified:src/click/decorators.py+4 added-1 removed
328 unmodified lines
329 Add the ``package_name`` parameter, and the ``%(package)s``330 value for messages.331332 .. versionchanged:: 8.0333 Use :mod:`importlib.metadata` instead of ``pkg_resources``.333 Use :mod:`importlib.metadata` instead of ``pkg_resources``. The334 version is detected based on the package name, not the entry335 point name. The Python package name must match the installed336 package name, or be passed with ``package_name=``.337 """338 if message is None:339 message = _("%(prog)s, version %(version)s")340
97 unmodified lines
modified:CHANGES.rst+4 added-2 removed
31 unmodified lines
32 parameter. :issue:`1264`, :pr:`1329`33- Add an optional parameter to ``ProgressBar.update`` to set the34 ``current_item``. :issue:`1226`, :pr:`1332`35- ``version_option`` uses ``importlib.metadata`` (or the36 ``importlib_metadata`` backport) instead of ``pkg_resources``.37 :issue:`1582`36 ``importlib_metadata`` backport) instead of ``pkg_resources``. The37 version is detected based on the package name, not the entry point38 name. The Python package name must match the installed package39 name, or be passed with ``package_name=``. :issue:`1582`40- If validation fails for a prompt with ``hide_input=True``, the value41 is not shown in the error message. :issue:`1460`42- An ``IntRange`` or ``FloatRange`` option shows the accepted range in43 its help text. :issue:`1525`, :pr:`1303`
835 unmodified lines