CHANGES
This file
Path
CHANGES
385 lines · 14.1 KiB
Last changed by
Merge branch '6.x-maintenance'Markus Unterwaditzerbefore adoption945b4d3
History of this fileTake it
1Click Changelog2===============34This contains all major version changes between Click releases.56Version 7.07-----------89(upcoming release with new features, release date to be decided)10- Added support for bash completions containing spaces. See #773.11- Added support for dynamic bash completion from a user-supplied callback.12 See #755.13- Added support for bash completion of type=click.Choice for Options and14 Arguments. See #535.15- The user is now presented with the available choices if prompt=True and16 type=click.Choice in a click.option. The choices are listed within17 parenthesis like 'Choose fruit (apple, orange): '.18- The exception objects now store unicode properly.19- Added the ability to hide commands and options from help.20- Added Float Range in Types.21- `secho`'s first argument can now be `None`, like in `echo`.22- Usage errors now hint at the `--help` option.23- ``launch`` now works properly under Cygwin. See #650.24- `CliRunner.invoke` now may receive `args` as a string representing25 a Unix shell command. See #664.26- Fix bug that caused bashcompletion to give inproper completions on 27 chained commands. See #774.2829Version 6.830-----------3132(bugfix release; yet to be released)3334- Disabled sys._getframes() on Python interpreters that don't support it. See35 #728.36- Fix bug in test runner when calling ``sys.exit`` with ``None``. See #739.37- Fix crash on Windows console, see #744.38- Fix bashcompletion on chained commands. See #754.39- Fix option naming routine to match documentation. See #7934041Version 6.742-----------4344(bugfix release; released on January 6th 2017)4546- Make `click.progressbar` work with `codecs.open` files. See #637.47- Fix bug in bash completion with nested subcommands. See #639.48- Fix test runner not saving caller env correctly. See #644.49- Fix handling of SIGPIPE. See #62650- Deal with broken Windows environments such as Google App Engine's. See #711.5152Version 6.653-----------5455(bugfix release; released on April 4th 2016)5657- Fix bug in `click.Path` where it would crash when passed a `-`. See #551.5859Version 6.460-----------6162(bugfix release; released on March 24th 2016)6364- Fix bug in bash completion where click would discard one or more trailing65 arguments. See #471.6667Version 6.368-----------6970(bugfix release; released on February 22 2016)7172- Fix argument checks for interpreter invoke with `-m` and `-c`73 on Windows.74- Fixed a bug that cased locale detection to error out on Python 3.7576Version 6.277-----------7879(bugfix release, released on November 27th 2015)8081- Correct fix for hidden progress bars.8283Version 6.184-----------8586(bugfix release, released on November 27th 2015)8788- Resolved an issue with invisible progress bars no longer rendering.89- Disable chain commands with subcommands as they were inherently broken.90- Fix `MissingParameter` not working without parameters passed.9192Version 6.093-----------9495(codename "pow pow", released on November 24th 2015)9697- Optimized the progressbar rendering to not render when it did not98 actually change.99- Explicitly disallow nargs=-1 with a set default.100- The context is now closed before it's popped from the stack.101- Added support for short aliases for the false flag on toggles.102- Click will now attempt to aid you with debugging locale errors103 better by listing with the help of the OS what locales are104 available.105- Click used to return byte strings on Python 2 in some unit-testing106 situations. This has been fixed to correctly return unicode strings107 now.108- For Windows users on Python 2, Click will now handle Unicode more109 correctly handle Unicode coming in from the system. This also has110 the disappointing side effect that filenames will now be always111 unicode by default in the `Path` type which means that this can112 introduce small bugs for code not aware of this.113- Added a `type` parameter to `Path` to force a specific string type114 on the value.115- For users running Python on Windows the `echo`) and `prompt` functions116 now work with full unicode functionality in the Python windows console117 by emulating an output stream. This also applies to getting the118 virtual output and input streams via `click.get_text_stream(...)`.119- Unittests now always force a certain virtual terminal width.120- Added support for allowing dashes to indicate standard streams to the121 `Path` type.122- Multi commands in chain mode no longer propagate arguments left over123 from parsing to the callbacks. It's also now disallowed through an124 exception when optional arguments are attached to multi commands if chain125 mode is enabled.126- Relaxed restriction that disallowed chained commands to have other127 chained commands as child commands.128- Arguments with positive nargs can now have defaults implemented.129 Previously this configuration would often result in slightly unexpected130 values be returned.131132Version 5.1133-----------134135(bugfix release, released on 17th August 2015)136137- Fix a bug in `pass_obj` that would accidentally pass the context too.138139Version 5.0140-----------141142(codename "tok tok", released on 16th August 2015)143144- Removed various deprecated functionality.145- Atomic files now only accept the `w` mode.146- Change the usage part of help output for very long commands to wrap147 their arguments onto the next line, indented by 4 spaces.148- Fix a bug where return code and error messages were incorrect when149 using ``CliRunner``.150- added `get_current_context`.151- added a `meta` dictionary to the context which is shared across the152 linked list of contexts to allow click utilities to place state there.153- introduced `Context.scope`.154- The `echo` function is now threadsafe: It calls the `write` method of the155 underlying object only once.156- `prompt(hide_input=True)` now prints a newline on `^C`.157- Click will now warn if users are using ``unicode_literals``.158- Click will now ignore the ``PAGER`` environment variable if it is empty or159 contains only whitespace.160- The `click-contrib` GitHub organization was created.161162Version 4.1163-----------164165(bugfix release, released on July 14th 2015)166167- Fix a bug where error messages would include a trailing `None` string.168- Fix a bug where Click would crash on docstrings with trailing newlines.169- Support streams with encoding set to `None` on Python 3 by barfing with170 a better error.171- Handle ^C in less-pager properly.172- Handle return value of `None` from `sys.getfilesystemencoding`173- Fix crash when writing to unicode files with `click.echo`.174- Fix type inference with multiple options.175176Version 4.0177-----------178179(codename "zoom zoom", released on March 31st 2015)180181- Added `color` parameters to lots of interfaces that directly or indirectly182 call into echoing. This previously was always autodetection (with the183 exception of the `echo_via_pager` function). Now you can forcefully184 enable or disable it, overriding the auto detection of Click.185- Added an `UNPROCESSED` type which does not perform any type changes which186 simplifies text handling on 2.x / 3.x in some special advanced usecases.187- Added `NoSuchOption` and `BadOptionUsage` exceptions for more generic188 handling of errors.189- Added support for handling of unprocessed options which can be useful in190 situations where arguments are forwarded to underlying tools.191- Added `max_content_width` parameter to the context which can be used to192 change the maximum width of help output. By default Click will not format193 content for more than 80 characters width.194- Added support for writing prompts to stderr.195- Fix a bug when showing the default for multiple arguments.196- Added support for custom subclasses to `option` and `argument`.197- Fix bug in ``clear()`` on Windows when colorama is installed.198- Reject ``nargs=-1`` for options properly. Options cannot be variadic.199- Fixed an issue with bash completion not working properly for commands with200 non ASCII characters or dashes.201- Added a way to manually update the progressbar.202- Changed the formatting of missing arguments. Previously the internal203 argument name was shown in error messages, now the metavar is shown if204 passed. In case an automated metavar is selected, it's stripped of205 extra formatting first.206207Version 3.3208-----------209210(bugfix release, released on September 8th 2014)211212- Fixed an issue with error reporting on Python 3 for invalid forwarding213 of commands.214215Version 3.2216-----------217218(bugfix release, released on August 22nd 2014)219220- Added missing `err` parameter forwarding to the `secho` function.221- Fixed default parameters not being handled properly by the context222 invoke method. This is a backwards incompatible change if the function223 was used improperly. See :ref:`upgrade-to-3.2` for more information.224- Removed the `invoked_subcommands` attribute largely. It is not possible225 to provide it to work error free due to how the parsing works so this226 API has been deprecated. See :ref:`upgrade-to-3.2` for more information.227- Restored the functionality of `invoked_subcommand` which was broken as228 a regression in 3.1.229230Version 3.1231-----------232233(bugfix release, released on August 13th 2014)234235- Fixed a regression that caused contexts of subcommands to be236 created before the parent command was invoked which was a237 regression from earlier Click versions.238239Version 3.0240-----------241242(codename "clonk clonk", released on August 12th 2014)243244- formatter now no longer attempts to accomodate for terminals245 smaller than 50 characters. If that happens it just assumes246 a minimal width.247- added a way to not swallow exceptions in the test system.248- added better support for colors with pagers and ways to249 override the autodetection.250- the CLI runner's result object now has a traceback attached.251- improved automatic short help detection to work better with252 dots that do not terminate sentences.253- when definining options without actual valid option strings254 now, Click will give an error message instead of silently255 passing. This should catch situations where users wanted to256 created arguments instead of options.257- Restructured Click internally to support vendoring.258- Added support for multi command chaining.259- Added support for defaults on options with `multiple` and260 options and arguments with `nargs != 1`.261- label passed to `progressbar` is no longer rendered with262 whitespace stripped.263- added a way to disable the standalone mode of the `main`264 method on a Click command to be able to handle errors better.265- added support for returning values from command callbacks.266- added simplifications for printing to stderr from `echo`.267- added result callbacks for groups.268- entering a context multiple times defers the cleanup until269 the last exit occurs.270- added `open_file`.271272Version 2.6273-----------274275(bugfix release, released on August 11th 2014)276277- Fixed an issue where the wrapped streams on Python 3 would be reporting278 incorrect values for seekable.279280Version 2.5281-----------282283(bugfix release, released on July 28th 2014)284285- Fixed a bug with text wrapping on Python 3.286287Version 2.4288-----------289290(bugfix release, released on July 4th 2014)291292- Corrected a bug in the change of the help option in 2.3.293294Version 2.3295-----------296297(bugfix release, released on July 3rd 2014)298299- Fixed an incorrectly formatted help record for count options.'300- Add support for ansi code stripping on Windows if colorama301 is not available.302- restored the Click 1.0 handling of the help parameter for certain303 edge cases.304305Version 2.2306-----------307308(bugfix release, released on June 26th 2014)309310- fixed tty detection on PyPy.311- fixed an issue that progress bars were not rendered when the312 context manager was entered.313314Version 2.1315-----------316317(bugfix release, released on June 14th 2014)318319- fixed the :func:`launch` function on windows.320- improved the colorama support on windows to try hard to not321 screw up the console if the application is interrupted.322- fixed windows terminals incorrectly being reported to be 80323 characters wide instead of 79324- use colorama win32 bindings if available to get the correct325 dimensions of a windows terminal.326- fixed an issue with custom function types on Python 3.327- fixed an issue with unknown options being incorrectly reported328 in error messages.329330Version 2.0331-----------332333(codename "tap tap tap", released on June 6th 2014)334335- added support for opening stdin/stdout on Windows in336 binary mode correctly.337- added support for atomic writes to files by going through338 a temporary file.339- introduced :exc:`BadParameter` which can be used to easily perform340 custom validation with the same error messages as in the type system.341- added :func:`progressbar`; a function to show progress bars.342- added :func:`get_app_dir`; a function to calculate the home folder343 for configs.344- Added transparent handling for ANSI codes into the :func:`echo`345 function through `colorama`.346- Added :func:`clear` function.347- Breaking change: parameter callbacks now get the parameter object348 passed as second argument. There is legacy support for old callbacks349 which will warn but still execute the script.350- Added :func:`style`, :func:`unstyle` and :func:`secho` for ANSI351 styles.352- Added an :func:`edit` function that invokes the default editor.353- Added an :func:`launch` function that launches browsers and applications.354- nargs of -1 for arguments can now be forced to be a single item through355 the required flag. It defaults to not required.356- setting a default for arguments now implicitly makes it non required.357- changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts.358- added basic support for bash completion.359- added :func:`getchar` to fetch a single character from the terminal.360- errors now go to stderr as intended.361- fixed various issues with more exotic parameter formats like DOS/Windows362 style arguments.363- added :func:`pause` which works similar to the Windows ``pause`` cmd364 built-in but becomes an automatic noop if the application is not run365 through a terminal.366- added a bit of extra information about missing choice parameters.367- changed how the help function is implemented to allow global overriding368 of the help option.369- added support for token normalization to implement case insensitive handling.370- added support for providing defaults for context settings.371372Version 1.1373-----------374375(bugfix release, released on May 23rd 2014)376377- fixed a bug that caused text files in Python 2 to not accept378 native strings.379380Version 1.0381-----------382383(no codename, released on May 21st 2014)384385- Initial release.