-
Notifications
You must be signed in to change notification settings - Fork 442
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
drf_yasg incompatible with django_rest_framework 3.10 #411
Comments
I can confirm that is an issue. Our builds stopped working this morning, and it starts working with drf==3.9.6, but fails with drf==3.10.0
|
Breaking for me even for 3.9.4. Installing packaging fixed it for me.
|
Still reproduced. ImportError: Could not import 'drf_yasg.generators.OpenAPISchemaGenerator' for API setting 'DEFAULT_GENERATOR_CLASS'. ImportError: cannot import name 'SchemaGenerator'. DRF: 3.10.4 and 3.9.4 pip3 install packaging - solve problem |
Known regression: #412 |
tengo el mismo problema·
|
|
Same issue happens to me. But I failed to solve this problem by "pip3 install packaging". Any idea? |
@rainbow2177 Installing the latest version (1.17.0) should solve this issue. |
confirm, fixed in the last release. |
|
@rainbow2177 the last version is ==1.17.0 |
Same problem on |
@shagohead Please see the newly created fork It's on PyPI now, and we are working on getting a few remaining issues solved. It is compatible with DRF 3.12. |
I solved the problem using these versions drf-yasg==1.17.1 and djangorestframework==3.11.0 |
Yes, an alternative is to pin |
following config in settings.py work.
|
When the application starts library throws ImportError
File "/home/anatoliy/Projects/Python/skippplatform/skipro/skipro/urls/dev.py", line 8, in <module> from drf_yasg.generators import OpenAPISchemaGenerator File "/home/anatoliy/.local/share/virtualenvs/skipro-hLwcq6KW/lib/python3.6/site-packages/drf_yasg/generators.py", line 11, in <module> from rest_framework.schemas.generators import SchemaGenerator, endpoint_ordering, get_pk_name ImportError: cannot import name 'SchemaGenerator'
This happens because in new version SchemaGenerator was renamed to BaseSchemaGenerator.
The text was updated successfully, but these errors were encountered: