CHANGES
This file
Path
CHANGES
252 lines · 9.3 KiB
Last changed by
Add documentation for click-contribMarkus Unterwaditzerbefore adoptionf682a43
History of this fileTake it
1Click Changelog2===============34This contains all major version changes between Click releases.56Version 5.07-----------89(codename to be decided, release date to be determined)1011- Removed various deprecated functionality.12- Atomic files now only accept the `w` mode.13- Change the usage part of help output for very long commands to wrap14 their arguments onto the next line, indented by 4 spaces.15- Fix a bug where return code and error messages were incorrect when16 using ``CliRunner``.17- added `get_current_context`.18- added a `meta` dictionary to the context which is shared across the19 linked list of contexts to allow click utilities to place state there.20- introduced `Context.scope`.21- The `echo` function is now threadsafe: It calls the `write` method of the22 underlying object only once.23- `prompt(hide_input=True)` now prints a newline on `^C`.24- Click will now warn if users are using ``unicode_literals``.25- Click will now ignore the ``PAGER`` environment variable if it is empty or26 contains only whitespace.27- The `click-contrib` GitHub organization was created.2829Version 4.130-----------3132(bugfix release, released on July 14th 2015)3334- Fix a bug where error messages would include a trailing `None` string.35- Fix a bug where Click would crash on docstrings with trailing newlines.36- Support streams with encoding set to `None` on Python 3 by barfing with37 a better error.38- Handle ^C in less-pager properly.39- Handle return value of `None` from `sys.getfilesystemencoding`40- Fix crash when writing to unicode files with `click.echo`.41- Fix type inference with multiple options.4243Version 4.044-----------4546(codename "zoom zoom", released on March 31st 2015)4748- Added `color` parameters to lots of interfaces that directly or indirectly49 call into echoing. This previously was always autodetection (with the50 exception of the `echo_via_pager` function). Now you can forcefully51 enable or disable it, overriding the auto detection of Click.52- Added an `UNPROCESSED` type which does not perform any type changes which53 simplifies text handling on 2.x / 3.x in some special advanced usecases.54- Added `NoSuchOption` and `BadOptionUsage` exceptions for more generic55 handling of errors.56- Added support for handling of unprocessed options which can be useful in57 situations where arguments are forwarded to underlying tools.58- Added `max_content_width` parameter to the context which can be used to59 change the maximum width of help output. By default Click will not format60 content for more than 80 characters width.61- Added support for writing prompts to stderr.62- Fix a bug when showing the default for multiple arguments.63- Added support for custom subclasses to `option` and `argument`.64- Fix bug in ``clear()`` on Windows when colorama is installed.65- Reject ``nargs=-1`` for options properly. Options cannot be variadic.66- Fixed an issue with bash completion not working properly for commands with67 non ASCII characters or dashes.68- Added a way to manually update the progressbar.69- Changed the formatting of missing arguments. Previously the internal70 argument name was shown in error messages, now the metavar is shown if71 passed. In case an automated metavar is selected, it's stripped of72 extra formatting first.7374Version 3.375-----------7677(bugfix release, released on September 8th 2014)7879- Fixed an issue with error reporting on Python 3 for invalid forwarding80 of commands.8182Version 3.283-----------8485(bugfix release, released on August 22nd 2014)8687- Added missing `err` parameter forwarding to the `secho` function.88- Fixed default parameters not being handled properly by the context89 invoke method. This is a backwards incompatible change if the function90 was used improperly. See :ref:`upgrade-to-3.2` for more information.91- Removed the `invoked_subcommands` attribute largely. It is not possible92 to provide it to work error free due to how the parsing works so this93 API has been deprecated. See :ref:`upgrade-to-3.2` for more information.94- Restored the functionality of `invoked_subcommand` which was broken as95 a regression in 3.1.9697Version 3.198-----------99100(bugfix release, released on August 13th 2014)101102- Fixed a regression that caused contexts of subcommands to be103 created before the parent command was invoked which was a104 regression from earlier Click versions.105106Version 3.0107-----------108109(codename "clonk clonk", released on August 12th 2014)110111- formatter now no longer attempts to accomodate for terminals112 smaller than 50 characters. If that happens it just assumes113 a minimal width.114- added a way to not swallow exceptions in the test system.115- added better support for colors with pagers and ways to116 override the autodetection.117- the CLI runner's result object now has a traceback attached.118- improved automatic short help detection to work better with119 dots that do not terminate sentences.120- when definining options without actual valid option strings121 now, Click will give an error message instead of silently122 passing. This should catch situations where users wanted to123 created arguments instead of options.124- Restructured Click internally to support vendoring.125- Added support for multi command chaining.126- Added support for defaults on options with `multiple` and127 options and arguments with `nargs != 1`.128- label passed to `progressbar` is no longer rendered with129 whitespace stripped.130- added a way to disable the standalone mode of the `main`131 method on a Click command to be able to handle errors better.132- added support for returning values from command callbacks.133- added simplifications for printing to stderr from `echo`.134- added result callbacks for groups.135- entering a context multiple times defers the cleanup until136 the last exit occurs.137- added `open_file`.138139Version 2.6140-----------141142(bugfix release, released on August 11th 2014)143144- Fixed an issue where the wrapped streams on Python 3 would be reporting145 incorrect values for seekable.146147Version 2.5148-----------149150(bugfix release, released on July 28th 2014)151152- Fixed a bug with text wrapping on Python 3.153154Version 2.4155-----------156157(bugfix release, released on July 4th 2014)158159- Corrected a bug in the change of the help option in 2.3.160161Version 2.3162-----------163164(bugfix release, released on July 3rd 2014)165166- Fixed an incorrectly formatted help record for count options.'167- Add support for ansi code stripping on Windows if colorama168 is not available.169- restored the Click 1.0 handling of the help parameter for certain170 edge cases.171172Version 2.2173-----------174175(bugfix release, released on June 26th 2014)176177- fixed tty detection on PyPy.178- fixed an issue that progress bars were not rendered when the179 context manager was entered.180181Version 2.1182-----------183184(bugfix release, released on June 14th 2014)185186- fixed the :func:`launch` function on windows.187- improved the colorama support on windows to try hard to not188 screw up the console if the application is interrupted.189- fixed windows terminals incorrectly being reported to be 80190 characters wide instead of 79191- use colorama win32 bindings if available to get the correct192 dimensions of a windows terminal.193- fixed an issue with custom function types on Python 3.194- fixed an issue with unknown options being incorrectly reported195 in error messages.196197Version 2.0198-----------199200(codename "tap tap tap", released on June 6th 2014)201202- added support for opening stdin/stdout on Windows in203 binary mode correctly.204- added support for atomic writes to files by going through205 a temporary file.206- introduced :exc:`BadParameter` which can be used to easily perform207 custom validation with the same error messages as in the type system.208- added :func:`progressbar`; a function to show progress bars.209- added :func:`get_app_dir`; a function to calculate the home folder210 for configs.211- Added transparent handling for ANSI codes into the :func:`echo`212 function through `colorama`.213- Added :func:`clear` function.214- Breaking change: parameter callbacks now get the parameter object215 passed as second argument. There is legacy support for old callbacks216 which will warn but still execute the script.217- Added :func:`style`, :func:`unstyle` and :func:`secho` for ANSI218 styles.219- Added an :func:`edit` function that invokes the default editor.220- Added an :func:`launch` function that launches browsers and applications.221- nargs of -1 for arguments can now be forced to be a single item through222 the required flag. It defaults to not required.223- setting a default for arguments now implicitly makes it non required.224- changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts.225- added basic support for bash completion.226- added :func:`getchar` to fetch a single character from the terminal.227- errors now go to stderr as intended.228- fixed various issues with more exotic parameter formats like DOS/Windows229 style arguments.230- added :func:`pause` which works similar to the Windows ``pause`` cmd231 built-in but becomes an automatic noop if the application is not run232 through a terminal.233- added a bit of extra information about missing choice parameters.234- changed how the help function is implemented to allow global overriding235 of the help option.236- added support for token normalization to implement case insensitive handling.237- added support for providing defaults for context settings.238239Version 1.1240-----------241242(bugfix release, released on May 23rd 2014)243244- fixed a bug that caused text files in Python 2 to not accept245 native strings.246247Version 1.0248-----------249250(no codename, released on May 21st 2014)251252- Initial release.