8000 Releases · fastapi/typer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: fastapi/typer

0.16.0

26 May 14:30
Compare
Choose a tag to compare

Upgrades

When using the CliRunner with Click < 8.2, to be able to access the stderr output, you needed to set the mix_stderr parameter to True. Since Click 8.2 (and Typer 0.160 this release supporting it) this is no longer necessary, so this parameter has been removed.

Refactors

  • ✅ Refactor tests for compatibility with Click 8.2. PR #1230 by @tiangolo.

Internal

0.15.4

14 May 16:34
Compare
Choose a tag to compare

Upgrades

  • 📌 Pin Click to < 8.2, compatibility for Click >= 8.2 will be added in a future version. PR #1225 by @tiangolo.

0.15.3

28 Apr 21:40
Compare
Choose a tag to compare

Fixes

  • 🐛 Ensure that autocompletion works for Path arguments/options. PR #1138 by @svlandeg.
  • 🐛 Fix newline after header in help text, and add more tests for the behaviour of rich_markup_mode . PR #964 by @svlandeg.

Internal

0.15.2

27 Feb 19:17
Compare
Choose a tag to compare

Features

  • ✨ Allow custom styles for commands in help output. PR #1103 by @TheTechromancer.
  • ✨ Avoid the unnecessary import of typing_extensions in newer Python versions. PR #1048 by @horta.

Fixes

  • 🐛 Fix shell completions for the fish shell. PR #1069 by @goraje.

Refactors

  • 🚚 Rename test to corner-cases to make it more explicit. PR #1083 by @tiangolo.

Docs

  • ✏️ Fix small typos in the tutorial documentation. PR #1137 by @svlandeg.
  • 📝 Update optional CLI argument section in tutorial with Annotated. PR #983 by @gkeuccsr.
  • 📝 Clarify the need for mix_stderr when accessing the output of stderr in tests. PR #1045 by @mrchrisadams.

Internal

0.15.1

04 Dec 17:44
Compare
Choose a tag to compare

Features

  • 🗑️ Deprecate shell_complete and continue to use autocompletion for CLI parameters. PR #974 by @svlandeg.

Docs

  • ✏️ Fix a few typos in the source and documentation. PR #1028 by @kkirsche.
  • 📝 Fix minor inconsistencies and typos in tutorial. PR #1067 by @tvoirand.
  • ✏️ Fix a few small typos in the documentation. PR #1077 by @svlandeg.

Internal

0.15.0

03 Dec 15:36
Compare
Choose a tag to compare

Features

Internal

0.14.0

28 Nov 22:48
Compare
Choose a tag to compare

Breaking Changes

  • 🔥 Remove auto naming of groups added via add_typer based on the group's callback function name. PR #1052 by @patrick91.

Before, it was supported to infer the name of a command group from the callback function name in the sub-app, so, in this code:

import typer

app = typer.Typer()
users_app = typer.Typer()

app.add_typer(users_app)


@users_app.callback()
def users():  # <-- This was the inferred command group name
    """
    Manage users in the app.
    """


@users_app.command()
def create(name: str):
    print(f"Creating user: {name}")

...the command group would be named users, based on the name of the function def users().

Now you need to set it explicitly:

import typer

app = typer.Typer()
users_app = typer.Typer()

app.add_typer(users_app, name="users")  # <-- Explicitly set the command group name


@users_app.callback()
def users():
    """
    Manage users in the app.
    """


@users_app.command()
def create(name: str):
    print(f"Creating user: {<
10000
span class="pl-s1">name}")

Updated docs SubCommand Name and Help.

Note: this change will enable important features in the next release. 🤩

Internal

0.13.1

18 Nov 22:38
Compare
Choose a tag to compare

Features

  • ✨ Remove Rich tags when showing completion text. PR #877 by @svlandeg.
  • ✨ Render Rich markup as HTML in Markdown docs. PR #847 by @svlandeg.
  • ✨ Support cp850 encoding for auto-completion in PowerShell. PR #808 by @svlandeg.
  • ✨ Allow gettext translation of help message. PR #886 by @svlandeg.

Refactors

Docs

  • 📝 Update markdown includes to use the new simpler format. PR #1054 by @tiangolo.

Internal

0.13.0

07 Nov 21:12
Compare
Choose a tag to compare

Features

  • ✨ Handle KeyboardInterrupt separately from other exceptions. PR #1039 by @patrick91.
  • ✨ Update launch to not print anything when opening urls. PR #1035 by @patrick91.
  • ✨ Show help items in order of definition. PR #944 by @svlandeg.

Fixes

  • 🐛 Fix equality check for custom classes. PR #979 by @AryazE.
  • 🐛 Allow colon in zsh autocomplete values and descriptions. PR #988 by @snapbug.

Refactors

  • 🗑️ Deprecate support for is_flag and flag_value parameters. PR #987 by @svlandeg.
  • 🔥 Remove unused functionality from _typing.py file. PR #805 by @ivantodorovich.
  • ✏️ Fix typo in function name _make_rich_text. PR #959 by @svlandeg.

Internal

0.12.5

24 Aug 21:17
Compare
Choose a tag to compare

Features

  • 💄 Unify the width of the Rich console for help and errors. PR #788 by @racinmat.
  • 🚸 Improve assertion error message if a group is not a valid subclass. PR #425 by @chrisburr.

Fixes

  • 🐛 Ensure rich_markup_mode=None disables Rich formatting. PR #859 by @svlandeg.
  • 🐛 Fix sourcing of completion path for Git Bash. PR #801 by @svlandeg.
  • 🐛 Fix PowerShell completion with incomplete word. PR #360 by @patricksurry.

Refactors

Docs

  • ♻️ Use F-strings in Click examples in docs. PR #891 by @svlandeg.
  • 📝Add missing main.py in tutorial on CLI option names. PR #868 by @fsramalho.
  • 📝 Fix broken link. PR #835 by @OhioDschungel6.
  • 📝 Update package docs with the latest versions of Typer and Poetry. PR #781 by @kinuax.
  • 📝 Update the Progress Bar tutorial with correct output. PR #199 by @n1ckdm.
  • 📝 Add docs and scripts to test completion in different shells. PR #953 by @tiangolo.
  • ✏️ Fix a typo in docs/virtual-environments.md. PR #952 by @tiangolo.
  • ✏️ Fix typo in docs/contributing.md. PR #947 by @tiangolo.
  • 📝 Add docs for virtual environments, environment variables, and update contributing. PR #946 by @tiangolo.

Internal

0