Opened 11 years ago
Closed 11 years ago
#21853 closed Bug (fixed)
Manager.__module__ holds a wrong value.
Reported by: | loic84 | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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 Manager
class.
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.
Change History (2)
comment:1 by , 11 years ago
Has patch: | set |
---|
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Tentative patch: https://github.com/django/django/pull/2199