Commit graph

4238 commits

Author SHA1 Message Date
David Lord
7bed6e8732 update click minimum version 2021-05-11 14:55:09 -07:00
David Lord
aa11c44e62 start version 2.1.0.dev0 2021-05-11 14:48:48 -07:00
David Lord
269e8782ac start version 2.0.1.dev0 2021-05-11 14:48:08 -07:00
David Lord
3bab774a60 Merge pull request #4007 from pallets/release-2.0.0
Release 2.0.0
2021-05-11 14:43:42 -07:00
David Lord
a55e2500ab release version 2.0.0 2021-05-11 14:41:52 -07:00
David Lord
f41f45a3cd update type annotations 2021-05-11 14:41:52 -07:00
David Lord
73ee8512f1 update pallets projects minimum versions 2021-05-11 14:33:44 -07:00
David Lord
5b491eb316 update requirements 2021-05-11 14:28:21 -07:00
David Lord
32ce238585 Merge pull request #4005 from pallets/pre-commit-ci-schedule
update pre-commit monthly
2021-05-11 07:07:12 -07:00
David Lord
d6a44e3c42 update pre-commit monthly 2021-05-11 06:57:24 -07:00
David Lord
1e7847008f Merge pull request #3999 from greyli/improve-cli-docs
Improve CLI docs
2021-05-10 23:50:04 -07:00
Grey Li
c0c0518b50 Improve the wording of using FLASK_APP 2021-05-10 22:58:19 -07:00
David Lord
662043e2c6 Merge pull request #4003 from pallets/autodoc-typehints
show type hints in description
2021-05-10 22:51:02 -07:00
David Lord
c4cdac59f5 show type hints in description 2021-05-10 22:45:42 -07:00
David Lord
4c0b0e1385 Merge pull request #4002 from pallets/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-05-10 13:41:53 -07:00
pre-commit-ci[bot]
34e2fa6c6d [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.14.0 → v2.15.0](https://github.com/asottile/pyupgrade/compare/v2.14.0...v2.15.0)
- [github.com/psf/black: 21.4b2 → 21.5b1](https://github.com/psf/black/compare/21.4b2...21.5b1)
- [github.com/PyCQA/flake8: 3.9.1 → 3.9.2](https://github.com/PyCQA/flake8/compare/3.9.1...3.9.2)
2021-05-10 20:25:42 +00:00
David Lord
a04b975b27 Merge pull request #3992 from pallets/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-05-03 11:13:36 -07:00
pre-commit-ci[bot]
680a343641 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.13.0 → v2.14.0](https://github.com/asottile/pyupgrade/compare/v2.13.0...v2.14.0)
- [github.com/psf/black: 21.4b0 → 21.4b2](https://github.com/psf/black/compare/21.4b0...21.4b2)
2021-05-03 17:21:04 +00:00
David Lord
76a49bb783 Merge pull request #3991 from pallets/release-2.0.0rc2
release version 2.0.0rc2
2021-05-03 07:13:43 -07:00
David Lord
622fc70130 release version 2.0.0rc2 2021-05-03 07:02:42 -07:00
David Lord
6383ee9a56 Merge pull request #3989 from pgjones/async
Async improvements
2021-05-03 06:23:00 -07:00
pgjones
8c9c931f28 Remove the async helper method
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.
2021-05-03 06:18:41 -07:00
pgjones
271eede7ad Simplify the async handling code
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.
2021-05-03 06:15:39 -07:00
pgjones
95b7ab919f Remove context copying from run_async function
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.
2021-05-03 06:15:39 -07:00
Grey Li
b17ebeba4f Merge pull request #3976 from greyli/update-changelog
Update changelog for #3932
2021-05-03 08:09:40 +08:00
Joshua Bronson
78722f5f7b Minor docs fixes. (#3988) 2021-05-02 16:05:08 -04:00
David Lord
fbdbe7d369 Merge pull request #3986 from pallets/dependabot/pip/python-dotenv-0.17.1
Bump python-dotenv from 0.17.0 to 0.17.1
2021-05-01 05:08:44 -07:00
dependabot[bot]
bd6bfdf75c Bump python-dotenv from 0.17.0 to 0.17.1
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](https://github.com/theskumar/python-dotenv/compare/v0.17.0...v0.17.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-01 08:02:41 +00:00
David Lord
f7fe5cb37b Merge pull request #3985 from greyli/async-note
Add tips for using async on Windows on Python 3.8
2021-04-29 10:11:09 -07:00
Grey Li
62233720d4 Add tips for using async on Windows on Python 3.8 2021-04-29 10:59:26 +08:00
dependabot[bot]
80d283db2c Merge pull request #3984 from pallets/dependabot/pip/pre-commit-2.12.1 2021-04-28 20:59:01 +00:00
dependabot[bot]
2c937bcb04 Bump pre-commit from 2.12.0 to 2.12.1
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](https://github.com/pre-commit/pre-commit/compare/v2.12.0...v2.12.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-28 20:54:53 +00:00
David Lord
eec0cc51ec Merge pull request #3983 from pallets/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-04-28 13:53:29 -07:00
dependabot-preview[bot]
88672da5d9 Upgrade to GitHub-native Dependabot 2021-04-28 16:46:45 +00:00
Grey Li
de8fa20fac Update changelog for #3932 2021-04-28 14:20:44 +08:00
David Lord
6b8b3488de Merge pull request #3972 from ThiefMaster/click-7
Allow using Click 7 with a DeprecationWarning
2021-04-27 07:58:25 -07:00
David Lord
c1d7c8babc Merge pull request #3971 from ThiefMaster/get-root-path
Move get_root_path back to flask.helpers
2021-04-27 07:55:26 -07:00
Adrian Moennich
d235ab0faa Allow using Click 7 with a DeprecationWarning
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.
2021-04-27 16:45:06 +02:00
Adrian Moennich
d12bc54013 Move get_root_path back to flask.helpers
Many libraries use it so the move is somewhat disruptive.
2021-04-27 16:42:16 +02:00
David Lord
2394ce4208 Merge pull request #3973 from pgjones/typing 2021-04-27 07:32:10 -07:00
Grey Li
2978d50291 Merge pull request #3974 from pallets/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-04-27 09:47:43 +08:00
pre-commit-ci[bot]
0a398bb28c [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.12.0 → v2.13.0](https://github.com/asottile/pyupgrade/compare/v2.12.0...v2.13.0)
- [github.com/asottile/reorder_python_imports: v2.4.0 → v2.5.0](https://github.com/asottile/reorder_python_imports/compare/v2.4.0...v2.5.0)
- [github.com/psf/black: 20.8b1 → 21.4b0](https://github.com/psf/black/compare/20.8b1...21.4b0)
2021-04-26 17:21:56 +00:00
pgjones
fa5c99ef4f Add initial type hints
This should make it easier for users to correctly use Flask. The hints
are from Quart.
2021-04-26 17:29:53 +01:00
pgjones
943009c8ec Initial typing support
This enables type checking in CI and marks the project as typed.
2021-04-26 17:20:24 +01:00
David Lord
cba97ff101 changelog for bumped pallets versions 2021-04-24 07:31:16 -07:00
Grey Li
017ea35e27 Fix typo in issue template 2021-04-22 20:34:55 +08:00
David Lord
3b143eb64a Merge pull request #3967 from pgjones/docs 2021-04-17 07:34:56 -07:00
pgjones
65cffeba07 Update documentation on asyncio background tasks
This has been an early question from users, so best to explain.
2021-04-17 15:13:33 +01:00
pgjones
bc1fea4e3a Update the docs on serving with ASGI
Whilst it has been possible to serve via an ASGI server for a while
(using WSGI to ASGI middleware/adapters) it hasn't added much. Now
though it makes sense to recommend the asgiref adapter as it
integrates with the same event loop used for async route handlers
etc...
2021-04-17 11:30:22 +01:00
David Lord
aee4ae26ba Merge pull request #3965 from pallets/release-2.0.0rc1
Release 2.0.0rc1
2021-04-16 08:52:35 -07:00