Opened 11 years ago
Closed 11 years ago
#21217 closed Cleanup/optimization (fixed)
`ImageField` and `GenericForeignKey` shouldn't connect `(pre|post)_init` signals to abstract senders
Reported by: | Simon Charette | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Since (pre|post)_init
is only sent by non abstract models (actually it is also sent when an abstract model is instantiated but one should not do that anyway) we should avoid polluting the associated signals registries with useless entries.
Attaching a patch with testcases making sure the changes didn't affect ImageField
and GenericForeignKey
inherited from abstract bases. The full test suite pass on Python 2.7 SQLite.
Attachments (1)
Change History (3)
by , 11 years ago
Attachment: | 0001-Fixed-21217-Avoid-connecting-pre-post-_init-signals-.patch added |
---|
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 948d209adac566d89f44f073fdd77a371c18e269: