Merge branch '7.x'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parents 9c5769e, 02756dd · Browse files · 11 files·+467 added−520 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
11 files+467 added−520 removed
- tests:+16 added−1 removed
- other:+451 added−519 removed
Provenance
- Commit
11abf2b- Tree
e9983da- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent 1
9c5769e- Parent 2
02756dd
11 files changed+467 added−520 removed
modified:click/types.py+21 added-12 removed
131 unmodified lines132 133 You should only pass a list or tuple of choices. Other iterables134 (like generators) may lead to surprising results.135 136+ The resulting value will always be one of the originally passed choices137+ regardless of ``case_sensitive`` or any ``ctx.token_normalize_func``138+ being specified.139+140 See :ref:`choice-opts` for an example.141 142 :param case_sensitive: Set to false to make choices case143 insensitive. Defaults to true.11 unmodified lines155 def get_missing_message(self, param):156 return 'Choose from:\n\t%s.' % ',\n\t'.join(self.choices)157 158 def convert(self, value, param, ctx):155- # Exact match156- if value in self.choices:157- return value158-159 # Match through normalization and case sensitivity160 # first do token_normalize_func, then lowercase161 # preserve original `value` to produce an accurate message in162 # `self.fail`163 normed_value = value164- normed_choices = self.choices164+ normed_choices = {choice: choice for choice in self.choices}165 166- if ctx is not None and \167- ctx.token_normalize_func is not None:166+ if ctx is not None and ctx.token_normalize_func is not None:167 normed_value = ctx.token_normalize_func(value)169- normed_choices = [ctx.token_normalize_func(choice) for choice in170- self.choices]168+ normed_choices = {169+ ctx.token_normalize_func(normed_choice): original170+ for normed_choice, original in normed_choices.items()171+ }172 173 if not self.case_sensitive:173- normed_value = normed_value.lower()174- normed_choices = [choice.lower() for choice in normed_choices]174+ if PY2:175+ lower = str.lower176+ else:177+ lower = str.casefold178 179+ normed_value = lower(normed_value)180+ normed_choices = {181+ lower(normed_choice): original182+ for normed_choice, original in normed_choices.items()183+ }184+185 if normed_value in normed_choices:177- return normed_value186+ return normed_choices[normed_value]187 188 self.fail('invalid choice: %s. (choose from %s)' %189 (value, ', '.join(self.choices)), param, ctx)190 487 unmodified linesmodified:docs/changelog.rst+2 added-1 removed
1-.. currentmodule:: click1+Changelog2+=========3 4 .. include:: ../CHANGES.rstmodified:docs/conf.py+18 added-12 removed
1-from pallets_sphinx_themes import ProjectLink, get_version1+from pallets_sphinx_themes import get_version2+from pallets_sphinx_themes import ProjectLink3 4 # Project --------------------------------------------------------------5 6 project = "Click"6-copyright = "2014 Pallets Team"7-author = "Pallets Team"7+copyright = "2014 Pallets"8+author = "Pallets"9 release, version = get_version("Click", version_length=1)10 11 # General --------------------------------------------------------------12 13 master_doc = "index"13-extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "pallets_sphinx_themes"]14+extensions = [15+ "sphinx.ext.autodoc",16+ "sphinx.ext.intersphinx",17+ "sphinxcontrib.log_cabinet",18+ "pallets_sphinx_themes",19+ "sphinx_issues",20+]21 intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}22+issues_github_path = "pallets/click"23 24 # HTML -----------------------------------------------------------------25 26 html_theme = "click"1 unmodified line28 html_context = {29 "project_links": [30 ProjectLink("Donate to Pallets", "https://palletsprojects.com/donate"),31 ProjectLink("Click Website", "https://palletsprojects.com/p/click/"),24- ProjectLink("PyPI releases", "https://pypi.org/project/Click/"),32+ ProjectLink("PyPI releases", "https://pypi.org/project/click/"),33 ProjectLink("Source Code", "https://github.com/pallets/click/"),34 ProjectLink("Issue Tracker", "https://github.com/pallets/click/issues/"),35 ]36 }37 html_sidebars = {30- "index": ["project.html", "versions.html", "searchbox.html"],31- "**": ["localtoc.html", "relations.html", "versions.html", "searchbox.html"],38+ "index": ["project.html", "localtoc.html", "searchbox.html"],39+ "**": ["localtoc.html", "relations.html", "searchbox.html"],40 }33-singlehtml_sidebars = {"index": ["project.html", "versions.html", "localtoc.html"]}41+singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}42 html_static_path = ["_static"]43 html_favicon = "_static/click-icon.png"44 html_logo = "_static/click-logo-sidebar.png"37-html_title = "Click Documentation ({})".format(version)45+html_title = f"Click Documentation ({version})"46 html_show_sourcelink = False39-html_domain_indices = False40-html_experimental_html5_writer = True47 48 # LaTeX ----------------------------------------------------------------49 50 latex_documents = [45- (master_doc, "Click-{}.tex".format(version), html_title, author, "manual")51+ (master_doc, f"Click-{version}.tex", html_title, author, "manual")52 ]modified:docs/options.rst+10 added-2 removed
313 unmodified lines314 --------------315 316 Sometimes, you want to have a parameter be a choice of a list of values.317 In that case you can use :class:`Choice` type. It can be instantiated318-with a list of valid values.318+with a list of valid values. The originally passed choice will be returned,319+not the str passed on the command line. Token normalization functions and320+``case_sensitive=False`` can cause the two to be different but still match.321 322 Example:323 324 .. click:example::325 326 @click.command()325- @click.option('--hash-type', type=click.Choice(['md5', 'sha1']))327+ @click.option('--hash-type',328+ type=click.Choice(['MD5', 'SHA1'], case_sensitive=False))329 def digest(hash_type):330 click.echo(hash_type)331 332 What it looks like:333 334 .. click:run::335 336+ invoke(digest, args=['--hash-type=MD5'])337+ println()338 invoke(digest, args=['--hash-type=md5'])339 println()340 invoke(digest, args=['--hash-type=foo'])341 println()3 unmodified lines345 346 You should only pass the choices as list or tuple. Other iterables (like347 generators) may lead to surprising results.348 349+ Choices should be unique after considering the effects of350+ ``case_sensitive`` and any specified token normalization function.351+352 .. _option-prompting:353 354 Prompting355 ---------449 unmodified linesmodified:docs/python3.rst+4 added-4 removed
145 unmodified lines146 curious about the reasons for this, you can join the discussions in the147 Python 3 bug tracker:148 149 * `ASCII is a bad filesystem default encoding150- <http://bugs.python.org/issue13643#msg149941>`_150+ <https://bugs.python.org/issue13643#msg149941>`_151 * `Use surrogateescape as default error handler152- <http://bugs.python.org/issue19977>`_152+ <https://bugs.python.org/issue19977>`_153 * `Python 3 raises Unicode errors in the C locale154- <http://bugs.python.org/issue19846>`_154+ <https://bugs.python.org/issue19846>`_155 * `LC_CTYPE=C: pydoc leaves terminal in an unusable state156- <http://bugs.python.org/issue21398>`_ (this is relevant to Click156+ <https://bugs.python.org/issue21398>`_ (this is relevant to Click157 because the pager support is provided by the stdlib pydoc module)158 159 Note (Python 3.7 onwards): Even though your locale may not be properly160 configured, Python 3.7 Click will not raise the above exception because Python25 unmodified linesmodified:docs/quickstart.rst+1 added-1 removed
44 unmodified lines45 ``pip`` first. For more information about this, see `installing pip`_.46 Once you have it installed, run the ``pip`` command from above, but without47 the `sudo` prefix.48 49-.. _installing pip: https://pip.readthedocs.io/en/latest/installing.html49+.. _installing pip: https://pip.readthedocs.io/en/latest/installing/50 51 Once you have virtualenv installed, just fire up a shell and create52 your own environment. I usually create a project folder and a `venv`53 folder within::224 unmodified linesmodified:docs/requirements.txt+4 added-2 removed
1-Sphinx~=1.8.02-Pallets-Sphinx-Themes~=1.1.01+Sphinx~=2.2.02+Pallets-Sphinx-Themes~=1.2.23+sphinxcontrib-log-cabinet~=1.0.14+sphinx-issues~=1.2.0modified:docs/why.rst+1 added-1 removed
36 unmodified lines37 should.38 39 Too much customizability would break this promise.40 41-Click was written to support the `Flask <http://flask.pocoo.org/>`_41+Click was written to support the `Flask <https://palletsprojects.com/p/flask/>`_42 microframework ecosystem because no tool could provide it with the43 functionality it needed.44 45 To get an understanding of what Click is all about, I strongly recommend107 unmodified linesmodified:tests/test_normalization.py+1 added-1 removed
18 unmodified lines19 def test_choice_normalization(runner):20 @click.command(context_settings=CONTEXT_SETTINGS)21 @click.option('--choice', type=click.Choice(['Foo', 'Bar']))22 def cli(choice):23- click.echo('Foo')23+ click.echo(choice)24 25 result = runner.invoke(cli, ['--CHOICE', 'FOO'])26 assert result.output == 'Foo\n'27 12 unmodified linesmodified:tests/test_options.py+15 added
333 unmodified lines334 click.echo(foo)335 336 result = runner.invoke(cmd, ['--foo', 'apple'])337 assert result.exit_code == 0338+ assert result.output == 'Apple\n'339 340 result = runner.invoke(cmd, ['--foo', 'oRANGe'])341 assert result.exit_code == 0342+ assert result.output == 'Orange\n'343 344 result = runner.invoke(cmd, ['--foo', 'Apple'])345 assert result.exit_code == 0346+ assert result.output == 'Apple\n'347 348 @click.command()349 @click.option('--foo', type=click.Choice(['Orange', 'Apple']))350 def cmd2(foo):8 unmodified lines359 result = runner.invoke(cmd2, ['--foo', 'Apple'])360 assert result.exit_code == 0361 362 363+def test_case_insensitive_choice_returned_exactly(runner):364+ @click.command()365+ @click.option('--foo', type=click.Choice(366+ ['Orange', 'Apple'], case_sensitive=False))367+ def cmd(foo):368+ click.echo(foo)369+370+ result = runner.invoke(cmd, ['--foo', 'apple'])371+ assert result.exit_code == 0372+ assert result.output == 'Apple\n'373+374+375 def test_multiline_help(runner):376 @click.command()377 @click.option('--foo', help="""378 hello126 unmodified linesmodified:CHANGES.rst+390 added-484 removed
1-Click Changelog2-===============1+.. currentmodule:: click2 3 Version 8.04 -----------5 6 Unreleased7 9-- Fix autoloading for ZSH completion and add error handling. (`#1348`_ )10-- Adds a repr to Command, showing the command name for friendlier debugging. (`#1267`_, `#1295`_)11-- Add support for distinguishing the source of a command line parameter. (`#1264`_, `#1329`_)8+- Fix autoloading for ZSH completion and add error handling.9+ :pr:`1348`10+- Adds a repr to Command, showing the command name for friendlier11+ debugging. :issue:`1267`, :pr:`1295`12+- Add support for distinguishing the source of a command line13+ parameter. :issue:`1264`, :pr:`1329`14 - Add an optional parameter to ``ProgressBar.update`` to set the13- ``current_item``. (`#1226`_, `#1332`_)15+ ``current_item``. :issue:`1226`, :pr:`1332`16 15-.. _#1267: https://github.com/pallets/click/issues/126716-.. _#1295: https://github.com/pallets/click/pull/129517-.. _#1264: https://github.com/pallets/click/issues/126418-.. _#1329: https://github.com/pallets/click/pull/132919-.. _#1226: https://github.com/pallets/click/issues/122620-.. _#1348: https://github.com/pallets/click/pull/134821-.. _#1332: https://github.com/pallets/click/pull/133217 23-18 Version 7.119 -----------20 21 Unreleased22 29-- Add ``no_args_is_help`` option to ``click.Command``, defaults to False (`#1167`_)30-- Fix link in ``unicode_literals`` error message. (`#1151`_)31-- Add support for colored output on UNIX Jupyter notebooks. (`#1185`_)32-- Remove unused compat shim for ``bytes``. (`#1195`_)33-- Expand unit testing around termui, especially getchar (Windows). (`#1116`_)34-- Fix output on Windows Python 2.7 built with MSVC 14. #134223+- Add ``no_args_is_help`` option to ``click.Command``, defaults to24+ False :pr:`1167`25+- Fix link in ``unicode_literals`` error message. :pr:`1151`26+- Add support for colored output on UNIX Jupyter notebooks.27+ :issue:`1185`28+- Remove unused compat shim for ``bytes``. :pr:`1195`29+- Expand unit testing around termui, especially getchar (Windows).30+ :issue:`1116`31+- Fix output on Windows Python 2.7 built with MSVC 14. :pr:`1342`32+- Always return of of the passed choices for ``click.Choice``33+ :issue:`1277`, :pr:`1318`34 36-.. _#1167: https://github.com/pallets/click/pull/116737-.. _#1151: https://github.com/pallets/click/pull/115138-.. _#1185: https://github.com/pallets/click/issues/118539-.. _#1195: https://github.com/pallets/click/pull/119540-.. _#1116: https://github.com/pallets/click/issues/111635 36 Version 7.037 -----------38 39 Released 2018-09-2540 47-- Drop support for Python 2.6 and 3.3. (`#967`_, `#976`_)48-- Wrap ``click.Choice``'s missing message. (`#202`_, `#1000`_)49-- Add native ZSH autocompletion support. (`#323`_, `#865`_)50-- Document that ANSI color info isn't parsed from bytearrays in51- Python 2. (`#334`_)52-- Document byte-stripping behavior of ``CliRunner``. (`#334`_,53- `#1010`_)54-- Usage errors now hint at the ``--help`` option. (`#393`_, `#557`_)55-- Implement streaming pager. (`#409`_, `#889`_)56-- Extract bar formatting to its own method. (`#414`_)41+- Drop support for Python 2.6 and 3.3. :pr:`967, 976`42+- Wrap ``click.Choice``'s missing message. :issue:`202`, :pr:`1000`43+- Add native ZSH autocompletion support. :issue:`323`, :pr:`865`44+- Document that ANSI color info isn't parsed from bytearrays in Python45+ 2. :issue:`334`46+- Document byte-stripping behavior of ``CliRunner``. :issue:`334`,47+ :pr:`1010`48+- Usage errors now hint at the ``--help`` option. :issue:`393`,49+ :pr:`557`50+- Implement streaming pager. :issue:`409`, :pr:`889`51+- Extract bar formatting to its own method. :pr:`414`52 - Add ``DateTime`` type for converting input in given date time58- formats. (`#423`_)53+ formats. :pr:`423`54 - ``secho``'s first argument can now be ``None``, like in ``echo``.60- (`#424`_)55+ :pr:`424`56 - Fixes a ``ZeroDivisionError`` in ``ProgressBar.make_step``, when the57 arg passed to the first call of ``ProgressBar.update`` is 0.63- (`#447`_, `#1012`_)64-- Show progressbar only if total execution time is visible. (`#487`_)65-- Added the ability to hide commands and options from help. (`#500`_)66-- Document that options can be ``required=True``. (`#514`_, `#1022`_)58+ :issue:`447`, :pr:`1012`59+- Show progressbar only if total execution time is visible. :pr:`487`60+- Added the ability to hide commands and options from help. :pr:`500`61+- Document that options can be ``required=True``. :issue:`514`,62+ :pr:`1022`63 - Non-standalone calls to ``Context.exit`` return the exit code,68- rather than calling ``sys.exit``. (`#533`_, `#667`_, `#1098`_)64+ rather than calling ``sys.exit``. :issue:`667`, :pr:`533, 1098`65 - ``click.getchar()`` returns Unicode in Python 3 on Windows,70- consistent with other platforms. (`#537`_, `#821`_, `#822`_,71- `#1088`_, `#1108`_)72-- Added ``FloatRange`` type. (`#538`_, `#553`_)66+ consistent with other platforms. :issue:`537, 821, 822, 1088`,67+ :pr:`1108`68+- Added ``FloatRange`` type. :pr:`538, 553`69 - Added support for bash completion of ``type=click.Choice`` for74- ``Options`` and ``Arguments``. (`#535`_, `#681`_)70+ ``Options`` and ``Arguments``. :issue:`535`, :pr:`681`71 - Only allow one positional arg for ``Argument`` parameter76- declaration. (`#568`_, `#574`_, `#1014`_)77-- Add ``case_sensitive=False`` as an option to Choice. (`#569`_)72+ declaration. :issue:`568, 574`, :pr:`1014`73+- Add ``case_sensitive=False`` as an option to Choice. :issue:`569`74 - ``click.getchar()`` correctly raises ``KeyboardInterrupt`` on "^C"79- and ``EOFError`` on "^D" on Linux. (`#583`_, `#1115`_)75+ and ``EOFError`` on "^D" on Linux. :issue:`583`, :pr:`1115`76 - Fix encoding issue with ``click.getchar(echo=True)`` on Linux.81- (`#1115`_)82-- ``param_hint`` in errors now derived from param itself. (`#598`_,83- `#704`_, `#709`_)77+ :pr:`1115`78+- ``param_hint`` in errors now derived from param itself.79+ :issue:`598, 704`, :pr:`709`80 - Add a test that ensures that when an argument is formatted into a85- usage error, its metavar is used, not its name. (`#612`_)81+ usage error, its metavar is used, not its name. :pr:`612`82 - Allow setting ``prog_name`` as extra in ``CliRunner.invoke``.87- (`#616`_, `#999`_)83+ :issue:`616`, :pr:`999`84 - Help text taken from docstrings truncates at the ``\f`` form feed85 character, useful for hiding Sphinx-style parameter documentation.90- (`#629`_, `#1091`_)91-- ``launch`` now works properly under Cygwin. (`#650`_)92-- Update progress after iteration. (`#651`_, `#706`_)86+ :pr:`629, 1091`87+- ``launch`` now works properly under Cygwin. :pr:`650`88+- Update progress after iteration. :issue:`651`, :pr:`706`89 - ``CliRunner.invoke`` now may receive ``args`` as a string94- representing a Unix shell command. (`#664`_)95-- Make ``Argument.make_metavar()`` default to type metavar. (`#675`_)96-- Add documentation for ``ignore_unknown_options``. (`#684`_)90+ representing a Unix shell command. :pr:`664`91+- Make ``Argument.make_metavar()`` default to type metavar. :pr:`675`92+- Add documentation for ``ignore_unknown_options``. :pr:`684`93 - Add bright colors support for ``click.style`` and fix the reset98- option for parameters ``fg`` and ``bg``. (`#703`_, `#809`_)94+ option for parameters ``fg`` and ``bg``. :issue:`703`, :pr:`809`95 - Add ``show_envvar`` for showing environment variables in help.100- (`#710`_)96+ :pr:`710`97 - Avoid ``BrokenPipeError`` during interpreter shutdown when stdout or102- stderr is a closed pipe. (`#712`_, `#1106`_)103-- Document customizing option names. (`#725`_, `#1016`_)98+ stderr is a closed pipe. :issue:`712`, :pr:`1106`99+- Document customizing option names. :issue:`725`, :pr:`1016`100 - Disable ``sys._getframes()`` on Python interpreters that don't105- support it. (`#728`_)101+ support it. :pr:`728`102 - Fix bug in test runner when calling ``sys.exit`` with ``None``.107- (`#739`_)108-- Clarify documentation on command line options. (`#741`_, `#1003`_)109-- Fix crash on Windows console. (`#744`_)103+ :pr:`739`104+- Clarify documentation on command line options. :issue:`741`,105+ :pr:`1003`106+- Fix crash on Windows console. :issue:`744`107 - Fix bug that caused bash completion to give improper completions on111- chained commands. (`#754`_, `#774`_)108+ chained commands. :issue:`754`, :pr:`774`109 - Added support for dynamic bash completion from a user-supplied113- callback. (`#755`_)114-- Added support for bash completions containing spaces. (`#773`_)110+ callback. :pr:`755`111+- Added support for bash completions containing spaces. :pr:`773`112 - Allow autocompletion function to determine whether or not to return116- completions that start with the incomplete argument. (`#790`_,117- `#806`_)113+ completions that start with the incomplete argument. :issue:`790`,114+ :pr:`806`115 - Fix option naming routine to match documentation and be119- deterministic. (`#793`_, `#794`_)120-- Fix path validation bug. (`#795`_, `#1020`_)116+ deterministic. :issue:`793`, :pr:`794`117+- Fix path validation bug. :issue:`795`, :pr:`1020`118 - Add test and documentation for ``Option`` naming: functionality.122- (`#799`_)123-- Update doc to match arg name for ``path_type``. (`#801`_)124-- Raw strings added so correct escaping occurs. (`#807`_)125-- Fix 16k character limit of ``click.echo`` on Windows. (`#816`_,126- `#819`_)119+ :pr:`799`120+- Update doc to match arg name for ``path_type``. :pr:`801`121+- Raw strings added so correct escaping occurs. :pr:`807`122+- Fix 16k character limit of ``click.echo`` on Windows. :issue:`816`,123+ :pr:`819`124 - Overcome 64k character limit when writing to binary stream on128- Windows 7. (`#825`_, `#830`_)129-- Add bool conversion for "t" and "f". (`#842`_)125+ Windows 7. :issue:`825`, :pr:`830`126+- Add bool conversion for "t" and "f". :pr:`842`127 - ``NoSuchOption`` errors take ``ctx`` so that ``--help`` hint gets131- printed in error output. (`#860`_)128+ printed in error output. :pr:`860`129 - Fixed the behavior of Click error messages with regards to Unicode130 on 2.x and 3.x. Message is now always Unicode and the str and131 Unicode special methods work as you expect on that platform.135- (`#862`_)136-- Progress bar now uses stderr by default. (`#863`_)137-- Add support for auto-completion documentation. (`#866`_, `#869`_)138-- Allow ``CliRunner`` to separate stdout and stderr. (`#868`_)139-- Fix variable precedence. (`#873`_, `#874`_)140-- Fix invalid escape sequences. (`#877`_)141-- Fix ``ResourceWarning`` that occurs during some tests. (`#878`_)132+ :issue:`862`133+- Progress bar now uses stderr by default. :pr:`863`134+- Add support for auto-completion documentation. :issue:`866`,135+ :pr:`869`136+- Allow ``CliRunner`` to separate stdout and stderr. :pr:`868`137+- Fix variable precedence. :issue:`873`, :pr:`874`138+- Fix invalid escape sequences. :pr:`877`139+- Fix ``ResourceWarning`` that occurs during some tests. :pr:`878`140 - When detecting a misconfigured locale, don't fail if the ``locale``143- command fails. (`#880`_)141+ command fails. :pr:`880`142 - Add ``case_sensitive=False`` as an option to ``Choice`` types.145- (`#887`_)143+ :pr:`887`144 - Force stdout/stderr writable. This works around issues with badly147- patched standard streams like those from Jupyter. (`#918`_)148-- Fix completion of subcommand options after last argument (`#919`_,149- `#930`_)145+ patched standard streams like those from Jupyter. :pr:`918`146+- Fix completion of subcommand options after last argument147+ :issue:`919`, :pr:`930`148 - ``_AtomicFile`` now uses the ``realpath`` of the original filename151- so that changing the working directory does not affect it.152- (`#920`_)153-- Fix incorrect completions when defaults are present (`#925`_,154- `#930`_)149+ so that changing the working directory does not affect it. :pr:`920`150+- Fix incorrect completions when defaults are present :issue:`925`,151+ :pr:`930`152 - Add copy option attrs so that custom classes can be re-used.156- (`#926`_, `#994`_)153+ :issue:`926`, :pr:`994`154 - "x" and "a" file modes now use stdout when file is ``"-"``.158- (`#929`_)159-- Fix missing comma in ``__all__`` list. (`#935`_)160-- Clarify how parameters are named. (`#949`_, `#1009`_)161-- Stdout is now automatically set to non blocking. (`#954`_)162-- Do not set options twice. (`#962`_)163-- Move ``fcntl`` import. (`#965`_)164-- Fix Google App Engine ``ImportError``. (`#995`_)155+ :pr:`929`156+- Fix missing comma in ``__all__`` list. :pr:`935`157+- Clarify how parameters are named. :issue:`949`, :pr:`1009`158+- Stdout is now automatically set to non blocking. :pr:`954`159+- Do not set options twice. :pr:`962`160+- Move ``fcntl`` import. :pr:`965`161+- Fix Google App Engine ``ImportError``. :pr:`995`162 - Better handling of help text for dynamic default option values.166- (`#996`_)163+ :pr:`996`164 - Fix ``get_winter_size()`` so it correctly returns ``(0,0)``.168- (`#997`_)169-- Add test case checking for custom param type. (`#1001`_)170-- Allow short width to address cmd formatting. (`#1002`_)171-- Add details about Python version support. (`#1004`_)172-- Added deprecation flag to commands. (`#1005`_)173-- Fixed issues where ``fd`` was undefined. (`#1007`_)174-- Fix formatting for short help. (`#1008`_)165+ :pr:`997`166+- Add test case checking for custom param type. :pr:`1001`167+- Allow short width to address cmd formatting. :pr:`1002`168+- Add details about Python version support. :pr:`1004`169+- Added deprecation flag to commands. :pr:`1005`170+- Fixed issues where ``fd`` was undefined. :pr:`1007`171+- Fix formatting for short help. :pr:`1008`172 - Document how ``auto_envvar_prefix`` works with command groups.176- (`#1011`_)177-- Don't add newlines by default for progress bars. (`#1013`_)178-- Use Python sorting order for ZSH completions. (`#1047`_, `#1059`_)173+ :pr:`1011`174+- Don't add newlines by default for progress bars. :pr:`1013`175+- Use Python sorting order for ZSH completions. :issue:`1047`,176+ :pr:`1059`177 - Document that parameter names are converted to lowercase by default.180- (`#1055`_)178+ :pr:`1055`179 - Subcommands that are named by the function now automatically have180 the underscore replaced with a dash. If you register a function181 named ``my_command`` it becomes ``my-command`` in the command line182 interface.185-- Hide hidden commands and options from completion. (`#1058`_,186- `#1061`_)183+- Hide hidden commands and options from completion. :issue:`1058`,184+ :pr:`1061`185 - Fix absolute import blocking Click from being vendored into a188- project on Windows. (`#1068`_, `#1069`_)186+ project on Windows. :issue:`1068`, :pr:`1069`187 - Fix issue where a lowercase ``auto_envvar_prefix`` would not be190- converted to uppercase. (`#1105`_)188+ converted to uppercase. :pr:`1105`189 192-.. _#202: https://github.com/pallets/click/issues/202193-.. _#323: https://github.com/pallets/click/issues/323194-.. _#334: https://github.com/pallets/click/issues/334195-.. _#393: https://github.com/pallets/click/issues/393196-.. _#409: https://github.com/pallets/click/issues/409197-.. _#414: https://github.com/pallets/click/pull/414198-.. _#423: https://github.com/pallets/click/pull/423199-.. _#424: https://github.com/pallets/click/pull/424200-.. _#447: https://github.com/pallets/click/issues/447201-.. _#487: https://github.com/pallets/click/pull/487202-.. _#500: https://github.com/pallets/click/pull/500203-.. _#514: https://github.com/pallets/click/issues/514204-.. _#533: https://github.com/pallets/click/pull/533205-.. _#535: https://github.com/pallets/click/issues/535206-.. _#537: https://github.com/pallets/click/issues/537207-.. _#538: https://github.com/pallets/click/pull/538208-.. _#553: https://github.com/pallets/click/pull/553209-.. _#557: https://github.com/pallets/click/pull/557210-.. _#568: https://github.com/pallets/click/issues/568211-.. _#569: https://github.com/pallets/click/issues/569212-.. _#574: https://github.com/pallets/click/issues/574213-.. _#583: https://github.com/pallets/click/issues/583214-.. _#598: https://github.com/pallets/click/issues/598215-.. _#612: https://github.com/pallets/click/pull/612216-.. _#616: https://github.com/pallets/click/issues/616217-.. _#629: https://github.com/pallets/click/pull/629218-.. _#650: https://github.com/pallets/click/pull/650219-.. _#651: https://github.com/pallets/click/issues/651220-.. _#664: https://github.com/pallets/click/pull/664221-.. _#667: https://github.com/pallets/click/issues/667222-.. _#675: https://github.com/pallets/click/pull/675223-.. _#681: https://github.com/pallets/click/pull/681224-.. _#684: https://github.com/pallets/click/pull/684225-.. _#703: https://github.com/pallets/click/issues/703226-.. _#704: https://github.com/pallets/click/issues/704227-.. _#706: https://github.com/pallets/click/pull/706228-.. _#709: https://github.com/pallets/click/pull/709229-.. _#710: https://github.com/pallets/click/pull/710230-.. _#712: https://github.com/pallets/click/pull/712231-.. _#719: https://github.com/pallets/click/issues/719232-.. _#725: https://github.com/pallets/click/issues/725233-.. _#728: https://github.com/pallets/click/pull/728234-.. _#739: https://github.com/pallets/click/pull/739235-.. _#741: https://github.com/pallets/click/issues/741236-.. _#744: https://github.com/pallets/click/issues/744237-.. _#754: https://github.com/pallets/click/issues/754238-.. _#755: https://github.com/pallets/click/pull/755239-.. _#773: https://github.com/pallets/click/pull/773240-.. _#774: https://github.com/pallets/click/pull/774241-.. _#790: https://github.com/pallets/click/issues/790242-.. _#793: https://github.com/pallets/click/issues/793243-.. _#794: https://github.com/pallets/click/pull/794244-.. _#795: https://github.com/pallets/click/issues/795245-.. _#799: https://github.com/pallets/click/pull/799246-.. _#801: https://github.com/pallets/click/pull/801247-.. _#806: https://github.com/pallets/click/pull/806248-.. _#807: https://github.com/pallets/click/pull/807249-.. _#809: https://github.com/pallets/click/pull/809250-.. _#816: https://github.com/pallets/click/pull/816251-.. _#819: https://github.com/pallets/click/pull/819252-.. _#821: https://github.com/pallets/click/issues/821253-.. _#822: https://github.com/pallets/click/issues/822254-.. _#825: https://github.com/pallets/click/issues/825255-.. _#830: https://github.com/pallets/click/pull/830256-.. _#842: https://github.com/pallets/click/pull/842257-.. _#860: https://github.com/pallets/click/issues/860258-.. _#862: https://github.com/pallets/click/issues/862259-.. _#863: https://github.com/pallets/click/pull/863260-.. _#865: https://github.com/pallets/click/pull/865261-.. _#866: https://github.com/pallets/click/issues/866262-.. _#868: https://github.com/pallets/click/pull/868263-.. _#869: https://github.com/pallets/click/pull/869264-.. _#873: https://github.com/pallets/click/issues/873265-.. _#874: https://github.com/pallets/click/pull/874266-.. _#877: https://github.com/pallets/click/pull/877267-.. _#878: https://github.com/pallets/click/pull/878268-.. _#880: https://github.com/pallets/click/pull/880269-.. _#883: https://github.com/pallets/click/pull/883270-.. _#887: https://github.com/pallets/click/pull/887271-.. _#889: https://github.com/pallets/click/pull/889272-.. _#918: https://github.com/pallets/click/pull/918273-.. _#919: https://github.com/pallets/click/issues/919274-.. _#920: https://github.com/pallets/click/pull/920275-.. _#925: https://github.com/pallets/click/issues/925276-.. _#926: https://github.com/pallets/click/issues/926277-.. _#929: https://github.com/pallets/click/pull/929278-.. _#930: https://github.com/pallets/click/pull/930279-.. _#935: https://github.com/pallets/click/pull/935280-.. _#949: https://github.com/pallets/click/issues/949281-.. _#954: https://github.com/pallets/click/pull/954282-.. _#962: https://github.com/pallets/click/pull/962283-.. _#965: https://github.com/pallets/click/pull/965284-.. _#967: https://github.com/pallets/click/pull/967285-.. _#976: https://github.com/pallets/click/pull/976286-.. _#990: https://github.com/pallets/click/pull/990287-.. _#991: https://github.com/pallets/click/pull/991288-.. _#993: https://github.com/pallets/click/pull/993289-.. _#994: https://github.com/pallets/click/pull/994290-.. _#995: https://github.com/pallets/click/pull/995291-.. _#996: https://github.com/pallets/click/pull/996292-.. _#997: https://github.com/pallets/click/pull/997293-.. _#999: https://github.com/pallets/click/pull/999294-.. _#1000: https://github.com/pallets/click/pull/1000295-.. _#1001: https://github.com/pallets/click/pull/1001296-.. _#1002: https://github.com/pallets/click/pull/1002297-.. _#1003: https://github.com/pallets/click/pull/1003298-.. _#1004: https://github.com/pallets/click/pull/1004299-.. _#1005: https://github.com/pallets/click/pull/1005300-.. _#1007: https://github.com/pallets/click/pull/1007301-.. _#1008: https://github.com/pallets/click/pull/1008302-.. _#1009: https://github.com/pallets/click/pull/1009303-.. _#1010: https://github.com/pallets/click/pull/1010304-.. _#1011: https://github.com/pallets/click/pull/1011305-.. _#1012: https://github.com/pallets/click/pull/1012306-.. _#1013: https://github.com/pallets/click/pull/1013307-.. _#1014: https://github.com/pallets/click/pull/1014308-.. _#1016: https://github.com/pallets/click/pull/1016309-.. _#1020: https://github.com/pallets/click/pull/1020310-.. _#1022: https://github.com/pallets/click/pull/1022311-.. _#1027: https://github.com/pallets/click/pull/1027312-.. _#1047: https://github.com/pallets/click/pull/1047313-.. _#1055: https://github.com/pallets/click/pull/1055314-.. _#1058: https://github.com/pallets/click/pull/1058315-.. _#1059: https://github.com/pallets/click/pull/1059316-.. _#1061: https://github.com/pallets/click/pull/1061317-.. _#1068: https://github.com/pallets/click/issues/1068318-.. _#1069: https://github.com/pallets/click/pull/1069319-.. _#1088: https://github.com/pallets/click/issues/1088320-.. _#1091: https://github.com/pallets/click/pull/1091321-.. _#1098: https://github.com/pallets/click/pull/1098322-.. _#1105: https://github.com/pallets/click/pull/1105323-.. _#1106: https://github.com/pallets/click/pull/1106324-.. _#1108: https://github.com/pallets/click/pull/1108325-.. _#1115: https://github.com/pallets/click/pull/1115190 327-191 Version 6.7192 -----------193 331-(bugfix release; released on January 6th 2017)194+Released 2017-01-06195 333-- Make ``click.progressbar`` work with ``codecs.open`` files. See #637.334-- Fix bug in bash completion with nested subcommands. See #639.335-- Fix test runner not saving caller env correctly. See #644.336-- Fix handling of SIGPIPE. See #626337-- Deal with broken Windows environments such as Google App Engine's. See #711.196+- Make ``click.progressbar`` work with ``codecs.open`` files.197+ :pr:`637`198+- Fix bug in bash completion with nested subcommands. :pr:`639`199+- Fix test runner not saving caller env correctly. :pr:`644`200+- Fix handling of SIGPIPE. :pr:`62`201+- Deal with broken Windows environments such as Google App Engine's.202+ :issue:`711`203 204+205 Version 6.6206 -----------207 342-(bugfix release; released on April 4th 2016)208+Released 2016-04-04209 344-- Fix bug in ``click.Path`` where it would crash when passed a ``-``. See #551.210+- Fix bug in ``click.Path`` where it would crash when passed a ``-``.211+ :issue:`551`212 213+214 Version 6.4215 -----------216 349-(bugfix release; released on March 24th 2016)217+Released 2016-03-24218 351-- Fix bug in bash completion where click would discard one or more trailing352- arguments. See #471.219+- Fix bug in bash completion where click would discard one or more220+ trailing arguments. :issue:`471`221 222+223 Version 6.3224 -----------225 357-(bugfix release; released on February 22 2016)226+Released 2016-02-22227 359-- Fix argument checks for interpreter invoke with ``-m`` and ``-c``360- on Windows.361-- Fixed a bug that cased locale detection to error out on Python 3.228+- Fix argument checks for interpreter invoke with ``-m`` and ``-c`` on229+ Windows.230+- Fixed a bug that cased locale detection to error out on Python 3.231 232+233 Version 6.2234 -----------235 366-(bugfix release, released on November 27th 2015)236+Released 2015-11-27237 368-- Correct fix for hidden progress bars.238+- Correct fix for hidden progress bars.239 240+241 Version 6.1242 -----------243 373-(bugfix release, released on November 27th 2015)244+Released 2015-11-27245 375-- Resolved an issue with invisible progress bars no longer rendering.376-- Disable chain commands with subcommands as they were inherently broken.377-- Fix ``MissingParameter`` not working without parameters passed.246+- Resolved an issue with invisible progress bars no longer rendering.247+- Disable chain commands with subcommands as they were inherently248+ broken.249+- Fix ``MissingParameter`` not working without parameters passed.250 251+252 Version 6.0253 -----------254 382-(codename "pow pow", released on November 24th 2015)255+Released 2015-11-24, codename "pow pow"256 384-- Optimized the progressbar rendering to not render when it did not385- actually change.386-- Explicitly disallow ``nargs=-1`` with a set default.387-- The context is now closed before it's popped from the stack.388-- Added support for short aliases for the false flag on toggles.389-- Click will now attempt to aid you with debugging locale errors390- better by listing with the help of the OS what locales are391- available.392-- Click used to return byte strings on Python 2 in some unit-testing393- situations. This has been fixed to correctly return unicode strings394- now.395-- For Windows users on Python 2, Click will now handle Unicode more396- correctly handle Unicode coming in from the system. This also has397- the disappointing side effect that filenames will now be always398- unicode by default in the ``Path`` type which means that this can399- introduce small bugs for code not aware of this.400-- Added a ``type`` parameter to ``Path`` to force a specific string type401- on the value.402-- For users running Python on Windows the ``echo`` and ``prompt`` functions403- now work with full unicode functionality in the Python windows console404- by emulating an output stream. This also applies to getting the405- virtual output and input streams via ``click.get_text_stream(...)``.406-- Unittests now always force a certain virtual terminal width.407-- Added support for allowing dashes to indicate standard streams to the408- ``Path`` type.409-- Multi commands in chain mode no longer propagate arguments left over410- from parsing to the callbacks. It's also now disallowed through an411- exception when optional arguments are attached to multi commands if chain412- mode is enabled.413-- Relaxed restriction that disallowed chained commands to have other414- chained commands as child commands.415-- Arguments with positive nargs can now have defaults implemented.416- Previously this configuration would often result in slightly unexpected417- values be returned.257+- Optimized the progressbar rendering to not render when it did not258+ actually change.259+- Explicitly disallow ``nargs=-1`` with a set default.260+- The context is now closed before it's popped from the stack.261+- Added support for short aliases for the false flag on toggles.262+- Click will now attempt to aid you with debugging locale errors263+ better by listing with the help of the OS what locales are264+ available.265+- Click used to return byte strings on Python 2 in some unit-testing266+ situations. This has been fixed to correctly return unicode strings267+ now.268+- For Windows users on Python 2, Click will now handle Unicode more269+ correctly handle Unicode coming in from the system. This also has270+ the disappointing side effect that filenames will now be always271+ unicode by default in the ``Path`` type which means that this can272+ introduce small bugs for code not aware of this.273+- Added a ``type`` parameter to ``Path`` to force a specific string274+ type on the value.275+- For users running Python on Windows the ``echo`` and ``prompt``276+ functions now work with full unicode functionality in the Python277+ windows console by emulating an output stream. This also applies to278+ getting the virtual output and input streams via279+ ``click.get_text_stream(...)``.280+- Unittests now always force a certain virtual terminal width.281+- Added support for allowing dashes to indicate standard streams to282+ the ``Path`` type.283+- Multi commands in chain mode no longer propagate arguments left over284+ from parsing to the callbacks. It's also now disallowed through an285+ exception when optional arguments are attached to multi commands if286+ chain mode is enabled.287+- Relaxed restriction that disallowed chained commands to have other288+ chained commands as child commands.289+- Arguments with positive nargs can now have defaults implemented.290+ Previously this configuration would often result in slightly291+ unexpected values be returned.292 293+294 Version 5.1295 -----------296 422-(bugfix release, released on 17th August 2015)297+Released 2015-08-17298 424-- Fix a bug in ``pass_obj`` that would accidentally pass the context too.299+- Fix a bug in ``pass_obj`` that would accidentally pass the context300+ too.301 302+303 Version 5.0304 -----------305 429-(codename "tok tok", released on 16th August 2015)306+Released 2015-08-16, codename "tok tok"307 431-- Removed various deprecated functionality.432-- Atomic files now only accept the ``w`` mode.433-- Change the usage part of help output for very long commands to wrap434- their arguments onto the next line, indented by 4 spaces.435-- Fix a bug where return code and error messages were incorrect when436- using ``CliRunner``.437-- added ``get_current_context``.438-- added a ``meta`` dictionary to the context which is shared across the439- linked list of contexts to allow click utilities to place state there.440-- introduced ``Context.scope``.441-- The ``echo`` function is now threadsafe: It calls the ``write`` method of the442- underlying object only once.443-- ``prompt(hide_input=True)`` now prints a newline on ``^C``.444-- Click will now warn if users are using ``unicode_literals``.445-- Click will now ignore the ``PAGER`` environment variable if it is empty or446- contains only whitespace.447-- The ``click-contrib`` GitHub organization was created.308+- Removed various deprecated functionality.309+- Atomic files now only accept the ``w`` mode.310+- Change the usage part of help output for very long commands to wrap311+ their arguments onto the next line, indented by 4 spaces.312+- Fix a bug where return code and error messages were incorrect when313+ using ``CliRunner``.314+- Added ``get_current_context``.315+- Added a ``meta`` dictionary to the context which is shared across316+ the linked list of contexts to allow click utilities to place state317+ there.318+- Introduced ``Context.scope``.319+- The ``echo`` function is now threadsafe: It calls the ``write``320+ method of the underlying object only once.321+- ``prompt(hide_input=True)`` now prints a newline on ``^C``.322+- Click will now warn if users are using ``unicode_literals``.323+- Click will now ignore the ``PAGER`` environment variable if it is324+ empty or contains only whitespace.325+- The ``click-contrib`` GitHub organization was created.326 327+328 Version 4.1329 -----------330 452-(bugfix release, released on July 14th 2015)331+Released 2015-07-14332 333+- Fix a bug where error messages would include a trailing ``None``334+ string.454-- Fix a bug where error messages would include a trailing ``None`` string.455-- Fix a bug where Click would crash on docstrings with trailing newlines.456-- Support streams with encoding set to ``None`` on Python 3 by barfing with457- a better error.458-- Handle ^C in less-pager properly.459-- Handle return value of ``None`` from ``sys.getfilesystemencoding``460-- Fix crash when writing to unicode files with ``click.echo``.461-- Fix type inference with multiple options.335+- Fix a bug where Click would crash on docstrings with trailing336+ newlines.337+- Support streams with encoding set to ``None`` on Python 3 by barfing338+ with a better error.339+- Handle ^C in less-pager properly.340+- Handle return value of ``None`` from ``sys.getfilesystemencoding``341+- Fix crash when writing to unicode files with ``click.echo``.342+- Fix type inference with multiple options.343 344+345 Version 4.0346 -----------347 466-(codename "zoom zoom", released on March 31st 2015)348+Released 2015-03-31, codename "zoom zoom"349 468-- Added ``color`` parameters to lots of interfaces that directly or indirectly469- call into echoing. This previously was always autodetection (with the470- exception of the ``echo_via_pager`` function). Now you can forcefully471- enable or disable it, overriding the auto detection of Click.472-- Added an ``UNPROCESSED`` type which does not perform any type changes which473- simplifies text handling on 2.x / 3.x in some special advanced usecases.474-- Added ``NoSuchOption`` and ``BadOptionUsage`` exceptions for more generic475- handling of errors.476-- Added support for handling of unprocessed options which can be useful in477- situations where arguments are forwarded to underlying tools.478-- Added ``max_content_width`` parameter to the context which can be used to479- change the maximum width of help output. By default Click will not format480- content for more than 80 characters width.481-- Added support for writing prompts to stderr.482-- Fix a bug when showing the default for multiple arguments.483-- Added support for custom subclasses to ``option`` and ``argument``.484-- Fix bug in ``clear()`` on Windows when colorama is installed.485-- Reject ``nargs=-1`` for options properly. Options cannot be variadic.486-- Fixed an issue with bash completion not working properly for commands with487- non ASCII characters or dashes.488-- Added a way to manually update the progressbar.489-- Changed the formatting of missing arguments. Previously the internal490- argument name was shown in error messages, now the metavar is shown if491- passed. In case an automated metavar is selected, it's stripped of492- extra formatting first.350+- Added ``color`` parameters to lots of interfaces that directly or351+ indirectly call into echoing. This previously was always352+ autodetection (with the exception of the ``echo_via_pager``353+ function). Now you can forcefully enable or disable it, overriding354+ the auto detection of Click.355+- Added an ``UNPROCESSED`` type which does not perform any type356+ changes which simplifies text handling on 2.x / 3.x in some special357+ advanced usecases.358+- Added ``NoSuchOption`` and ``BadOptionUsage`` exceptions for more359+ generic handling of errors.360+- Added support for handling of unprocessed options which can be361+ useful in situations where arguments are forwarded to underlying362+ tools.363+- Added ``max_content_width`` parameter to the context which can be364+ used to change the maximum width of help output. By default Click365+ will not format content for more than 80 characters width.366+- Added support for writing prompts to stderr.367+- Fix a bug when showing the default for multiple arguments.368+- Added support for custom subclasses to ``option`` and ``argument``.369+- Fix bug in ``clear()`` on Windows when colorama is installed.370+- Reject ``nargs=-1`` for options properly. Options cannot be371+ variadic.372+- Fixed an issue with bash completion not working properly for373+ commands with non ASCII characters or dashes.374+- Added a way to manually update the progressbar.375+- Changed the formatting of missing arguments. Previously the internal376+ argument name was shown in error messages, now the metavar is shown377+ if passed. In case an automated metavar is selected, it's stripped378+ of extra formatting first.379 380+381 Version 3.3382 -----------383 497-(bugfix release, released on September 8th 2014)384+Released 2014-09-08385 499-- Fixed an issue with error reporting on Python 3 for invalid forwarding500- of commands.386+- Fixed an issue with error reporting on Python 3 for invalid387+ forwarding of commands.388 389+390 Version 3.2391 -----------392 505-(bugfix release, released on August 22nd 2014)393+Released 2014-08-22394 507-- Added missing ``err`` parameter forwarding to the ``secho`` function.508-- Fixed default parameters not being handled properly by the context509- invoke method. This is a backwards incompatible change if the function510- was used improperly. See :ref:`upgrade-to-3.2` for more information.511-- Removed the `invoked_subcommands` attribute largely. It is not possible512- to provide it to work error free due to how the parsing works so this513- API has been deprecated. See :ref:`upgrade-to-3.2` for more information.514-- Restored the functionality of `invoked_subcommand` which was broken as515- a regression in 3.1.395+- Added missing ``err`` parameter forwarding to the ``secho``396+ function.397+- Fixed default parameters not being handled properly by the context398+ invoke method. This is a backwards incompatible change if the399+ function was used improperly. See :ref:`upgrade-to-3.2` for more400+ information.401+- Removed the ``invoked_subcommands`` attribute largely. It is not402+ possible to provide it to work error free due to how the parsing403+ works so this API has been deprecated. See :ref:`upgrade-to-3.2` for404+ more information.405+- Restored the functionality of ``invoked_subcommand`` which was406+ broken as a regression in 3.1.407 408+409 Version 3.1410 -----------411 520-(bugfix release, released on August 13th 2014)412+Released 2014-08-13413 522-- Fixed a regression that caused contexts of subcommands to be523- created before the parent command was invoked which was a524- regression from earlier Click versions.414+- Fixed a regression that caused contexts of subcommands to be created415+ before the parent command was invoked which was a regression from416+ earlier Click versions.417 418+419 Version 3.0420 -----------421 529-(codename "clonk clonk", released on August 12th 2014)422+Released 2014-08-12, codename "clonk clonk"423 531-- formatter now no longer attempts to accommodate for terminals532- smaller than 50 characters. If that happens it just assumes533- a minimal width.534-- added a way to not swallow exceptions in the test system.535-- added better support for colors with pagers and ways to536- override the autodetection.537-- the CLI runner's result object now has a traceback attached.538-- improved automatic short help detection to work better with539- dots that do not terminate sentences.540-- when defining options without actual valid option strings541- now, Click will give an error message instead of silently542- passing. This should catch situations where users wanted to543- created arguments instead of options.544-- Restructured Click internally to support vendoring.545-- Added support for multi command chaining.546-- Added support for defaults on options with ``multiple`` and547- options and arguments with ``nargs != 1``.548-- label passed to ``progressbar`` is no longer rendered with549- whitespace stripped.550-- added a way to disable the standalone mode of the ``main``551- method on a Click command to be able to handle errors better.552-- added support for returning values from command callbacks.553-- added simplifications for printing to stderr from ``echo``.554-- added result callbacks for groups.555-- entering a context multiple times defers the cleanup until556- the last exit occurs.557-- added ``open_file``.424+- Formatter now no longer attempts to accommodate for terminals425+ smaller than 50 characters. If that happens it just assumes a426+ minimal width.427+- Added a way to not swallow exceptions in the test system.428+- Added better support for colors with pagers and ways to override the429+ autodetection.430+- The CLI runner's result object now has a traceback attached.431+- Improved automatic short help detection to work better with dots432+ that do not terminate sentences.433+- When defining options without actual valid option strings now,434+ Click will give an error message instead of silently passing. This435+ should catch situations where users wanted to created arguments436+ instead of options.437+- Restructured Click internally to support vendoring.438+- Added support for multi command chaining.439+- Added support for defaults on options with ``multiple`` and options440+ and arguments with ``nargs != 1``.441+- Label passed to ``progressbar`` is no longer rendered with442+ whitespace stripped.443+- Added a way to disable the standalone mode of the ``main`` method on444+ a Click command to be able to handle errors better.445+- Added support for returning values from command callbacks.446+- Added simplifications for printing to stderr from ``echo``.447+- Added result callbacks for groups.448+- Entering a context multiple times defers the cleanup until the last449+ exit occurs.450+- Added ``open_file``.451 452+453 Version 2.6454 -----------455 562-(bugfix release, released on August 11th 2014)456+Released 2014-08-11457 564-- Fixed an issue where the wrapped streams on Python 3 would be reporting565- incorrect values for seekable.458+- Fixed an issue where the wrapped streams on Python 3 would be459+ reporting incorrect values for seekable.460 461+462 Version 2.5463 -----------464 570-(bugfix release, released on July 28th 2014)465+Released 2014-07-28466 572-- Fixed a bug with text wrapping on Python 3.467+- Fixed a bug with text wrapping on Python 3.468 469+470 Version 2.4471 -----------472 577-(bugfix release, released on July 4th 2014)473+Released 2014-07-04474 579-- Corrected a bug in the change of the help option in 2.3.475+- Corrected a bug in the change of the help option in 2.3.476 477+478 Version 2.3479 -----------480 584-(bugfix release, released on July 3rd 2014)481+Released 2014-07-03482 586-- Fixed an incorrectly formatted help record for count options.587-- Add support for ansi code stripping on Windows if colorama588- is not available.589-- restored the Click 1.0 handling of the help parameter for certain590- edge cases.483+- Fixed an incorrectly formatted help record for count options.484+- Add support for ansi code stripping on Windows if colorama is not485+ available.486+- Restored the Click 1.0 handling of the help parameter for certain487+ edge cases.488 489+490 Version 2.2491 -----------492 595-(bugfix release, released on June 26th 2014)493+Released 2014-06-26494 597-- fixed tty detection on PyPy.598-- fixed an issue that progress bars were not rendered when the599- context manager was entered.495+- Fixed tty detection on PyPy.496+- Fixed an issue that progress bars were not rendered when the context497+ manager was entered.498 499+500 Version 2.1501 -----------502 604-(bugfix release, released on June 14th 2014)503+Released 2014-06-14504 606-- fixed the :func:`launch` function on windows.607-- improved the colorama support on windows to try hard to not608- screw up the console if the application is interrupted.609-- fixed windows terminals incorrectly being reported to be 80610- characters wide instead of 79611-- use colorama win32 bindings if available to get the correct612- dimensions of a windows terminal.613-- fixed an issue with custom function types on Python 3.614-- fixed an issue with unknown options being incorrectly reported615- in error messages.505+- Fixed the :func:`launch` function on windows.506+- Improved the colorama support on windows to try hard to not screw up507+ the console if the application is interrupted.508+- Fixed windows terminals incorrectly being reported to be 80509+ characters wide instead of 79510+- Use colorama win32 bindings if available to get the correct511+ dimensions of a windows terminal.512+- Fixed an issue with custom function types on Python 3.513+- Fixed an issue with unknown options being incorrectly reported in514+ error messages.515 516+517 Version 2.0518 -----------519 620-(codename "tap tap tap", released on June 6th 2014)520+Released 2014-06-06, codename "tap tap tap"521 622-- added support for opening stdin/stdout on Windows in623- binary mode correctly.624-- added support for atomic writes to files by going through625- a temporary file.626-- introduced :exc:`BadParameter` which can be used to easily perform627- custom validation with the same error messages as in the type system.628-- added :func:`progressbar`; a function to show progress bars.629-- added :func:`get_app_dir`; a function to calculate the home folder630- for configs.631-- Added transparent handling for ANSI codes into the :func:`echo`632- function through ``colorama``.633-- Added :func:`clear` function.634-- Breaking change: parameter callbacks now get the parameter object635- passed as second argument. There is legacy support for old callbacks636- which will warn but still execute the script.637-- Added :func:`style`, :func:`unstyle` and :func:`secho` for ANSI638- styles.639-- Added an :func:`edit` function that invokes the default editor.640-- Added an :func:`launch` function that launches browsers and applications.641-- nargs of -1 for arguments can now be forced to be a single item through642- the required flag. It defaults to not required.643-- setting a default for arguments now implicitly makes it non required.644-- changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts.645-- added basic support for bash completion.646-- added :func:`getchar` to fetch a single character from the terminal.647-- errors now go to stderr as intended.648-- fixed various issues with more exotic parameter formats like DOS/Windows649- style arguments.650-- added :func:`pause` which works similar to the Windows ``pause`` cmd651- built-in but becomes an automatic noop if the application is not run652- through a terminal.653-- added a bit of extra information about missing choice parameters.654-- changed how the help function is implemented to allow global overriding655- of the help option.656-- added support for token normalization to implement case insensitive handling.657-- added support for providing defaults for context settings.522+- Added support for opening stdin/stdout on Windows in binary mode523+ correctly.524+- Added support for atomic writes to files by going through a525+ temporary file.526+- Introduced :exc:`BadParameter` which can be used to easily perform527+ custom validation with the same error messages as in the type528+ system.529+- Added :func:`progressbar`; a function to show progress bars.530+- Added :func:`get_app_dir`; a function to calculate the home folder531+ for configs.532+- Added transparent handling for ANSI codes into the :func:`echo`533+ function through ``colorama``.534+- Added :func:`clear` function.535+- Breaking change: parameter callbacks now get the parameter object536+ passed as second argument. There is legacy support for old callbacks537+ which will warn but still execute the script.538+- Added :func:`style`, :func:`unstyle` and :func:`secho` for ANSI539+ styles.540+- Added an :func:`edit` function that invokes the default editor.541+- Added an :func:`launch` function that launches browsers and542+ applications.543+- Nargs of -1 for arguments can now be forced to be a single item544+ through the required flag. It defaults to not required.545+- Setting a default for arguments now implicitly makes it non546+ required.547+- Changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts.548+- Added basic support for bash completion.549+- Added :func:`getchar` to fetch a single character from the terminal.550+- Errors now go to stderr as intended.551+- Fixed various issues with more exotic parameter formats like552+ DOS/Windows style arguments.553+- Added :func:`pause` which works similar to the Windows ``pause`` cmd554+ built-in but becomes an automatic noop if the application is not run555+ through a terminal.556+- Added a bit of extra information about missing choice parameters.557+- Changed how the help function is implemented to allow global558+ overriding of the help option.559+- Added support for token normalization to implement case insensitive560+ handling.561+- Added support for providing defaults for context settings.562 563+564 Version 1.1565 -----------566 662-(bugfix release, released on May 23rd 2014)567+Released 2014-05-23568 664-- fixed a bug that caused text files in Python 2 to not accept665- native strings.569+- Fixed a bug that caused text files in Python 2 to not accept native570+ strings.571 572+573 Version 1.0574 -----------575 670-(no codename, released on May 21st 2014)576+Released 2014-05-21577 672-- Initial release.578+- Initial release.