Skip to content
Myr

📝 Update release notes

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

authored by Sebastián Ramírez · committed by Sebastián Ramírez · parent 35bad6a · Browse files · 1 file+52 added−0 removed
This commit

State

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

Diff stats

1 file+52 added−0 removed

  • other:+52 added−0 removed

1 file+52 added−0 removed

modified:docs/release-notes.md+52 added
4 unmodified lines
5### Breaking Changes67* 🔥 Remove auto naming of groups added via `add_typer` based on the group's callback function name. PR [#1052](https://github.com/fastapi/typer/pull/1052) by [@patrick91](https://github.com/patrick91).89Before, it was supported to infer the name of a command group from the callback function name in the sub-app, so, in this code:1011```python12import typer1314app = typer.Typer()15users_app = typer.Typer()1617app.add_typer(users_app)181920@users_app.callback()21def users(): # <-- This was the inferred command group name22 """23 Manage users in the app.24 """252627@users_app.command()28def create(name: str):29 print(f"Creating user: {name}")30```3132...the command group would be named `users`, based on the name of the function `def users()`.3334Now you need to set it explicitly:3536```python37import typer3839app = typer.Typer()40users_app = typer.Typer()4142app.add_typer(users_app, name="users") # <-- Explicitly set the command group name434445@users_app.callback()46def users():47 """48 Manage users in the app.49 """505152@users_app.command()53def create(name: str):54 print(f"Creating user: {name}")55```5657Updated docs [SubCommand Name and Help](https://typer.tiangolo.com/tutorial/subcommands/name-and-help/).5859**Note**: this change will enable important features in the next release. 🤩6061### Internal6263* ⬆ Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.12.2. PR [#1043](https://github.com/fastapi/typer/pull/1043) by [@dependabot[bot]](https://github.com/apps/dependabot).64* ⬆ Bump mkdocs-material from 9.5.44 to 9.5.46. PR [#1062](https://github.com/fastapi/typer/pull/1062) by [@dependabot[bot]](https://github.com/apps/dependabot).
738 unmodified lines