Skip to content

Commit

Permalink
Merge branch 'pallets:main' into AsyncIterable-response
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCat467 authored Dec 23, 2024
2 parents 940de63 + 6b054f8 commit 6e00238
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 23 deletions.
16 changes: 16 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Version 3.2.0
-------------

Unreleased

- Remove previously deprecated code: ``__version__``. :pr:`5648`


Version 3.1.1
-------------

Unreleased

- Fix type hint for `cli_runner.invoke`. :issue:`5645`


Version 3.1.0
-------------

Expand Down
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
html_title = f"Flask Documentation ({version})"
html_show_sourcelink = False

gettext_uuid = True
gettext_compact = False

# Local Extensions -----------------------------------------------------


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "Flask"
version = "3.1.0"
version = "3.2.0.dev"
description = "A simple framework for building complex web applications."
readme = "README.md"
license = {file = "LICENSE.txt"}
Expand Down
21 changes: 0 additions & 21 deletions src/flask/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
from __future__ import annotations

import typing as t

from . import json as json
from .app import Flask as Flask
from .blueprints import Blueprint as Blueprint
Expand Down Expand Up @@ -41,20 +37,3 @@
from .templating import stream_template_string as stream_template_string
from .wrappers import Request as Request
from .wrappers import Response as Response


def __getattr__(name: str) -> t.Any:
if name == "__version__":
import importlib.metadata
import warnings

warnings.warn(
"The '__version__' attribute is deprecated and will be removed in"
" Flask 3.1. Use feature detection or"
" 'importlib.metadata.version(\"flask\")' instead.",
DeprecationWarning,
stacklevel=2,
)
return importlib.metadata.version("flask")

raise AttributeError(name)
3 changes: 2 additions & 1 deletion src/flask/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

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

Expand Down Expand Up @@ -273,7 +274,7 @@ def __init__(self, app: Flask, **kwargs: t.Any) -> None:

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 <click.testing.CliRunner.invoke>` for
full method documentation. See :ref:`testing-cli` for examples.
Expand Down

0 comments on commit 6e00238

Please sign in to comment.