Merge pull request #3972 from ThiefMaster/click-7

Allow using Click 7 with a DeprecationWarning
This commit is contained in:
David Lord 2021-04-27 07:58:25 -07:00 committed by GitHub
commit 77db3d5ede
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 3 deletions

View file

@ -979,6 +979,13 @@ debug mode.
def main() -> None:
if int(click.__version__[0]) < 8:
warnings.warn(
"Using the `flask` cli with Click 7 is deprecated and"
" will not be supported starting with Flask 2.1."
" Please upgrade to Click 8 as soon as possible.",
DeprecationWarning,
)
# TODO omit sys.argv once https://github.com/pallets/click/issues/536 is fixed
cli.main(args=sys.argv[1:])