Manager.__module__ holds a wrong value.
|Reported by:||loic84||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The combination of
BaseManager.from_queryset() (Django 1.7 #20625) and
RenameMethodsBase (Django 1.6 #15363) results in
Manager.__module__ having the wrong value. This can be an issue when trying to pickle the
It's not immediately obvious to me why a
Manager would need to be pickled but it caused an issue in a third party app; regardless, it's a regression and having the wrong
__module__ in error messages isn't helpful.
It's worth noting that we'll get rid of the
RenameMethodsBase metaclass for
BaseManager in 1.8, so this problem will eventually fix itself.