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

create_app script_info argument incompatability between Flask versions #163

Open
rsyring opened this issue Jun 7, 2021 · 0 comments
Open

Comments

@rsyring
Copy link
Member

rsyring commented Jun 7, 2021

  File "/home/rsyring/projects/keg-src/keg/cli.py", line 64, in get_command
    info.load_app()
  File "/home/rsyring/projects/keg-src/.tox/py39-lowest/lib/python3.9/site-packages/flask/cli.py", line 381, in load_app
    app = call_factory(self, self.create_app)
  File "/home/rsyring/projects/keg-src/.tox/py39-lowest/lib/python3.9/site-packages/flask/cli.py", line 117, in call_factory
    return app_factory(script_info)
TypeError: create_app() takes 1 positional argument but 2 were given

That's the result in Flask 1.x if our create_app() doesn't have a positional argument for script info. But in 2.0 script_info support is deprecated and in 2.1 it's removed. This issue is just tracking this disconnect and if we get to only supporting Flask 2.0 plus, then we can cleanup some code in cli.py:CLILoader.create_app().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant