-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
Flask 2.3.x causes error 'flask.json' has no attribute 'JSONEncoder' at startup #1699
Comments
Thanks for the really fast reply. I see the old issue about upgrading connexion to Flask 2.3. To the best of my knowledge I'm using the latest and greatest general-release connexion, version 2.14.2. Please tell me which connexion version has fix #1582? I'm a little reluctant to jump on the 3.0 alpha release train. |
Looks like it will be in the next stable release. Until then, and regardless, you should always use a tool like pip-tools to pin your application's entire dependency tree and avoid unexpected updates. |
Yep here's the complaint from pip-compile (from pip-tools):
|
Connexion, as a library, should not have an upper bound on dependencies, that's a big problem: https://iscinumpy.dev/post/bound-version-constraints/ |
Connexion 2.X is not compatible with Flask 2.3+. This is indicated by the upper bound in the requirements. Connexion 3.X is compatible with Flask 2.2+ only and is now in alpha. The reasoning is explained in #1582
|
Got it, thanks for clarifying. I should have been more nuanced when I said that, sounds like connexion is doing things right. |
Thank you all for responding so quickly. Just to convince myself, I downloaded the connexion tar archive from PyPI and verified that file
Those dependencies are straight from my package's Even tho I see clearly that connexion pins the Flask version, the takeaway for me here remains that the recent release of Flask 2.3.0 definitely messed things up for this connexion user. Was the combination of unpinned dependencies working until yesterday purely by accident, because the latest & greatest connexion was compatible with the latest & greatest Flask until Apr 24? I'm not at all convinced that my workaround is the right one. Thanks for any thoughts you might have here. |
Description
My tox tests on a project that use connexion started failing with the very recent release of Flask version 2.3.x released 25 Apr 2023. Now the REST server fails when tests try to run with this message:
I initially asked the Flask people about this, and they instantly redirected me to connexion, see pallets/flask#5094
Expected behaviour
Connexion server passes tests when package is installed by tox.
Actual behaviour
Connexion server fails to start during tox testing.
Steps to reproduce
Upgrade to Flask 2.3.0 or 2.3.1 and run tox tests.
Additional info:
Output of the commands:
python --version
: python 3.9pip show connexion | grep "^Version\:"
connexion 2.14.2The text was updated successfully, but these errors were encountered: