encode / django-rest-framework

Web APIs for Django. 🎸
https://www.django-rest-framework.org
Other
27.83k stars 6.76k forks source link

`coreapi` must be installed for schema support with Python 3.10 #9416

Open variable opened 1 month ago

variable commented 1 month ago

It appears coreapi is not python3.10 compat, one of my external lib that imports the SchemaGenerator from rest_framework.schemas will causes the error: coreapi must be installed for schema support with Python 3.10`

from rest_framework.schemas import (
    SchemaGenerator as BaseSchemaGenerator,
)

The underlining exception when importing coreapi was:

ImportError: cannot import name 'Mapping' from 'collections' (/opt/homebrew/Cellar/python@3.10/3.10.14/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/__init__.py)

Is there a way to resolve this?

auvipy commented 1 month ago
  1. stop using it as it is deprecated in DRF so not suggested anymore.
  2. we can fix the compatibility issue in the mean time.