Skip to content

Upgrading typer 0.28 to 0.29

Breaking0.28.0 → 0.29.2Security1Platform2Changed1Other10

BreakingUpgrade verdict

2 platform requirement changes and a security fix.

  • This version no longer works on Python 3.10, so you need a newer Python version.
  • Typer now works on the upcoming Python 3.15, including its free-threaded 3.15t build.
  • Error messages no longer let terminal control characters through, so bad input cannot mess with your terminal display.
3 items need code or config changes

Python requirement changed in 0.29.2: >=3.10 → >=3.11.

Security1
Escapes terminal control characters in Pydantic validation errors.
Platform2
Drops support for Python 3.10.
Adds support for Python 3.15 and 3.15t.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • removed: method TyperArgument.get_error_hint(ctx: _click.Context) -> str
  • removed: method TyperArgument.make_metavar(ctx: _click.Context, *, usage: bool=…) -> str
  • removed: method TyperArgument.value_is_missing(value: Any) -> bool
  • removed: method TyperOption.make_metavar(ctx: _click.Context) -> str
  • removed: method TyperOption.value_from_envvar(ctx: _click.Context) -> Any
  • removed: method TyperOption.value_is_missing(value: Any) -> bool
  • removed: property TyperArgument.human_readable_name -> str
  • changed: class TyperArgument(_click.core.Parameter) → class TyperArgument(_TyperParameter)
  • changed: class TyperOption(_click.Parameter) → class TyperOption(_TyperParameter)
  • changed: constructor TyperArgument(*, param_decls: list[str], type: Any | None=…, required: bool=…, default: Any | None=…, callback: Callable[..., Any] | None=…, nargs: int | None=…, metavar: str | None=…, expose_value: bool=…, is_eager: bool=…, envvar: str | list[str] | None=…, shell_complete: Callable[[_click.Context, _click.Parameter, str], list[CompletionItem] | list[str]] | None=…, autocompletion: Ca… → constructor TyperArgument(*, param_decls: list[str], type_descriptor: TypeDescriptor, required: bool=…, default: Any | None=…, callback: Callable[..., Any] | None=…, nargs: int | None=…, metavar: str | None=…, expose_value: bool=…, is_eager: bool=…, envvar: str | list[str] | None=…, shell_complete: Callable[[_click.Context, _click.Parameter, str], list[CompletionItem] | list[str]] | None=…, autoc…
  • changed: constructor TyperOption(*, param_decls: list[str], type: types.ParamType | Any | None=…, required: bool=…, default: Any | None=…, callback: Callable[..., Any] | None=…, nargs: int | None=…, metavar: str | None=…, expose_value: bool=…, is_eager: bool=…, envvar: str | list[str] | None=…, shell_complete: Callable[[_click.Context, _click.Parameter, str], list[CompletionItem] | list[str]] | None=…, au… → constructor TyperOption(*, param_decls: list[str], type_descriptor: TypeDescriptor, required: bool=…, default: Any | None=…, callback: Callable[..., Any] | None=…, nargs: int | None=…, metavar: str | None=…, expose_value: bool=…, is_eager: bool=…, envvar: str | list[str] | None=…, shell_complete: Callable[[_click.Context, _click.Parameter, str], list[CompletionItem] | list[str]] | None=…, autocom…
  • changed: method TyperOption.get_error_hint(ctx: _click.Context) -> str → method TyperOption.get_error_hint() -> str
  • added: method TyperOption.display_type_rich(ctx: _click.Context) -> str | None
  • removed: function determine_type_convertor(type_: Any) -> Callable[[Any], Any] | None
  • removed: function generate_enum_convertor(enum: type[Enum]) -> Callable[[Any], Any]
  • removed: function generate_list_convertor(convertor: Callable[[Any], Any] | None, default_value: Any | None) -> Callable[[Sequence[Any] | None], list[Any] | None]
  • removed: function generate_tuple_convertor(types: Sequence[Any]) -> Callable[[tuple[Any, ...] | None], tuple[Any, ...] | None]
  • removed: function get_click_param(param: ParamMeta) -> tuple[TyperArgument | TyperOption, Any]
  • removed: function get_click_type(*, annotation: Any, parameter_info: ParameterInfo) -> types.ParamType
  • removed: function get_params_convertors_ctx_param_name_from_function(callback: Callable[..., Any] | None) -> tuple[list[TyperArgument | TyperOption], dict[str, Any], str | None]
  • removed: function lenient_issubclass(cls: Any, class_or_tuple: AnyType | tuple[AnyType, ...]) -> bool
  • removed: function param_path_convertor(value: str | None=…) -> Path | None
  • changed: function get_callback(*, callback: Callable[..., Any] | None=…, params: Sequence[_click.Parameter]=…, convertors: dict[str, Callable[[str], Any]] | None=…, context_param_name: str | None=…, pretty_exceptions_short: bool) -> Callable[..., Any] | None → function get_callback(*, callback: Callable[..., Any] | None=…, params: Sequence[_click.Parameter]=…, context_param_name: str | None=…, pretty_exceptions_short: bool) -> Callable[..., Any] | None
  • changed: function get_param_callback(*, callback: Callable[..., Any] | None=…, convertor: Callable[..., Any] | None=…) -> Callable[..., Any] | None → function get_param_callback(*, callback: Callable[..., Any] | None=…) -> Callable[..., Any] | None
  • removed: class TyperPath(types.ParamType)
  • removed: constructor TyperPath(exists: bool=…, file_okay: bool=…, dir_okay: bool=…, writable: bool=…, readable: bool=…, resolve_path: bool=…, allow_dash: bool=…, path_type: type[Any] | None=…)
  • removed: field TyperPath.envvar_list_splitter: ClassVar[str]
  • removed: method TyperPath.coerce_path_result(value: str | os.PathLike[str]) -> str | bytes | os.PathLike[str]
  • removed: method TyperPath.convert(value: str | os.PathLike[str], param: _click.Parameter | None, ctx: Context | None) -> str | bytes | os.PathLike[str]
  • removed: method TyperPath.shell_complete(ctx: _click.Context, param: _click.Parameter, incomplete: str) -> list[CompletionItem]
  • changed: function Argument(default: Any | None=…, *, callback: Callable[..., Any] | None=…, metavar: str | None=…, expose_value: bool=…, is_eager: bool=…, envvar: str | list[str] | None=…, shell_complete: Callable[[_click.Context, _click.Parameter, str], list[CompletionItem] | list[str]] | None=…, autocompletion: Callable[..., Any] | None=…, default_factory: Callable[[], Any] | None=…, parser: Callable[[s… → function Argument(default: Annotated[Any | None, Doc('\n By default, CLI arguments are required. However, by giving them a default value they become [optional](https://typer.tiangolo.com/tutorial/arguments/optional):\n\n **Example**\n\n ```python\n @app.command()\n def main(name: str = typer.Argument("World")):\n print(f"Hello…
  • changed: function Option(default: Any | None=…, *param_decls: str, callback: Callable[..., Any] | None=…, metavar: str | None=…, expose_value: bool=…, is_eager: bool=…, envvar: str | list[str] | None=…, shell_complete: Callable[[_click.Context, _click.Parameter, str], list[CompletionItem] | list[str]] | None=…, autocompletion: Callable[..., Any] | None=…, default_factory: Callable[[], Any] | None=…, parse… → function Option(default: Annotated[Any | None, Doc('\n Usually, [CLI options](https://typer.tiangolo.com/tutorial/options/) are optional and have a default value, passed on like this:\n\n **Example**\n\n ```python\n @app.command()\n def main(network: str = typer.Option("CNN")):\n print(f"Training neural network of type: {networ…