Opened 8 years ago
Closed 8 years ago
#27512 closed Cleanup/optimization (fixed)
Dead code path in Model.__init__
Reported by: | Adam Johnson | Owned by: | Adam Johnson |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.10 |
Severity: | Normal | Keywords: | |
Cc: | me@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
These lines in Model.__init__
look suspicious to me:
# Maintain compatibility with existing calls. if isinstance(field.remote_field, ManyToOneRel): kwargs.pop(field.attname, None)
There's no test coverage for them, and they have remained untouched since they were added in #3438 10 years ago, as an optimization rewrite of Model.__init__
. Afaict they aren't needed.
Change History (4)
comment:1 by , 8 years ago
Component: | Uncategorized → Database layer (models, ORM) |
---|---|
Has patch: | set |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 8 years ago
Cc: | added |
---|
Note:
See TracTickets
for help on using tickets.
https://github.com/django/django/pull/7580