Skip to content

Handle missing coreapi in DRF 3.17#146

Open
LisaScheers wants to merge 1 commit into
rsinger86:masterfrom
LisaScheers:drf-3.17-compat
Open

Handle missing coreapi in DRF 3.17#146
LisaScheers wants to merge 1 commit into
rsinger86:masterfrom
LisaScheers:drf-3.17-compat

Conversation

@LisaScheers
Copy link
Copy Markdown

DRF 3.17 removed coreapi and coreschema from rest_framework.compat, so importing FlexFieldsFilterBackend currently fails before get_schema_fields() can hit its existing optional dependency assertions.

This keeps compatibility with older DRF versions and falls back to direct optional imports for DRF 3.17+. If neither package is installed, the existing assertions still report that schema generation requires them.

Fixes #145.

LisaScheers added a commit to LisaScheers/nixpkgs that referenced this pull request May 27, 2026
LisaScheers added a commit to LisaScheers/nixpkgs that referenced this pull request May 27, 2026
Backport the import fallback submitted upstream in rsinger86/drf-flex-fields#146.

Assisted-by: OpenAI Codex (GPT-5)
Assisted-by: OpenAI Codex (GPT-5)
GirardR1006 pushed a commit to GirardR1006/nixpkgs that referenced this pull request May 29, 2026
Backport the import fallback submitted upstream in rsinger86/drf-flex-fields#146.

Assisted-by: OpenAI Codex (GPT-5)
GirardR1006 pushed a commit to GirardR1006/nixpkgs that referenced this pull request May 29, 2026
Backport the import fallback submitted upstream in rsinger86/drf-flex-fields#146.

Assisted-by: OpenAI Codex (GPT-5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DRF 3.17 incompatibility (cannot import name 'coreapi') & maintained fork

1 participant