diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000000..45198266c6
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,17 @@
+{
+ "name": "pallets/flask",
+ "image": "mcr.microsoft.com/devcontainers/python:3",
+ "customizations": {
+ "vscode": {
+ "settings": {
+ "python.defaultInterpreterPath": "${workspaceFolder}/.venv",
+ "python.terminal.activateEnvInCurrentTerminal": true,
+ "python.terminal.launchArgs": [
+ "-X",
+ "dev"
+ ]
+ }
+ }
+ },
+ "onCreateCommand": ".devcontainer/on-create-command.sh"
+}
diff --git a/.devcontainer/on-create-command.sh b/.devcontainer/on-create-command.sh
new file mode 100755
index 0000000000..deffa37bfe
--- /dev/null
+++ b/.devcontainer/on-create-command.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+
+python3 -m venv .venv
+. .venv/bin/activate
+pip install -U pip setuptools wheel
+pip install -r requirements/dev.txt
+pip install -e .
+pre-commit install --install-hooks
diff --git a/.flake8 b/.flake8
new file mode 100644
index 0000000000..8f3b4fd4bc
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,25 @@
+[flake8]
+extend-select =
+ # bugbear
+ B
+ # bugbear opinions
+ B9
+ # implicit str concat
+ ISC
+extend-ignore =
+ # slice notation whitespace, invalid
+ E203
+ # line length, handled by bugbear B950
+ E501
+ # bare except, handled by bugbear B001
+ E722
+ # zip with strict=, requires python >= 3.10
+ B905
+ # string formatting opinion, B028 renamed to B907
+ B028
+ B907
+# up to 88 allowed by bugbear B950
+max-line-length = 80
+per-file-ignores =
+ # __init__ exports names
+ src/flask/__init__.py: F401
diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml
index cd89f67c9d..c790fae5cb 100644
--- a/.github/workflows/lock.yaml
+++ b/.github/workflows/lock.yaml
@@ -1,18 +1,25 @@
-# This does not automatically close "stale" issues. Instead, it locks closed issues after 2 weeks of no activity.
-# If there's a new issue related to an old one, we've found it's much easier to work on as a new issue.
-
name: 'Lock threads'
+# Lock closed issues that have not received any further activity for
+# two weeks. This does not close open issues, only humans may do that.
+# We find that it is easier to respond to new issues with fresh examples
+# rather than continuing discussions on old issues.
on:
schedule:
- cron: '0 0 * * *'
+permissions:
+ issues: write
+ pull-requests: write
+
+concurrency:
+ group: lock
+
jobs:
lock:
runs-on: ubuntu-latest
steps:
- - uses: dessant/lock-threads@v3
+ - uses: dessant/lock-threads@c1b35aecc5cdb1a34539d14196df55838bb2f836
with:
- github-token: ${{ github.token }}
issue-inactive-days: 14
pr-inactive-days: 14
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
new file mode 100644
index 0000000000..82285542df
--- /dev/null
+++ b/.github/workflows/publish.yaml
@@ -0,0 +1,72 @@
+name: Publish
+on:
+ push:
+ tags:
+ - '*'
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ outputs:
+ hash: ${{ steps.hash.outputs.hash }}
+ steps:
+ - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
+ - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
+ with:
+ python-version: '3.x'
+ cache: 'pip'
+ cache-dependency-path: 'requirements/*.txt'
+ - run: pip install -r requirements/build.txt
+ # Use the commit date instead of the current date during the build.
+ - run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
+ - run: python -m build
+ # Generate hashes used for provenance.
+ - name: generate hash
+ id: hash
+ run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
+ - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
+ with:
+ path: ./dist
+ provenance:
+ needs: ['build']
+ permissions:
+ actions: read
+ id-token: write
+ contents: write
+ # Can't pin with hash due to how this workflow works.
+ uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.5.0
+ with:
+ base64-subjects: ${{ needs.build.outputs.hash }}
+ create-release:
+ # Upload the sdist, wheels, and provenance to a GitHub release. They remain
+ # available as build artifacts for a while as well.
+ needs: ['provenance']
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
+ - name: create release
+ run: >
+ gh release create --draft --repo ${{ github.repository }}
+ ${{ github.ref_name }}
+ *.intoto.jsonl/* artifact/*
+ env:
+ GH_TOKEN: ${{ github.token }}
+ publish-pypi:
+ needs: ['provenance']
+ # Wait for approval before attempting to upload to PyPI. This allows reviewing the
+ # files in the draft release.
+ environment: 'publish'
+ runs-on: ubuntu-latest
+ permissions:
+ id-token: write
+ steps:
+ - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
+ # Try uploading to Test PyPI first, in case something fails.
+ - uses: pypa/gh-action-pypi-publish@0bf742be3ebe032c25dd15117957dc15d0cfc38d
+ with:
+ repository-url: https://test.pypi.org/legacy/
+ packages-dir: artifact/
+ - uses: pypa/gh-action-pypi-publish@0bf742be3ebe032c25dd15117957dc15d0cfc38d
+ with:
+ packages-dir: artifact/
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 674fb8b73b..d138c7b90b 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -24,28 +24,29 @@ jobs:
fail-fast: false
matrix:
include:
- - {name: Linux, python: '3.10', os: ubuntu-latest, tox: py310}
- - {name: Windows, python: '3.10', os: windows-latest, tox: py310}
- - {name: Mac, python: '3.10', os: macos-latest, tox: py310}
- - {name: '3.11-dev', python: '3.11-dev', os: ubuntu-latest, tox: py311}
+ - {name: Linux, python: '3.11', os: ubuntu-latest, tox: py311}
+ - {name: Windows, python: '3.11', os: windows-latest, tox: py311}
+ - {name: Mac, python: '3.11', os: macos-latest, tox: py311}
+ - {name: '3.12-dev', python: '3.12-dev', os: ubuntu-latest, tox: py312}
+ - {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
- - {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
- - {name: 'PyPy', python: 'pypy-3.7', os: ubuntu-latest, tox: pypy37}
- - {name: 'Pallets Minimum Versions', python: '3.10', os: ubuntu-latest, tox: py-min}
- - {name: 'Pallets Development Versions', python: '3.7', os: ubuntu-latest, tox: py-dev}
- - {name: Typing, python: '3.10', os: ubuntu-latest, tox: typing}
+ - {name: 'PyPy', python: 'pypy-3.9', os: ubuntu-latest, tox: pypy39}
+ - {name: 'Minimum Versions', python: '3.11', os: ubuntu-latest, tox: py311-min}
+ - {name: 'Development Versions', python: '3.8', os: ubuntu-latest, tox: py38-dev}
+ - {name: Typing, python: '3.11', os: ubuntu-latest, tox: typing}
steps:
- - uses: actions/checkout@v3
- - uses: actions/setup-python@v4
+ - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
+ - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: 'requirements/*.txt'
- - name: update pip
- run: |
- pip install -U wheel
- pip install -U setuptools
- python -m pip install -U pip
+ - name: cache mypy
+ uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
+ with:
+ path: ./.mypy_cache
+ key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }}
+ if: matrix.tox == 'typing'
- run: pip install tox
- - run: tox -e ${{ matrix.tox }}
+ - run: tox run -e ${{ matrix.tox }}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5a1a225f0e..79b632ae84 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,35 +3,34 @@ ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/asottile/pyupgrade
- rev: v2.37.3
+ rev: v3.3.2
hooks:
- id: pyupgrade
- args: ["--py36-plus"]
+ args: ["--py38-plus"]
- repo: https://github.com/asottile/reorder_python_imports
- rev: v3.8.2
+ rev: v3.9.0
hooks:
- id: reorder-python-imports
name: Reorder Python imports (src, tests)
files: "^(?!examples/)"
args: ["--application-directories", "src"]
- additional_dependencies: ["setuptools>60.9"]
- repo: https://github.com/psf/black
- rev: 22.8.0
+ rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
- rev: 5.0.4
+ rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-implicit-str-concat
- repo: https://github.com/peterdemin/pip-compile-multi
- rev: v2.4.6
+ rev: v2.6.2
hooks:
- id: pip-compile-multi-verify
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.3.0
+ rev: v4.4.0
hooks:
- id: fix-byte-order-marker
- id: trailing-whitespace
diff --git a/CHANGES.rst b/CHANGES.rst
index 6c3ff32c97..4d651204c3 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,13 +1,99 @@
+Version 2.3.2
+-------------
+
+Released 2023-05-01
+
+- Set ``Vary: Cookie`` header when the session is accessed, modified, or refreshed.
+- Update Werkzeug requirement to >=2.3.3 to apply recent bug fixes.
+
+
+Version 2.3.1
+-------------
+
+Released 2023-04-25
+
+- Restore deprecated ``from flask import Markup``. :issue:`5084`
+
+
Version 2.3.0
-------------
-Unreleased
+Released 2023-04-25
+
+- Drop support for Python 3.7. :pr:`5072`
+- Update minimum requirements to the latest versions: Werkzeug>=2.3.0, Jinja2>3.1.2,
+ itsdangerous>=2.1.2, click>=8.1.3.
+- Remove previously deprecated code. :pr:`4995`
+
+ - The ``push`` and ``pop`` methods of the deprecated ``_app_ctx_stack`` and
+ ``_request_ctx_stack`` objects are removed. ``top`` still exists to give
+ extensions more time to update, but it will be removed.
+ - The ``FLASK_ENV`` environment variable, ``ENV`` config key, and ``app.env``
+ property are removed.
+ - The ``session_cookie_name``, ``send_file_max_age_default``, ``use_x_sendfile``,
+ ``propagate_exceptions``, and ``templates_auto_reload`` properties on ``app``
+ are removed.
+ - The ``JSON_AS_ASCII``, ``JSON_SORT_KEYS``, ``JSONIFY_MIMETYPE``, and
+ ``JSONIFY_PRETTYPRINT_REGULAR`` config keys are removed.
+ - The ``app.before_first_request`` and ``bp.before_app_first_request`` decorators
+ are removed.
+ - ``json_encoder`` and ``json_decoder`` attributes on app and blueprint, and the
+ corresponding ``json.JSONEncoder`` and ``JSONDecoder`` classes, are removed.
+ - The ``json.htmlsafe_dumps`` and ``htmlsafe_dump`` functions are removed.
+ - Calling setup methods on blueprints after registration is an error instead of a
+ warning. :pr:`4997`
+
+- Importing ``escape`` and ``Markup`` from ``flask`` is deprecated. Import them
+ directly from ``markupsafe`` instead. :pr:`4996`
+- The ``app.got_first_request`` property is deprecated. :pr:`4997`
+- The ``locked_cached_property`` decorator is deprecated. Use a lock inside the
+ decorated function if locking is needed. :issue:`4993`
+- Signals are always available. ``blinker>=1.6.2`` is a required dependency. The
+ ``signals_available`` attribute is deprecated. :issue:`5056`
+- Signals support ``async`` subscriber functions. :pr:`5049`
+- Remove uses of locks that could cause requests to block each other very briefly.
+ :issue:`4993`
+- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.
+ :pr:`4947`
+- Ensure subdomains are applied with nested blueprints. :issue:`4834`
+- ``config.from_file`` can use ``text=False`` to indicate that the parser wants a
+ binary file instead. :issue:`4989`
+- If a blueprint is created with an empty name it raises a ``ValueError``.
+ :issue:`5010`
+- ``SESSION_COOKIE_DOMAIN`` does not fall back to ``SERVER_NAME``. The default is not
+ to set the domain, which modern browsers interpret as an exact match rather than
+ a subdomain match. Warnings about ``localhost`` and IP addresses are also removed.
+ :issue:`5051`
+- The ``routes`` command shows each rule's ``subdomain`` or ``host`` when domain
+ matching is in use. :issue:`5004`
+- Use postponed evaluation of annotations. :pr:`5071`
+
+
+Version 2.2.5
+-------------
+
+Released 2023-05-02
+
+- Update for compatibility with Werkzeug 2.3.3.
+- Set ``Vary: Cookie`` header when the session is accessed, modified, or refreshed.
+
+
+Version 2.2.4
+-------------
+
+Released 2023-04-25
+
+- Update for compatibility with Werkzeug 2.3.
Version 2.2.3
-------------
-Unreleased
+Released 2023-02-15
+
+- Autoescape is enabled by default for ``.svg`` template files. :issue:`4831`
+- Fix the type of ``template_folder`` to accept ``pathlib.Path``. :issue:`4892`
+- Add ``--debug`` option to the ``flask run`` command. :issue:`4777`
Version 2.2.2
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index d5e3a3f776..24daa729d0 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -67,9 +67,29 @@ Include the following in your patch:
.. _pre-commit: https://pre-commit.com
-First time setup
-~~~~~~~~~~~~~~~~
+First time setup using GitHub Codespaces
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+`GitHub Codespaces`_ creates a development environment that is already set up for the
+project. By default it opens in Visual Studio Code for the Web, but this can
+be changed in your GitHub profile settings to use Visual Studio Code or JetBrains
+PyCharm on your local computer.
+
+- Make sure you have a `GitHub account`_.
+- From the project's repository page, click the green "Code" button and then "Create
+ codespace on main".
+- The codespace will be set up, then Visual Studio Code will open. However, you'll
+ need to wait a bit longer for the Python extension to be installed. You'll know it's
+ ready when the terminal at the bottom shows that the virtualenv was activated.
+- Check out a branch and `start coding`_.
+
+.. _GitHub Codespaces: https://docs.github.com/en/codespaces
+.. _devcontainer: https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers
+
+First time setup in your local environment
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- Make sure you have a `GitHub account`_.
- Download and install the `latest version of git`_.
- Configure git with your `username`_ and `email`_.
@@ -78,102 +98,90 @@ First time setup
$ git config --global user.name 'your name'
$ git config --global user.email 'your email'
-- Make sure you have a `GitHub account`_.
- Fork Flask to your GitHub account by clicking the `Fork`_ button.
-- `Clone`_ the main repository locally.
+- `Clone`_ your fork locally, replacing ``your-username`` in the command below with
+ your actual username.
.. code-block:: text
- $ git clone https://github.com/pallets/flask
+ $ git clone https://github.com/your-username/flask
$ cd flask
-- Add your fork as a remote to push your work to. Replace
- ``{username}`` with your username. This names the remote "fork", the
- default Pallets remote is "origin".
-
- .. code-block:: text
-
- $ git remote add fork https://github.com/{username}/flask
-
-- Create a virtualenv.
-
+- Create a virtualenv. Use the latest version of Python.
- Linux/macOS
.. code-block:: text
- $ python3 -m venv env
- $ . env/bin/activate
+ $ python3 -m venv .venv
+ $ . .venv/bin/activate
- Windows
.. code-block:: text
- > py -3 -m venv env
- > env\Scripts\activate
-
-- Upgrade pip and setuptools.
-
- .. code-block:: text
-
- $ python -m pip install --upgrade pip setuptools
+ > py -3 -m venv .venv
+ > .venv\Scripts\activate
-- Install the development dependencies, then install Flask in editable
- mode.
+- Install the development dependencies, then install Flask in editable mode.
.. code-block:: text
+ $ python -m pip install -U pip setuptools wheel
$ pip install -r requirements/dev.txt && pip install -e .
- Install the pre-commit hooks.
.. code-block:: text
- $ pre-commit install
+ $ pre-commit install --install-hooks
+.. _GitHub account: https://github.com/join
.. _latest version of git: https://git-scm.com/downloads
.. _username: https://docs.github.com/en/github/using-git/setting-your-username-in-git
.. _email: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address
-.. _GitHub account: https://github.com/join
.. _Fork: https://github.com/pallets/flask/fork
.. _Clone: https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#step-2-create-a-local-clone-of-your-fork
+.. _start coding:
Start coding
~~~~~~~~~~~~
-- Create a branch to identify the issue you would like to work on. If
- you're submitting a bug or documentation fix, branch off of the
- latest ".x" branch.
+- Create a branch to identify the issue you would like to work on. If you're
+ submitting a bug or documentation fix, branch off of the latest ".x" branch.
.. code-block:: text
$ git fetch origin
$ git checkout -b your-branch-name origin/2.0.x
- If you're submitting a feature addition or change, branch off of the
- "main" branch.
+ If you're submitting a feature addition or change, branch off of the "main" branch.
.. code-block:: text
$ git fetch origin
$ git checkout -b your-branch-name origin/main
-- Using your favorite editor, make your changes,
- `committing as you go`_.
-- Include tests that cover any code changes you make. Make sure the
- test fails without your patch. Run the tests as described below.
-- Push your commits to your fork on GitHub and
- `create a pull request`_. Link to the issue being addressed with
- ``fixes #123`` in the pull request.
+- Using your favorite editor, make your changes, `committing as you go`_.
+
+ - If you are in a codespace, you will be prompted to `create a fork`_ the first
+ time you make a commit. Enter ``Y`` to continue.
+
+- Include tests that cover any code changes you make. Make sure the test fails without
+ your patch. Run the tests as described below.
+- Push your commits to your fork on GitHub and `create a pull request`_. Link to the
+ issue being addressed with ``fixes #123`` in the pull request description.
.. code-block:: text
- $ git push --set-upstream fork your-branch-name
+ $ git push --set-upstream origin your-branch-name
-.. _committing as you go: https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes
+.. _committing as you go: https://afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes
+.. _create a fork: https://docs.github.com/en/codespaces/developing-in-codespaces/using-source-control-in-your-codespace#about-automatic-forking
.. _create a pull request: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request
+.. _Running the tests:
Running the tests
~~~~~~~~~~~~~~~~~
@@ -201,6 +209,9 @@ Generating a report of lines that do not have test coverage can indicate
where to start contributing. Run ``pytest`` using ``coverage`` and
generate a report.
+If you are using GitHub Codespaces, ``coverage`` is already installed
+so you can skip the installation command.
+
.. code-block:: text
$ pip install coverage
diff --git a/README.rst b/README.rst
index 3d1c3882af..4b7ff42ad1 100644
--- a/README.rst
+++ b/README.rst
@@ -77,6 +77,4 @@ Links
- PyPI Releases: https://pypi.org/project/Flask/
- Source Code: https://github.com/pallets/flask/
- Issue Tracker: https://github.com/pallets/flask/issues/
-- Website: https://palletsprojects.com/p/flask/
-- Twitter: https://twitter.com/PalletsTeam
- Chat: https://discord.gg/pallets
diff --git a/artwork/LICENSE.rst b/artwork/LICENSE.rst
deleted file mode 100644
index 99c58a2127..0000000000
--- a/artwork/LICENSE.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright 2010 Pallets
-
-This logo or a modified version may be used by anyone to refer to the
-Flask project, but does not indicate endorsement by the project.
-
-Redistribution and use in source (SVG) and binary (renders in PNG, etc.)
-forms, with or without modification, are permitted provided that the
-following conditions are met:
-
-1. Redistributions of source code must retain the above copyright
- notice and this list of conditions.
-
-2. Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-We would appreciate that you make the image a link to
-https://palletsprojects.com/p/flask/ if you use it in a medium that
-supports links.
diff --git a/artwork/logo-full.svg b/artwork/logo-full.svg
deleted file mode 100644
index 8c0748a286..0000000000
--- a/artwork/logo-full.svg
+++ /dev/null
@@ -1,290 +0,0 @@
-
-
-
-
diff --git a/artwork/logo-lineart.svg b/artwork/logo-lineart.svg
deleted file mode 100644
index 615260dce6..0000000000
--- a/artwork/logo-lineart.svg
+++ /dev/null
@@ -1,165 +0,0 @@
-
-
-
-
diff --git a/docs/_static/flask-horizontal.png b/docs/_static/flask-horizontal.png
new file mode 100644
index 0000000000..a0df2c6109
Binary files /dev/null and b/docs/_static/flask-horizontal.png differ
diff --git a/docs/_static/flask-icon.png b/docs/_static/flask-icon.png
deleted file mode 100644
index 55cb8478ef..0000000000
Binary files a/docs/_static/flask-icon.png and /dev/null differ
diff --git a/docs/_static/flask-logo.png b/docs/_static/flask-logo.png
deleted file mode 100644
index ce23606157..0000000000
Binary files a/docs/_static/flask-logo.png and /dev/null differ
diff --git a/docs/_static/flask-vertical.png b/docs/_static/flask-vertical.png
new file mode 100644
index 0000000000..d1fd149907
Binary files /dev/null and b/docs/_static/flask-vertical.png differ
diff --git a/docs/_static/no.png b/docs/_static/no.png
deleted file mode 100644
index 644c3f70f9..0000000000
Binary files a/docs/_static/no.png and /dev/null differ
diff --git a/docs/_static/pycharm-run-config.png b/docs/_static/pycharm-run-config.png
index 3f78915796..ad025545a7 100644
Binary files a/docs/_static/pycharm-run-config.png and b/docs/_static/pycharm-run-config.png differ
diff --git a/docs/_static/shortcut-icon.png b/docs/_static/shortcut-icon.png
new file mode 100644
index 0000000000..4d3e6c3774
Binary files /dev/null and b/docs/_static/shortcut-icon.png differ
diff --git a/docs/_static/yes.png b/docs/_static/yes.png
deleted file mode 100644
index 56917ab2c6..0000000000
Binary files a/docs/_static/yes.png and /dev/null differ
diff --git a/docs/api.rst b/docs/api.rst
index 880720b408..043beb0775 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -3,7 +3,7 @@ API
.. module:: flask
-This part of the documentation covers all the interfaces of Flask. For
+This part of the documentation covers all the interfaces of Flask. For
parts where Flask depends on external libraries, we document the most
important right here and provide links to the canonical documentation.
@@ -34,12 +34,12 @@ Incoming Request Data
.. attribute:: request
To access incoming request data, you can use the global `request`
- object. Flask parses incoming request data for you and gives you
- access to it through that global object. Internally Flask makes
+ object. Flask parses incoming request data for you and gives you
+ access to it through that global object. Internally Flask makes
sure that you always get the correct data for the active thread if you
are in a multithreaded environment.
- This is a proxy. See :ref:`notes-on-proxies` for more information.
+ This is a proxy. See :ref:`notes-on-proxies` for more information.
The request object is an instance of a :class:`~flask.Request`.
@@ -69,7 +69,7 @@ To access the current session you can use the :class:`session` object:
The session object works pretty much like an ordinary dict, with the
difference that it keeps track of modifications.
- This is a proxy. See :ref:`notes-on-proxies` for more information.
+ This is a proxy. See :ref:`notes-on-proxies` for more information.
The following attributes are interesting:
@@ -79,10 +79,10 @@ To access the current session you can use the :class:`session` object:
.. attribute:: modified
- ``True`` if the session object detected a modification. Be advised
+ ``True`` if the session object detected a modification. Be advised
that modifications on mutable structures are not picked up
automatically, in that situation you have to explicitly set the
- attribute to ``True`` yourself. Here an example::
+ attribute to ``True`` yourself. Here an example::
# this change is not picked up because a mutable object (here
# a list) is changed.
@@ -93,8 +93,8 @@ To access the current session you can use the :class:`session` object:
.. attribute:: permanent
If set to ``True`` the session lives for
- :attr:`~flask.Flask.permanent_session_lifetime` seconds. The
- default is 31 days. If set to ``False`` (which is the default) the
+ :attr:`~flask.Flask.permanent_session_lifetime` seconds. The
+ default is 31 days. If set to ``False`` (which is the default) the
session will be deleted when the user closes the browser.
@@ -155,9 +155,9 @@ Application Globals
To share data that is valid for one request only from one function to
another, a global variable is not good enough because it would break in
-threaded environments. Flask provides you with a special object that
+threaded environments. Flask provides you with a special object that
ensures it is only valid for the active request and that will return
-different values for each request. In a nutshell: it does the right
+different values for each request. In a nutshell: it does the right
thing, like it does for :class:`request` and :class:`session`.
.. data:: g
@@ -217,10 +217,6 @@ Useful Functions and Classes
.. autofunction:: send_from_directory
-.. autofunction:: escape
-
-.. autoclass:: Markup
- :members: escape, unescape, striptags
Message Flashing
----------------
@@ -248,7 +244,7 @@ HTML ``
@@ -270,12 +266,6 @@ HTML ``
+