#27512: Dead code path in Model.__init__
-----------------------------------------+------------------------
Reporter: Adam Chainz | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/27512>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.b069d3914747dee9fc3dec32aadb89e3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.