Bump flask from 1.1.1 to 2.0.1
Bumps flask from 1.1.1 to 2.0.1.
Release notes
Sourced from flask's releases.
2.0.1
2.0.0
New major versions of all the core Pallets libraries, including Flask 2.0, have been released! :tada:
- Read the announcement on our blog: https://palletsprojects.com/blog/flask-2-0-released/
- Read the full list of changes: https://flask.palletsprojects.com/changes/#version-2-0-0
- Retweet the announcement on Twitter: https://twitter.com/PalletsTeam/status/1392266507296514048
- Follow our blog, Twitter, or GitHub to see future announcements.
This represents a significant amount of work, and there are quite a few changes. Be sure to carefully read the changelog, and use tools such as pip-compile and Dependabot to pin your dependencies and control your updates.
2.0.0rc2
2.0.0rc1
1.1.2
1.1.x is the last version to support Python 2.7 and Python 3.5. It also contains deprecation warnings for code that will be removed in 2.0. Please pay attention to deprecation warnings in your project!
This release contains a couple bug fixes.
Changelog
Sourced from flask's changelog.
Version 2.0.1
Released 2021-05-21
- Re-add the
filenameparameter insend_from_directory. Thefilenameparameter has been renamed topath, the old name is deprecated. 4019- Mark top-level names as exported so type checking understands imports in user projects. 4024
- Fix type annotation for
gand inform mypy that it is a namespace object that has arbitrary attributes. 4020- Fix some types that weren't available in Python 3.6.0. 4040
- Improve typing for
send_file,send_from_directory, andget_send_file_max_age. 4044, 4026- Show an error when a blueprint name contains a dot. The
.has special meaning, it is used to separate (nested) blueprint names and the endpoint name. 4041- Combine URL prefixes when nesting blueprints that were created with a
url_prefixvalue. 4037- Roll back a change to the order that URL matching was done. The URL is again matched after the session is loaded, so the session is available in custom URL converters. 4053
- Re-add deprecated
Config.from_json, which was accidentally removed early. 4078- Improve typing for some functions using
Callablein their type signatures, focusing on decorator factories. 4060- Nested blueprints are registered with their dotted name. This allows different blueprints with the same name to be nested at different locations. 4069
register_blueprinttakes anameoption to change the (pre-dotted) name the blueprint is registered with. This allows the same blueprint to be registered multiple times with unique names forurl_for. Registering the same blueprint with the same name multiple times is deprecated. 1091- Improve typing for
stream_with_context. 4052Version 2.0.0
Released 2021-05-11
- Drop support for Python 2 and 3.5.
- Bump minimum versions of other Pallets projects: Werkzeug >= 2, Jinja2 >= 3, MarkupSafe >= 2, ItsDangerous >= 2, Click >= 8. Be sure to check the change logs for each project. For better compatibility with other applications (e.g. Celery) that still require Click 7, there is no hard dependency on Click 8 yet, but using Click 7 will trigger a DeprecationWarning and Flask 2.1 will depend on Click 8.
- JSON support no longer uses simplejson. To use another JSON module, override
app.json_encoderandjson_decoder. 3555- The
encodingoption to JSON functions is deprecated. 3562- Passing
script_infoto app factory functions is deprecated. This was not portable outside theflaskcommand. Useclick.get_current_context().objif it's needed. 3552- The CLI shows better error messages when the app failed to load when looking up commands. 2741
- Add sessions.SessionInterface.get_cookie_name to allow setting the session cookie name dynamically. 3369
- Add Config.from_file to load config using arbitrary file loaders, such as
toml.loadorjson.load. Config.from_json is deprecated in favor of this. 3398- The
flask runcommand will only defer errors on reload. Errors present during the initial call will cause the server to exit with the traceback immediately. 3431- send_file raises a ValueError when passed an io object in text mode. Previously, it would respond with 200 OK and an empty file. 3358
- When using ad-hoc certificates, check for the cryptography library instead of PyOpenSSL. 3492
- When specifying a factory function with
FLASK_APP, keyword argument can be passed. 3553- When loading a
.envor.flaskenvfile, the current working directory is no longer changed to the location of the file. 3560- When returning a
(response, headers)tuple from a view, the headers replace rather than extend existing headers on the response. For example, this allows setting theContent-Typeforjsonify(). Useresponse.headers.extend()if extending is desired. 3628- The
Scaffoldclass provides a common API for theFlaskandBlueprintclasses.Blueprintinformation is stored in attributes just likeFlask, rather than opaque lambda functions. This is intended to improve consistency and maintainability. 3215- Include
samesiteandsecureoptions when removing the session cookie. 3726- Support passing a
pathlib.Pathtostatic_folder. 3579send_fileandsend_from_directoryare wrappers around the implementations inwerkzeug.utils. 3828- Some
send_fileparameters have been renamed, the old names are deprecated.attachment_filenameis renamed todownload_name.cache_timeoutis renamed tomax_age.add_etagsis renamed toetag. 3828, 3883send_filepassesdownload_nameeven ifas_attachment=Falseby usingContent-Disposition: inline. 3828send_filesetsconditional=Trueandmax_age=Noneby default.Cache-Controlis set tono-cacheifmax_ageis not set, otherwisepublic. This tells browsers to validate conditional requests instead of using a timed cache. 3828helpers.safe_joinis deprecated. Usewerkzeug.utils.safe_joininstead. 3828- The request context does route matching before opening the session. This could allow a session interface to change behavior based on
request.endpoint. 3776- Use Jinja's implementation of the
|tojsonfilter. 3881- Add route decorators for common HTTP methods. For example,
@app.post("/login")is a shortcut for@app.route("/login", methods=["POST"]). 3907- Support async views, error handlers, before and after request, and teardown functions. 3412
... (truncated)
Commits
bc90801Merge pull request #4091 from pallets/release-2.0.1fe2d744release version 2.0.19f606a8Merge pull request #4090 from pallets/stream-type7ab934fimprove typing forstream_with_context6b1c4e9Merge pull request #4087 from greyli/gitignore255461dMerge pull request #4074 from pgjones/bp3257b75Fix blueprint renaming714b0a4Fix blueprint self registration9409be6warn when registering same blueprint with same name63b3067changelog for blueprint registered name- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -
@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language -
@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language -
@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language -
@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language -
@dependabot badge mewill comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)