From e2fe26218d49777a2b5fadc0691fb723cd871ab0 Mon Sep 17 00:00:00 2001 From: Dilan Coss Date: Wed, 20 Jun 2018 12:31:53 -0600 Subject: [PATCH] Werkzeug version imported in the global scope, rather than within the function --- flask/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask/cli.py b/flask/cli.py index e59017dd..a7ba20d1 100644 --- a/flask/cli.py +++ b/flask/cli.py @@ -21,6 +21,7 @@ import traceback from functools import update_wrapper from operator import attrgetter from threading import Lock, Thread +from werkzeug import __version__ as werkzeug_version import click from werkzeug.utils import import_string @@ -257,7 +258,6 @@ def locate_app(script_info, module_name, app_name, raise_if_not_found=True): def get_version(ctx, param, value): - from werkzeug import __version__ as werkzeug_version if not value or ctx.resilient_parsing: return message = 'Python %(python_version)s\nFlask %(version)s\nWerkzeug %(werkzeug_version)s'