django-model-utils/tests/test_managers
Benedikt Willi f09ea0e472 Fix compatibility issues with django-modeltranslation by modifying manager mixins
- Added a new class `_GenericMixin` to serve as a runtime placeholder for `Generic[ModelT]`. This change prevents `TypeError` during `__class__` assignments, which was an issue when mixins inherited from `Generic[T]` at runtime.
- All manager mixins have been updated to inherit from `_GenericMixin` instead of `Generic[ModelT]`. This ensures compatibility with `django-modeltranslation`.
- Introduced regressions tests to confirm that the manager instances support `__class__` reassignment without issues. Tests were added for `SoftDeletableManager`, `InheritanceManager`, `QueryManager`, and `JoinManager`.

Closes GH-#636.
2025-12-15 11:38:33 +01:00
..
__init__.py Exclude tests from distribution 2017-02-15 23:00:10 +00:00
test_inheritance_manager.py Annotate return type of test methods 2024-06-13 12:02:05 +02:00
test_join_manager.py Annotate return type of test methods 2024-06-13 12:02:05 +02:00
test_manager_class_assignment.py Fix compatibility issues with django-modeltranslation by modifying manager mixins 2025-12-15 11:38:33 +01:00
test_query_manager.py Annotate return type of test methods 2024-06-13 12:02:05 +02:00
test_softdelete_manager.py Annotate return type of test methods 2024-06-13 12:02:05 +02:00
test_status_manager.py Annotate return type of test methods 2024-06-13 12:02:05 +02:00