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

Support for flask 2.x? #1420

Closed
alanbchristie opened this issue Sep 1, 2021 · 13 comments
Closed

Support for flask 2.x? #1420

alanbchristie opened this issue Sep 1, 2021 · 13 comments

Comments

@alanbchristie
Copy link

alanbchristie commented Sep 1, 2021

Description

We have been using connexion 2.7.0 and flask 2.0.1 but recently encountered a Extra formData parameter(s) annotations not in spec fault. This appears to be fixed by #1374 as the fault does not occur when we use connexion 2.8.0 or 2.9.0. Annoyingly there's a new dependency restriction with connexion 2.8 (and 2.9) that explicitly rejects the use of Flask 2.

Is there a plan to support flask 2?

Expected behaviour

pip install -r requirements.txt to pass when using connexion and flask 2.0.1

Actual behaviour

Does not support flask 2, with this error: -

ERROR: Cannot install connexion==2.9.0 and flask==2.0.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested flask==2.0.1
    connexion 2.9.0 depends on flask<2 and >=1.0.4

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

Steps to reproduce

Use these requirements: -

connexion[swagger-ui] == 2.9.0
flask == 2.0.1

Additional info:

Output of the commands:

  • python --version
Python 3.9.6
  • pip show connexion | grep "^Version\:"
Version: 2.9.0
@Ruwann
Copy link
Member

Ruwann commented Sep 1, 2021

Hi @alanbchristie , this was also reported in #1401 and addressed in #1402 .

@hjacobs Can we release a new patch version for this?

@alanbchristie
Copy link
Author

Thanks - moving back to flask 1.1.2 wasn't too difficult for us (even though we some some time moving from 1 to 2) but the ability to return to 2.0 would be handy (we can't use flask 1.1.3 or 1.1.4 because it does not support jinja2 v3, which we need!).

@Pragnya02
Copy link

Hi, is the fix ready for this? I am using Flask 2.0 for the new async feature but am unable to integrate with connexion because of the dependency conflict.

@Pragnya02
Copy link

Seems like installing connexion 2.7 is work around for now, it doesn't have the conflict with flask 2.x

@ykharko
Copy link

ykharko commented Nov 5, 2021

Hi guys, any ideas when support of flask 2.x might be released? As I can see at least dependency requirements updates are already in main branch.
Am I right it's going to be released with 2.10 version?
In theory when new version is supposed to be released?

@nomad-software
Copy link

Is there any movement on a new release please? I can't update my dependencies because the latest release doesn't support Flask v2. We currently have to pin Connexion to v2.7.0.

@RobbeSneyders
Copy link
Member

Hi all, sorry for the delay. We're depending on Zalando maintainers to release a new version to PyPi, but they've been unavailable for a while. I've released version 2.10.0 with this change and uploaded it to a new PyPi project for now. You can find the release here.

@alanbchristie
Copy link
Author

Worrying. If connexion development is effectively dead is it time to fork the repo and create a new "official" connexion2?

@idoy10
Copy link

idoy10 commented Nov 15, 2021

We are also using connexion and we get

connexion 2.9.0 requires flask<2,>=1.0.4, but you have flask 2.0.2 which is incompatible.
connexion 2.9.0 requires werkzeug<2.0,>=1.0, but you have werkzeug 2.0.2 which is incompatible.

Please update as soon as possible if there is going to be a change that we can update also other packages !!

@RobbeSneyders
Copy link
Member

@alanbchristie We are currently only dependent for PyPi access. We released the connexion2 package so people in this thread are unblocked. We are fully able to continue development on this repository.
@idoy10 if you are blocked by this, please install the connexion2 package which contains the newest version.

@idoy10
Copy link

idoy10 commented Nov 15, 2021

connexion2 package

Would you please provide a link to connexion2 and how to use it?
Thanks

@alanbchristie
Copy link
Author

Initial build seems to work, so thanks for the new 2.10.0 release.

For others, the flask-related requirements for my tests (using Python 3.10.0) are: -

connexion2[swagger-ui] == 2.10.0
flask == 2.0.2
flask-migrate == 3.1.0
flask-sqlalchemy == 2.5.1

@RobbeSneyders
Copy link
Member

Release 2.10.0 which fixes this issue is now also available under the main connexion PyPi repository.

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

7 participants