Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli shouldn't mess with sys.argv #3022

Closed
davidism opened this issue Dec 8, 2018 · 4 comments

Comments

@davidism
Copy link
Member

commented Dec 8, 2018

Just merged pallets/werkzeug#1416 so Werkzeug's reloader detects python -m module correctly. All of flask.cli.main() can be replaced with:

def main(as_module=False):
    cli.main(prog_name="python -m flask" if as_module else None)

Need to wait until Werkzeug 0.15 has been out for a bit before we can bump Flask's min version.

@davidism davidism added the cli label Dec 8, 2018

@davidism davidism added this to the 1.1 milestone Mar 20, 2019

@seawolf42

This comment has been minimized.

Copy link
Contributor

commented May 6, 2019

picking up this task

@EtiennePelletier

This comment has been minimized.

Copy link
Contributor

commented May 6, 2019

PR #3181 updates Werkzeug to >=0.15, so once merged I'll take care of this ticket.

@seawolf42

This comment has been minimized.

Copy link
Contributor

commented May 6, 2019

@EtiennePelletier if you're going to do it, you don't need to wait for the other to be merged, but you should reference that PR (using the # reference like above) in the new PR so that they see the dependency when they review this one.

@EtiennePelletier

This comment has been minimized.

Copy link
Contributor

commented May 6, 2019

Alright! I just wanted to avoid bumping Werkzeug's version in setup.py again since master is currently referencing 0.14. I'll leave it as is and explicitly mention it in the PR.

EtiennePelletier added a commit to EtiennePelletier/flask that referenced this issue May 6, 2019

Simplify flask.cli.main
Werkzeug>=0.15's reloader now properly detects `python -m module`.
Fixes pallets#3022

davidism added a commit to EtiennePelletier/flask that referenced this issue May 19, 2019

Simplify flask.cli.main
Werkzeug>=0.15's reloader now properly detects `python -m module`.
Fixes pallets#3022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.