From 18ffe1eaf6c2eeffc898f4e8a590c062c40b30dc Mon Sep 17 00:00:00 2001 From: David Lord Date: Wed, 20 Nov 2024 19:37:06 -0800 Subject: [PATCH 1/4] add gettext config for docs --- docs/conf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 25b8f004..a7b8f919 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -62,6 +62,9 @@ html_logo = "_static/flask-vertical.png" html_title = f"Flask Documentation ({version})" html_show_sourcelink = False +gettext_uuid = True +gettext_compact = False + # Local Extensions ----------------------------------------------------- From dcbe86bd1577bad9a1356acca5fced7d3fb3a0c3 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sat, 23 Nov 2024 16:01:16 -0800 Subject: [PATCH 2/4] start version 3.1.1 --- CHANGES.rst | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 07d008a0..139a343c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,9 @@ +Version 3.1.1 +------------- + +Unreleased + + Version 3.1.0 ------------- diff --git a/pyproject.toml b/pyproject.toml index 33473f8c..1e33de45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "Flask" -version = "3.1.0" +version = "3.1.1.dev" description = "A simple framework for building complex web applications." readme = "README.md" license = {file = "LICENSE.txt"} From b394a994e6d632643d0061e0e67772f076925951 Mon Sep 17 00:00:00 2001 From: David Lord Date: Sat, 23 Nov 2024 16:03:47 -0800 Subject: [PATCH 3/4] update `__version__` deprecation --- src/flask/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flask/__init__.py b/src/flask/__init__.py index e86eb43e..7440aef1 100644 --- a/src/flask/__init__.py +++ b/src/flask/__init__.py @@ -50,7 +50,7 @@ def __getattr__(name: str) -> t.Any: warnings.warn( "The '__version__' attribute is deprecated and will be removed in" - " Flask 3.1. Use feature detection or" + " Flask 3.2. Use feature detection or" " 'importlib.metadata.version(\"flask\")' instead.", DeprecationWarning, stacklevel=2, From 54c3f87af9f6c0d6622cec2c3d9695b0229fb8fa Mon Sep 17 00:00:00 2001 From: kurtatter <3nc0m0s12@gmail.com> Date: Sat, 23 Nov 2024 03:23:09 +0300 Subject: [PATCH 4/4] fix type hint for `cli_runner.invoke` --- CHANGES.rst | 2 ++ src/flask/testing.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 139a343c..14c6a6ac 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,8 @@ Version 3.1.1 Unreleased +- Fix type hint for `cli_runner.invoke`. :issue:`5645` + Version 3.1.0 ------------- diff --git a/src/flask/testing.py b/src/flask/testing.py index 602b773b..a62c4836 100644 --- a/src/flask/testing.py +++ b/src/flask/testing.py @@ -10,6 +10,7 @@ from urllib.parse import urlsplit import werkzeug.test from click.testing import CliRunner +from click.testing import Result from werkzeug.test import Client from werkzeug.wrappers import Request as BaseRequest @@ -273,7 +274,7 @@ class FlaskCliRunner(CliRunner): def invoke( # type: ignore self, cli: t.Any = None, args: t.Any = None, **kwargs: t.Any - ) -> t.Any: + ) -> Result: """Invokes a CLI command in an isolated environment. See :meth:`CliRunner.invoke ` for full method documentation. See :ref:`testing-cli` for examples.