This enables type checking in CI and marks the project as typed.
This should make it easier for users to correctly use Flask. The hints are from Quart.
updates: - [github.com/asottile/pyupgrade: v2.12.0 → v2.13.0](asottile/pyupgrade@v2.12.0...v2.13.0) - [github.com/asottile/reorder_python_imports: v2.4.0 → v2.5.0](asottile/reorder-python-imports@v2.4.0...v2.5.0) - [github.com/psf/black: 20.8b1 → 21.4b0](psf/black@20.8b1...21.4b0)
[pre-commit.ci] pre-commit autoupdate
Many libraries use it so the move is somewhat disruptive.
As long as popular libraries (e.g. Celery) require click 7, depending on Click 8 in Flask makes it hard to test the latest version (and its other dependencies) in existing applications.
Move get_root_path back to flask.helpers
Allow using Click 7 with a DeprecationWarning
Upgrade to GitHub-native Dependabot
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.12.0 to 2.12.1. - [Release notes](https://github.com/pre-commit/pre-commit/releases) - [Changelog](https://github.com/pre-commit/pre-commit/blob/master/CHANGELOG.md) - [Commits](pre-commit/pre-commit@v2.12.0...v2.12.1) Signed-off-by: dependabot[bot] <support@github.com>
Add tips for using async on Windows on Python 3.8
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.17.0 to 0.17.1. - [Release notes](https://github.com/theskumar/python-dotenv/releases) - [Changelog](https://github.com/theskumar/python-dotenv/blob/master/CHANGELOG.md) - [Commits](theskumar/python-dotenv@v0.17.0...v0.17.1) Signed-off-by: dependabot[bot] <support@github.com>
…17.1 Bump python-dotenv from 0.17.0 to 0.17.1
Update changelog for #3932
This was required with the previous implementation of Werkzeug's locals which didn't persist across threads. However as the current implementation uses ContextVars which do persist the context copying is no longer required.
Firstly `run_sync` was a misleading name as it didn't run anything, instead I think `async_to_sync` is much clearer as it converts a coroutine function to a function. (Name stolen from asgiref). Secondly trying to run the ensure_sync during registration made the code more complex and brittle, e.g. the _flask_async_wrapper usage. This was done to pay any setup costs during registration rather than runtime, however this only saved a iscoroutne check. It allows the weirdness of the Blueprint and Scaffold ensure_sync methods to be removed. Switching to runtime ensure_sync usage provides a method for extensions to also support async, as now documented.
It is better to encourage users to utilise the app ensure_sync method (or the newely added async_to_sync method) so that any extensions that alter these methods take affect throughout the users code. With the helper method users code fix parts of their code to the asgiref async_to_sync ignoring any extension changes.
Async improvements
release version 2.0.0rc2
updates: - [github.com/asottile/pyupgrade: v2.13.0 → v2.14.0](asottile/pyupgrade@v2.13.0...v2.14.0) - [github.com/psf/black: 21.4b0 → 21.4b2](psf/black@21.4b0...21.4b2)
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/asottile/pyupgrade: v2.14.0 → v2.15.0](asottile/pyupgrade@v2.14.0...v2.15.0) - [github.com/psf/black: 21.4b2 → 21.5b1](psf/black@21.4b2...21.5b1) - [github.com/PyCQA/flake8: 3.9.1 → 3.9.2](PyCQA/flake8@3.9.1...3.9.2)
[pre-commit.ci] pre-commit autoupdate
show type hints in description
Improve CLI docs
update pre-commit monthly
Release 2.0.0
rename default branch in files
Otherwise docs builds are broken due to sphinx-doc/sphinx#9216
Install sphinx 4.1-dev from git
Added Google Cloud Run as a Hosted option
Add a deprecation warning for the old name
Re-add filename parameter for send_from_directory
Fix Fork link
Update typing
Fixes old print statement in signal and SQLite pages
Removes the extra `)` in: `print(secrets.token_hex())`
update requirements
test Python 3.10 and 3.11
`»` should be unescaped to `»` after `striptags`. Ref: https://flask.palletsprojects.com/en/2.0.x/api/#flask.Markup.striptags
Correct the actual unescaped character
test against minimum/dev versions of Pallets libraries
fix errorhandler type check
made ImportError verbose in cli.py
Co-authored-by: Evgeny Prigorodov <eprigorodov@gmail.com>
document session object lifetime
document "Adddress already in use" error
update requirements
The default JSONDecoder adds no extra functionality to `json.loads`, but using a custom class in the function call you off of an optimized fast path in pypy (it adds some overhead in cpython, but I think it's minimal). This change sticks with the default loading behaviour unless the user has specifically opted in to customising it. Co-authored-by: David Lord <davidism@gmail.com>
Only use a custom JSONDecoder if needed
Fix error message for `after_this_request` when used outside request context
Fix the command for checking port on macOS in server docs
(cherry picked from commit 93a7f08)
Adding Fish commands to docs
Remove X-XSS-Protection suggestion
updates: - [github.com/asottile/reorder_python_imports: v2.6.0 → v2.7.1](asottile/reorder-python-imports@v2.6.0...v2.7.1) - [github.com/psf/black: 21.12b0 → 22.1.0](psf/black@21.12b0...22.1.0)
[pre-commit.ci] pre-commit autoupdate
update requirements, stop using dependabot
rewrite testing docs
release version 2.0.3
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v2...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting
@dependabot ignore this major versionor@dependabot ignore this minor version.If you change your mind, just re-open this PR and I'll resolve any conflicts on it.