Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in the docs #5650

Open
wants to merge 5 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 3.2.0
-------------

Unreleased

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


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

Expand Down
2 changes: 1 addition & 1 deletion docs/patterns/mongoengine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Queries
Use the class ``objects`` attribute to make queries. A keyword argument
looks for an equal value on the field. ::

bttf = Movies.objects(title="Back To The Future").get_or_404()
bttf = Movie.objects(title="Back To The Future").get_or_404()

Query operators may be used by concatenating them with the field name
using a double-underscore. ``objects``, and queries returned by
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.1.dev"
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.2. Use feature detection or"
" 'importlib.metadata.version(\"flask\")' instead.",
DeprecationWarning,
stacklevel=2,
)
return importlib.metadata.version("flask")

raise AttributeError(name)