Skip to content

django-ninja-extra MRO Bug #327

@sebieire

Description

@sebieire

Hope you can reproduce this. docker container setup with celery workers:

All celery workers failed to start with:
TypeError: Cannot create a consistent method resolution order (MRO).

The root cause looks might be that django-ninja-extra>=0.21 introduced a change to PaginatedResponseSchema that inherits from both Generic and BasePaginatedResponseSchema in a way that creates an invalid Python class hierarchy with certain Pydantic versions.

What fixed it for me:

before:
django-ninja==1.5.0
django-ninja-extra==0.30.6
django-ninja-jwt==5.4.2

after (= fix):
django-ninja==1.2.0
django-ninja-extra==0.20.9
django-ninja-jwt==5.4.2

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions