mirror of https://github.com/pallets/flask.git
Compare commits
5 Commits
3bf8224fe1
...
75a8327cfd
| Author | SHA1 | Date |
|---|---|---|
|
|
75a8327cfd | |
|
|
165af0a090 | |
|
|
235c52fa10 | |
|
|
959052fb8d | |
|
|
5b525e9797 |
|
|
@ -3,9 +3,9 @@ contact_links:
|
|||
- name: Security issue
|
||||
url: https://github.com/pallets/flask/security/advisories/new
|
||||
about: Do not report security issues publicly. Create a private advisory.
|
||||
- name: Questions
|
||||
- name: Questions on GitHub Discussions
|
||||
url: https://github.com/pallets/flask/discussions/
|
||||
about: Ask questions about your own code on the Discussions tab.
|
||||
- name: Questions on
|
||||
- name: Questions on Discord
|
||||
url: https://discord.gg/pallets
|
||||
about: Ask questions about your own code on our Discord chat.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
hash: ${{ steps.hash.outputs.hash }}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||
with:
|
||||
python-version: '3.x'
|
||||
cache: pip
|
||||
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
- name: generate hash
|
||||
id: hash
|
||||
run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
|
||||
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
path: ./dist
|
||||
provenance:
|
||||
|
|
@ -33,7 +33,7 @@ jobs:
|
|||
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@v2.0.0
|
||||
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
|
||||
with:
|
||||
base64-subjects: ${{ needs.build.outputs.hash }}
|
||||
create-release:
|
||||
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
- name: create release
|
||||
run: >
|
||||
gh release create --draft --repo ${{ github.repository }}
|
||||
|
|
@ -63,7 +63,7 @@ jobs:
|
|||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
- uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2
|
||||
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
|
||||
with:
|
||||
packages-dir: artifact/
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
- {name: Development Versions, python: '3.9', tox: py-dev}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
allow-prereleases: true
|
||||
|
|
@ -37,13 +37,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
||||
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||
with:
|
||||
python-version: '3.x'
|
||||
cache: pip
|
||||
cache-dependency-path: requirements*/*.txt
|
||||
- name: cache mypy
|
||||
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
||||
with:
|
||||
path: ./.mypy_cache
|
||||
key: mypy|${{ hashFiles('pyproject.toml') }}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.7.3
|
||||
rev: v0.11.2
|
||||
hooks:
|
||||
- id: ruff
|
||||
- id: ruff-format
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@ python:
|
|||
- method: pip
|
||||
path: .
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
builder: dirhtml
|
||||
fail_on_warning: true
|
||||
|
|
|
|||
|
|
@ -1,76 +0,0 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at report@palletsprojects.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
238
CONTRIBUTING.rst
238
CONTRIBUTING.rst
|
|
@ -1,238 +0,0 @@
|
|||
How to contribute to Flask
|
||||
==========================
|
||||
|
||||
Thank you for considering contributing to Flask!
|
||||
|
||||
|
||||
Support questions
|
||||
-----------------
|
||||
|
||||
Please don't use the issue tracker for this. The issue tracker is a tool
|
||||
to address bugs and feature requests in Flask itself. Use one of the
|
||||
following resources for questions about using Flask or issues with your
|
||||
own code:
|
||||
|
||||
- The ``#questions`` channel on our Discord chat:
|
||||
https://discord.gg/pallets
|
||||
- Ask on `Stack Overflow`_. Search with Google first using:
|
||||
``site:stackoverflow.com flask {search term, exception message, etc.}``
|
||||
- Ask on our `GitHub Discussions`_ for long term discussion or larger
|
||||
questions.
|
||||
|
||||
.. _Stack Overflow: https://stackoverflow.com/questions/tagged/flask?tab=Frequent
|
||||
.. _GitHub Discussions: https://github.com/pallets/flask/discussions
|
||||
|
||||
|
||||
Reporting issues
|
||||
----------------
|
||||
|
||||
Include the following information in your post:
|
||||
|
||||
- Describe what you expected to happen.
|
||||
- If possible, include a `minimal reproducible example`_ to help us
|
||||
identify the issue. This also helps check that the issue is not with
|
||||
your own code.
|
||||
- Describe what actually happened. Include the full traceback if there
|
||||
was an exception.
|
||||
- List your Python and Flask versions. If possible, check if this
|
||||
issue is already fixed in the latest releases or the latest code in
|
||||
the repository.
|
||||
|
||||
.. _minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example
|
||||
|
||||
|
||||
Submitting patches
|
||||
------------------
|
||||
|
||||
If there is not an open issue for what you want to submit, prefer
|
||||
opening one for discussion before working on a PR. You can work on any
|
||||
issue that doesn't have an open PR linked to it or a maintainer assigned
|
||||
to it. These show up in the sidebar. No need to ask if you can work on
|
||||
an issue that interests you.
|
||||
|
||||
Include the following in your patch:
|
||||
|
||||
- Use `Black`_ to format your code. This and other tools will run
|
||||
automatically if you install `pre-commit`_ using the instructions
|
||||
below.
|
||||
- Include tests if your patch adds or changes code. Make sure the test
|
||||
fails without your patch.
|
||||
- Update any relevant docs pages and docstrings. Docs pages and
|
||||
docstrings should be wrapped at 72 characters.
|
||||
- Add an entry in ``CHANGES.rst``. Use the same style as other
|
||||
entries. Also include ``.. versionchanged::`` inline changelogs in
|
||||
relevant docstrings.
|
||||
|
||||
.. _Black: https://black.readthedocs.io
|
||||
.. _pre-commit: https://pre-commit.com
|
||||
|
||||
|
||||
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`_.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ git config --global user.name 'your name'
|
||||
$ git config --global user.email 'your email'
|
||||
|
||||
- Fork Flask to your GitHub account by clicking the `Fork`_ button.
|
||||
- `Clone`_ your fork locally, replacing ``your-username`` in the command below with
|
||||
your actual username.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ git clone https://github.com/your-username/flask
|
||||
$ cd flask
|
||||
|
||||
- Create a virtualenv. Use the latest version of Python.
|
||||
|
||||
- Linux/macOS
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ python3 -m venv .venv
|
||||
$ . .venv/bin/activate
|
||||
|
||||
- Windows
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
> py -3 -m venv .venv
|
||||
> .venv\Scripts\activate
|
||||
|
||||
- Install the development dependencies, then install Flask in editable mode.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ python -m pip install -U pip
|
||||
$ pip install -r requirements/dev.txt && pip install -e .
|
||||
|
||||
- Install the pre-commit hooks.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ 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
|
||||
.. _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.
|
||||
|
||||
.. 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.
|
||||
|
||||
.. 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`_.
|
||||
|
||||
- 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 origin your-branch-name
|
||||
|
||||
.. _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
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Run the basic test suite with pytest.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ pytest
|
||||
|
||||
This runs the tests for the current environment, which is usually
|
||||
sufficient. CI will run the full suite when you submit your pull
|
||||
request. You can run the full test suite with tox if you don't want to
|
||||
wait.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ tox
|
||||
|
||||
|
||||
Running test coverage
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
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
|
||||
$ coverage run -m pytest
|
||||
$ coverage html
|
||||
|
||||
Open ``htmlcov/index.html`` in your browser to explore the report.
|
||||
|
||||
Read more about `coverage <https://coverage.readthedocs.io>`__.
|
||||
|
||||
|
||||
Building the docs
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Build the docs in the ``docs`` directory using Sphinx.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
$ cd docs
|
||||
$ make html
|
||||
|
||||
Open ``_build/html/index.html`` in your browser to view the docs.
|
||||
|
||||
Read more about `Sphinx <https://www.sphinx-doc.org/en/stable/>`__.
|
||||
18
README.md
18
README.md
|
|
@ -1,9 +1,9 @@
|
|||
# Flask
|
||||
|
||||
Flask is a lightweight [WSGI][] web application framework. It is designed
|
||||
Flask is a lightweight [WSGI] web application framework. It is designed
|
||||
to make getting started quick and easy, with the ability to scale up to
|
||||
complex applications. It began as a simple wrapper around [Werkzeug][]
|
||||
and [Jinja][], and has become one of the most popular Python web
|
||||
complex applications. It began as a simple wrapper around [Werkzeug]
|
||||
and [Jinja], and has become one of the most popular Python web
|
||||
application frameworks.
|
||||
|
||||
Flask offers suggestions, but doesn't enforce any dependencies or
|
||||
|
|
@ -15,7 +15,6 @@ community that make adding new functionality easy.
|
|||
[Werkzeug]: https://werkzeug.palletsprojects.com/
|
||||
[Jinja]: https://jinja.palletsprojects.com/
|
||||
|
||||
|
||||
## A Simple Example
|
||||
|
||||
```python
|
||||
|
|
@ -34,12 +33,19 @@ $ flask run
|
|||
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
|
||||
## Donate
|
||||
|
||||
The Pallets organization develops and supports Flask and the libraries
|
||||
it uses. In order to grow the community of contributors and users, and
|
||||
allow the maintainers to devote more time to the projects, [please
|
||||
donate today][].
|
||||
donate today].
|
||||
|
||||
[please donate today]: https://palletsprojects.com/donate
|
||||
|
||||
## Contributing
|
||||
|
||||
See our [detailed contributing documentation][contrib] for many ways to
|
||||
contribute, including reporting issues, requesting features, asking or answering
|
||||
questions, and making PRs.
|
||||
|
||||
[contrib]: https://palletsprojects.com/contributing/
|
||||
|
|
|
|||
|
|
@ -1 +1,8 @@
|
|||
.. include:: ../CONTRIBUTING.rst
|
||||
Contributing
|
||||
============
|
||||
|
||||
See the Pallets `detailed contributing documentation <_contrib>`_ for many ways
|
||||
to contribute, including reporting issues, requesting features, asking or
|
||||
answering questions, and making PRs.
|
||||
|
||||
.. _contrib: https://palletsprojects.com/contributing/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ asgiref==3.8.1
|
|||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/tests.txt
|
||||
# -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
babel==2.16.0
|
||||
babel==2.17.0
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
cachetools==5.5.0
|
||||
cachetools==5.5.2
|
||||
# via tox
|
||||
certifi==2024.8.30
|
||||
certifi==2025.1.31
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# requests
|
||||
|
|
@ -30,13 +30,13 @@ cfgv==3.4.0
|
|||
# via pre-commit
|
||||
chardet==5.2.0
|
||||
# via tox
|
||||
charset-normalizer==3.4.0
|
||||
charset-normalizer==3.4.1
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# requests
|
||||
colorama==0.4.6
|
||||
# via tox
|
||||
cryptography==43.0.3
|
||||
cryptography==44.0.2
|
||||
# via -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
distlib==0.3.9
|
||||
# via virtualenv
|
||||
|
|
@ -45,11 +45,11 @@ docutils==0.21.2
|
|||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
# sphinx-tabs
|
||||
filelock==3.16.1
|
||||
filelock==3.18.0
|
||||
# via
|
||||
# tox
|
||||
# virtualenv
|
||||
identify==2.6.2
|
||||
identify==2.6.9
|
||||
# via pre-commit
|
||||
idna==3.10
|
||||
# via
|
||||
|
|
@ -59,12 +59,12 @@ imagesize==1.4.1
|
|||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
iniconfig==2.0.0
|
||||
iniconfig==2.1.0
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/tests.txt
|
||||
# -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
# pytest
|
||||
jinja2==3.1.4
|
||||
jinja2==3.1.6
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
|
|
@ -72,7 +72,7 @@ markupsafe==3.0.2
|
|||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# jinja2
|
||||
mypy==1.13.0
|
||||
mypy==1.15.0
|
||||
# via -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
mypy-extensions==1.0.0
|
||||
# via
|
||||
|
|
@ -95,7 +95,7 @@ packaging==24.2
|
|||
# tox
|
||||
pallets-sphinx-themes==2.3.0
|
||||
# via -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
platformdirs==4.3.6
|
||||
platformdirs==4.3.7
|
||||
# via
|
||||
# tox
|
||||
# virtualenv
|
||||
|
|
@ -105,26 +105,26 @@ pluggy==1.5.0
|
|||
# -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
# pytest
|
||||
# tox
|
||||
pre-commit==4.0.1
|
||||
pre-commit==4.2.0
|
||||
# via -r dev.in
|
||||
pycparser==2.22
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
# cffi
|
||||
pygments==2.18.0
|
||||
pygments==2.19.1
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
# sphinx-tabs
|
||||
pyproject-api==1.8.0
|
||||
pyproject-api==1.9.0
|
||||
# via tox
|
||||
pyright==1.1.389
|
||||
pyright==1.1.398
|
||||
# via -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
pytest==8.3.3
|
||||
pytest==8.3.5
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/tests.txt
|
||||
# -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
python-dotenv==1.0.1
|
||||
python-dotenv==1.1.0
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/tests.txt
|
||||
# -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
|
|
@ -134,18 +134,22 @@ requests==2.32.3
|
|||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
roman-numerals-py==3.1.0
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
snowballstemmer==2.2.0
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
sphinx==8.1.3
|
||||
sphinx==8.2.3
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# pallets-sphinx-themes
|
||||
# sphinx-notfound-page
|
||||
# sphinx-tabs
|
||||
# sphinxcontrib-log-cabinet
|
||||
sphinx-notfound-page==1.0.4
|
||||
sphinx-notfound-page==1.1.0
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# pallets-sphinx-themes
|
||||
|
|
@ -177,22 +181,22 @@ sphinxcontrib-serializinghtml==2.0.0
|
|||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# sphinx
|
||||
tox==4.23.2
|
||||
tox==4.25.0
|
||||
# via -r dev.in
|
||||
types-contextvars==2.4.7.3
|
||||
# via -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
types-dataclasses==0.6.6
|
||||
# via -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
typing-extensions==4.12.2
|
||||
typing-extensions==4.13.0
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/typing.txt
|
||||
# mypy
|
||||
# pyright
|
||||
urllib3==2.2.3
|
||||
urllib3==2.3.0
|
||||
# via
|
||||
# -r /Users/david/Projects/flask/requirements/docs.txt
|
||||
# requests
|
||||
virtualenv==20.27.1
|
||||
virtualenv==20.29.3
|
||||
# via
|
||||
# pre-commit
|
||||
# tox
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
#
|
||||
alabaster==1.0.0
|
||||
# via sphinx
|
||||
babel==2.16.0
|
||||
babel==2.17.0
|
||||
# via sphinx
|
||||
certifi==2024.8.30
|
||||
certifi==2025.1.31
|
||||
# via requests
|
||||
charset-normalizer==3.4.0
|
||||
charset-normalizer==3.4.1
|
||||
# via requests
|
||||
docutils==0.21.2
|
||||
# via
|
||||
|
|
@ -20,7 +20,7 @@ idna==3.10
|
|||
# via requests
|
||||
imagesize==1.4.1
|
||||
# via sphinx
|
||||
jinja2==3.1.4
|
||||
jinja2==3.1.6
|
||||
# via sphinx
|
||||
markupsafe==3.0.2
|
||||
# via jinja2
|
||||
|
|
@ -30,22 +30,24 @@ packaging==24.2
|
|||
# sphinx
|
||||
pallets-sphinx-themes==2.3.0
|
||||
# via -r docs.in
|
||||
pygments==2.18.0
|
||||
pygments==2.19.1
|
||||
# via
|
||||
# sphinx
|
||||
# sphinx-tabs
|
||||
requests==2.32.3
|
||||
# via sphinx
|
||||
roman-numerals-py==3.1.0
|
||||
# via sphinx
|
||||
snowballstemmer==2.2.0
|
||||
# via sphinx
|
||||
sphinx==8.1.3
|
||||
sphinx==8.2.3
|
||||
# via
|
||||
# -r docs.in
|
||||
# pallets-sphinx-themes
|
||||
# sphinx-notfound-page
|
||||
# sphinx-tabs
|
||||
# sphinxcontrib-log-cabinet
|
||||
sphinx-notfound-page==1.0.4
|
||||
sphinx-notfound-page==1.1.0
|
||||
# via pallets-sphinx-themes
|
||||
sphinx-tabs==3.4.7
|
||||
# via -r docs.in
|
||||
|
|
@ -63,5 +65,5 @@ sphinxcontrib-qthelp==2.0.0
|
|||
# via sphinx
|
||||
sphinxcontrib-serializinghtml==2.0.0
|
||||
# via sphinx
|
||||
urllib3==2.2.3
|
||||
urllib3==2.3.0
|
||||
# via requests
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
#
|
||||
asgiref==3.8.1
|
||||
# via -r tests.in
|
||||
iniconfig==2.0.0
|
||||
iniconfig==2.1.0
|
||||
# via pytest
|
||||
packaging==24.2
|
||||
# via pytest
|
||||
pluggy==1.5.0
|
||||
# via pytest
|
||||
pytest==8.3.3
|
||||
pytest==8.3.5
|
||||
# via -r tests.in
|
||||
python-dotenv==1.0.1
|
||||
python-dotenv==1.1.0
|
||||
# via -r tests.in
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ asgiref==3.8.1
|
|||
# via -r typing.in
|
||||
cffi==1.17.1
|
||||
# via cryptography
|
||||
cryptography==43.0.3
|
||||
cryptography==44.0.2
|
||||
# via -r typing.in
|
||||
iniconfig==2.0.0
|
||||
iniconfig==2.1.0
|
||||
# via pytest
|
||||
mypy==1.13.0
|
||||
mypy==1.15.0
|
||||
# via -r typing.in
|
||||
mypy-extensions==1.0.0
|
||||
# via mypy
|
||||
|
|
@ -24,17 +24,17 @@ pluggy==1.5.0
|
|||
# via pytest
|
||||
pycparser==2.22
|
||||
# via cffi
|
||||
pyright==1.1.389
|
||||
pyright==1.1.398
|
||||
# via -r typing.in
|
||||
pytest==8.3.3
|
||||
pytest==8.3.5
|
||||
# via -r typing.in
|
||||
python-dotenv==1.0.1
|
||||
python-dotenv==1.1.0
|
||||
# via -r typing.in
|
||||
types-contextvars==2.4.7.3
|
||||
# via -r typing.in
|
||||
types-dataclasses==0.6.6
|
||||
# via -r typing.in
|
||||
typing-extensions==4.12.2
|
||||
typing-extensions==4.13.0
|
||||
# via
|
||||
# mypy
|
||||
# pyright
|
||||
|
|
|
|||
|
|
@ -265,9 +265,9 @@ class Flask(App):
|
|||
# For one, it might be created while the server is running (e.g. during
|
||||
# development). Also, Google App Engine stores static files somewhere
|
||||
if self.has_static_folder:
|
||||
assert (
|
||||
bool(static_host) == host_matching
|
||||
), "Invalid static_host/host_matching combination"
|
||||
assert bool(static_host) == host_matching, (
|
||||
"Invalid static_host/host_matching combination"
|
||||
)
|
||||
# Use a weakref to avoid creating a reference cycle between the app
|
||||
# and the view function (see #3761).
|
||||
self_ref = weakref.ref(self)
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@ class EnvironBuilder(werkzeug.test.EnvironBuilder):
|
|||
) -> None:
|
||||
assert not (base_url or subdomain or url_scheme) or (
|
||||
base_url is not None
|
||||
) != bool(
|
||||
subdomain or url_scheme
|
||||
), 'Cannot pass "subdomain" or "url_scheme" with "base_url".'
|
||||
) != bool(subdomain or url_scheme), (
|
||||
'Cannot pass "subdomain" or "url_scheme" with "base_url".'
|
||||
)
|
||||
|
||||
if base_url is None:
|
||||
http_host = app.config.get("SERVER_NAME") or "localhost"
|
||||
|
|
|
|||
Loading…
Reference in New Issue