Commit graph

4313 commits

Author SHA1 Message Date
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
David Lord
c2459c1a9a release version 2.0.0rc1 2021-04-16 08:45:26 -07:00
David Lord
34ad92a379 update minimum install requirements 2021-04-16 08:45:04 -07:00
David Lord
7fab10de25 update deprecated pre-commit hook 2021-04-16 08:44:30 -07:00
David Lord
b2886b8872 update requirements 2021-04-16 08:44:18 -07:00
David Lord
d7d403f4f3 update pallets-sphinx-themes 2021-04-16 08:43:31 -07:00
David Lord
a37c949ff8 Merge remote-tracking branch 'origin/1.1.x' into release-2.0.0rc1 2021-04-16 08:37:56 -07:00
David Lord
93c618f4ef Merge pull request #3964 from pgjones/fix
Fix wrapped view function comparison
2021-04-16 06:28:53 -07:00
pgjones
2fe5f3d65c Fix wrapped view function comparison
Wrapped functions are not comparable, see
https://bugs.python.org/issue3564, therefore a marker is used to note
when the function has been sync wrapped to allow comparison with the
wrapped function instead.

This ensures that multiple route decorators work without raising
exceptions i.e.,

    @app.route("/")
    @app.route("/a")
    async def index():
        ...

works.
2021-04-16 12:34:51 +01:00
David Lord
3e6123f1cb Merge pull request #3963 from pallets/deprecate-helpers
deprecate `helpers.total_seconds`
2021-04-15 23:18:39 -07:00
David Lord
bbed217e2b remove _os_alt_seps 2021-04-15 23:14:53 -07:00
David Lord
96ea4be346 deprecate total_seconds 2021-04-15 23:14:53 -07:00
David Lord
b8c778f322 Merge pull request #3962 from pallets/cached-property
locked_cached_property subclasses Werkzeug's cached_property
2021-04-15 23:14:24 -07:00
David Lord
cdbbfda06e locked_cached_property subclasses cached_property 2021-04-15 23:07:28 -07:00
David Lord
d0076a527d consistent versions and deprecation messages 2021-04-15 15:58:24 -07:00
David Lord
41f4af7abf Merge pull request #3960 from pallets/shell-interactive-hook
shell calls sys.__interativehook__
2021-04-14 10:06:50 -07:00
David Lord
962b55b9b6 shell calls sys.__interativehook__
This will set up readline tab and history completion by default.
2021-04-14 10:01:32 -07:00
David Lord
08b192e4b7 Merge pull request #3923 from pgjones/nested
Nested blueprints
2021-04-14 09:30:48 -07:00
pgjones
257c7c5c2a Nested blueprints
This allows blueprints to be nested within blueprints via a new
Blueprint.register_blueprint method. This should provide a use case
that has been desired for the past ~10 years.

This works by setting the endpoint name to be the blueprint names,
from parent to child delimeted by "." and then iterating over the
blueprint names in reverse order in the app (from most specific to
most general). This means that the expectation of nesting a blueprint
within a nested blueprint is met.
2021-04-14 09:25:42 -07:00
David Lord
0db61ffbc9 Merge pull request #3957 from pgjones/fix
Bugfix iscoroutinefunction with Python3.7
2021-04-12 11:47:24 -07:00
pgjones
d89398bca9 Bugfix iscoroutinefunction with Python3.7
See this Python bug https://bugs.python.org/issue33261. The
iscoroutinefunction doesn't recognise partially wrapped coroutine
functions as coroutine functions - which is problematic as the
coroutines will be called as if they are sync, which results in
un-awaited coroutines.
2021-04-12 19:38:42 +01:00
David Lord
6e67b908cf Merge pull request #3958 from pallets/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2021-04-12 10:24:22 -07:00
pre-commit-ci[bot]
2e7c872a38 [pre-commit.ci] pre-commit autoupdate 2021-04-12 17:12:29 +00:00
David Lord
49ce03a85a Merge pull request #3412 from pgjones/async
Add `async` support
2021-04-07 05:32:20 -07:00
David Lord
3053c7a39d update async docs 2021-04-06 15:33:06 -07:00
David Lord
bb02c14740 skip async tests if asgiref isn't installed 2021-04-06 15:33:06 -07:00