Skip to content
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

Replace Manager with BaseManager #508

Closed

Conversation

intgr
Copy link
Contributor

@intgr intgr commented Nov 15, 2023

@flaeppe This is some example fallout from typeddjango/django-stubs#1814 since RelatedManager base class was changed from Manager to BaseManager.

Without this change, I can no longer pass RelatedManagers to APIs that accept them.

I'm not entirely happy or sure about this. I think in pratice most managers, including RelatedManagers, do inherit from Manager.

BaseManager seems to be intended as an impementation detail in Django, not something users should be exposed to. But this will force users to replace Manager type hints with BaseManager, including my personal projects.

Related issues

@intgr
Copy link
Contributor Author

intgr commented Nov 15, 2023

Closing this, looks like we'll be reversing the change in django-stubs instead:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant