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 · Fixed by #3185
Closed

cli shouldn't mess with sys.argv #3022

davidism opened this issue Dec 8, 2018 · 4 comments · Fixed by #3185
Labels
Milestone

Comments

@davidism
Copy link
Member

davidism 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
Copy link
Contributor

picking up this task

@EtiennePelletier
Copy link
Contributor

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

@seawolf42
Copy link
Contributor

@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
Copy link
Contributor

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
Werkzeug>=0.15's reloader now properly detects `python -m module`.
Fixes pallets#3022
davidism pushed a commit to EtiennePelletier/flask that referenced this issue May 19, 2019
Werkzeug>=0.15's reloader now properly detects `python -m module`.
Fixes pallets#3022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants