-
Notifications
You must be signed in to change notification settings - Fork 339
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
Werkzeug V1.x breaks restx import #34
Comments
Thanks for the report. There is indeed one missing rename here flask_restx/api.py:28:from werkzeug import cached_property |
could it just be pinned at werkzeug<=0.16.1 for now at least? kind of like commented here noirbizarre/flask-restplus#777 |
Yes, I'll do this as a quick hotfix for now. |
flask-restx 0.1.1 is now available and workarounds the issue by pinning werkzeug. The proper fix will be part of a longer-term plan explained in #37. |
|
Hm, sorry but I cannot reproduce the issue.
|
Seems like this in my
So, this issue comes up in my docker as I might have added flask explicitly in my requirements.txt:
Note: This is after pinning hence werkzeug is at 0.15.6 but if not pinned then in docker it installs the latest version. |
Should be temporary. Should also consider transition to flask_restx as flask_restplus is currently unmaintained. reference: noirbizarre/flask-restplus#777 python-restx/flask-restx#39 python-restx/flask-restx#34 notice from flask_restplus: https://github.com/noirbizarre/flask-restplus#flask-restplus "This project has been forked to Flask-RESTX and will be maintained by by the python-restx organization. Flask-RESTPlus should be considered unmaintained."
Should be temporary. Should also consider transition to flask_restx as flask_restplus is currently unmaintained. reference: noirbizarre/flask-restplus#777 python-restx/flask-restx#39 python-restx/flask-restx#34 notice from flask_restplus: https://github.com/noirbizarre/flask-restplus#flask-restplus "This project has been forked to Flask-RESTX and will be maintained by by the python-restx organization. Flask-RESTPlus should be considered unmaintained."
***** BEFORE LOGGING AN ISSUE *****
Code
Repro Steps (if applicable)
Pipenv install
Expected Behavior
Api should be silently imported
Actual Behavior
Import fails with error below
Error Messages/Stack Trace
Traceback (most recent call last):
File "", line 1, in
File "/Users/paul/.local/share/virtualenvs/restplus-test-_yVwyWWD/lib/python3.7/site-packages/flask_restx/init.py", line 5, in
from .api import Api # noqa
File "/Users/paul/.local/share/virtualenvs/restplus-test-_yVwyWWD/lib/python3.7/site-packages/flask_restx/api.py", line 28, in
from werkzeug import cached_property
ImportError: cannot import name 'cached_property' from 'werkzeug' (/Users/paul/.local/share/virtualenvs/restplus-test-_yVwyWWD/lib/python3.7/site-packages/werkzeug/init.py)
Environment
Additional Context
This also occurs using
flask-restplus
. My guess is that the latest Flask breaks both.The text was updated successfully, but these errors were encountered: