-
Couldn't load subscription status.
- Fork 341
Description
***** BEFORE LOGGING AN ISSUE *****
- Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
- Please check if a similar issue already exists or has been closed before. Seriously, nobody here is getting paid. Help us out and take five minutes to make sure you aren't submitting a duplicate.
- Please review the guidelines for contributing
Code
from flask_restx import ApiRepro Steps (if applicable)
- Use this Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
#flask-restplus = "*"
flask-restx = "*"
flask = "*"
[requires]
python_version = "3.7"
Pipenv install- Attempt to import Api from restx
paul-> python
Python 3.7.6 (default, Dec 30 2019, 19:38:28)
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from flask_restx import Api
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/paul/.local/share/virtualenvs/restplus-test-_yVwyWWD/lib/python3.7/site-packages/flask_restx/__init__.py", line 5, in <module>
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 <module>
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)
>>>
- Broken!
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
- Python version 3.7.6
paul-> pipenv graph
flask-restx==0.1.0
- aniso8601 [required: >=0.82, installed: 8.0.0]
- Flask [required: >=0.8, installed: 1.1.1]
- click [required: >=5.1, installed: 7.0]
- itsdangerous [required: >=0.24, installed: 1.1.0]
- Jinja2 [required: >=2.10.1, installed: 2.11.1]
- MarkupSafe [required: >=0.23, installed: 1.1.1]
- Werkzeug [required: >=0.15, installed: 1.0.0]
- jsonschema [required: Any, installed: 3.2.0]
- attrs [required: >=17.4.0, installed: 19.3.0]
- importlib-metadata [required: Any, installed: 1.5.0]
- zipp [required: >=0.5, installed: 2.1.0]
- pyrsistent [required: >=0.14.0, installed: 0.15.7]
- six [required: Any, installed: 1.14.0]
- setuptools [required: Any, installed: 45.1.0]
- six [required: >=1.11.0, installed: 1.14.0]
- pytz [required: Any, installed: 2019.3]
- six [required: >=1.3.0, installed: 1.14.0]
- Flask version
- Flask-RESTX version
- Other installed Flask extensions
Additional Context
This also occurs using flask-restplus. My guess is that the latest Flask breaks both.