From d7fed9cbf31e9a1d5cb3aedc9af0e274c00f32d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 11 Nov 2026 09:50:41 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=93=9D=20Clarify=20compatibility=20ch?= =?UTF-8?q?anges=20in=20the=200.29.0=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/release-notes.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index bbb5c147cb..7ae9588e69 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -19,7 +19,15 @@ * ✨ Use Pydantic for parameter validation. PR [#1831](https://github.com/fastapi/typer/pull/1831) by [@svlandeg](https://github.com/svlandeg). - Typer now uses Pydantic internally to validate command-line parameters. This is a gradual migration focused on preserving compatibility with existing Typer applications. Some validation error messages have changed. + Typer now uses Pydantic internally to validate command-line parameters. This is a gradual migration focused on preserving compatibility with existing Typer applications. Some validation error messages, help text, and usage output have changed. + + Compatibility changes: + + * Pydantic `>=2.5.3` is now a required dependency. + * `click_type` has been removed from `typer.Option()` and `typer.Argument()`. New ways to provide custom types will be provided with Pydantic, with much more flexibility. + * Some defaults are now validated more strictly. The previous [tuple example](tutorial/multiple-values/options-with-multiple-values.md)'s `(None, None, None)` default now fails validation. Use `tuple[str, int, bool] | None` with a default of `None` and check for `None` before unpacking. This also makes the code more correct, so you could consider this a bug fix, but if you depended on this behavior, there's a change needed in your code. + * Default [datetime parsing](tutorial/parameter-types/datetime.md) now follows Pydantic's rules, accepting Unix timestamps, timezone offsets, and fractional seconds. + * Callback parameter objects no longer expose Click's `.type`, `.make_metavar()`, `.human_readable_name`, or `.type_cast_value()`. Custom integrations using these need updating. ### Fixes From aed05904a4511922e6130ba0fe9688952bdfaa2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 11 Nov 2026 09:54:00 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9D=20Use=20absolute=20documentati?= =?UTF-8?q?on=20links=20in=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/release-notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 7ae9588e69..01a56ea199 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -25,8 +25,8 @@ * Pydantic `>=2.5.3` is now a required dependency. * `click_type` has been removed from `typer.Option()` and `typer.Argument()`. New ways to provide custom types will be provided with Pydantic, with much more flexibility. - * Some defaults are now validated more strictly. The previous [tuple example](tutorial/multiple-values/options-with-multiple-values.md)'s `(None, None, None)` default now fails validation. Use `tuple[str, int, bool] | None` with a default of `None` and check for `None` before unpacking. This also makes the code more correct, so you could consider this a bug fix, but if you depended on this behavior, there's a change needed in your code. - * Default [datetime parsing](tutorial/parameter-types/datetime.md) now follows Pydantic's rules, accepting Unix timestamps, timezone offsets, and fractional seconds. + * Some defaults are now validated more strictly. The previous [tuple example](https://typer.tiangolo.com/tutorial/multiple-values/options-with-multiple-values/)'s `(None, None, None)` default now fails validation. Use `tuple[str, int, bool] | None` with a default of `None` and check for `None` before unpacking. This also makes the code more correct, so you could consider this a bug fix, but if you depended on this behavior, there's a change needed in your code. + * Default [datetime parsing](https://typer.tiangolo.com/tutorial/parameter-types/datetime/) now follows Pydantic's rules, accepting Unix timestamps, timezone offsets, and fractional seconds. * Callback parameter objects no longer expose Click's `.type`, `.make_metavar()`, `.human_readable_name`, or `.type_cast_value()`. Custom integrations using these need updating. ### Fixes From 28898a34974f56c81917b022fe29a32005c9cc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 11 Nov 2026 09:58:25 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=93=9D=20Clarify=20the=20updated=20tu?= =?UTF-8?q?ple=20example=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 01a56ea199..97c2efc4b6 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -25,7 +25,7 @@ * Pydantic `>=2.5.3` is now a required dependency. * `click_type` has been removed from `typer.Option()` and `typer.Argument()`. New ways to provide custom types will be provided with Pydantic, with much more flexibility. - * Some defaults are now validated more strictly. The previous [tuple example](https://typer.tiangolo.com/tutorial/multiple-values/options-with-multiple-values/)'s `(None, None, None)` default now fails validation. Use `tuple[str, int, bool] | None` with a default of `None` and check for `None` before unpacking. This also makes the code more correct, so you could consider this a bug fix, but if you depended on this behavior, there's a change needed in your code. + * Some defaults are now validated more strictly. The previous tuple example's `(None, None, None)` default now fails validation. Use `tuple[str, int, bool] | None` with a default of `None` and check for `None` before unpacking, as shown in the [updated tuple example](https://typer.tiangolo.com/tutorial/multiple-values/options-with-multiple-values/). This also makes the code more correct, so you could consider this a bug fix, but if you depended on this behavior, there's a change needed in your code. * Default [datetime parsing](https://typer.tiangolo.com/tutorial/parameter-types/datetime/) now follows Pydantic's rules, accepting Unix timestamps, timezone offsets, and fractional seconds. * Callback parameter objects no longer expose Click's `.type`, `.make_metavar()`, `.human_readable_name`, or `.type_cast_value()`. Custom integrations using these need updating.