From c478e5d52f4985a9a58f1ac1d229b47e9f6fe24f Mon Sep 17 00:00:00 2001 From: David Lord Date: Wed, 10 Jul 2019 11:45:20 -0700 Subject: [PATCH] pass sys.argv to flask cli --- CHANGES.rst | 9 +++++++++ src/flask/__init__.py | 2 +- src/flask/cli.py | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index dddddbdc..c0313eb7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,14 @@ .. currentmodule:: flask +Version 1.1.2 +------------- + +Unreleased + +- Work around an issue when running the ``flask`` command with an + external debugger on Windows. :issue:`3297` + + Version 1.1.1 ------------- diff --git a/src/flask/__init__.py b/src/flask/__init__.py index 687475bc..d0e105d5 100644 --- a/src/flask/__init__.py +++ b/src/flask/__init__.py @@ -57,4 +57,4 @@ from .signals import template_rendered from .templating import render_template from .templating import render_template_string -__version__ = "1.1.1" +__version__ = "1.1.2.dev" diff --git a/src/flask/cli.py b/src/flask/cli.py index 11585455..c09b2cd0 100644 --- a/src/flask/cli.py +++ b/src/flask/cli.py @@ -963,7 +963,8 @@ debug mode. def main(as_module=False): - cli.main(prog_name="python -m flask" if as_module else None) + # TODO omit sys.argv once https://github.com/pallets/click/issues/536 is fixed + cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None) if __name__ == "__main__":