#24317: Deprecate field.rel, replace it with real field instances
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by akaariai):
I've been working on this, with an approach where I completely deprecate
field.rel with new reverse field instances.
Unfortunately this seems to be an dead end for multiple reasons:
- Patch implementing this would be huge: I'm currently at around 1700
lines changed, and I still have probably at least 500 lines to change.
These changes aren't systematic or easy to verify.
- There is a huge risk of regressions, because of the size of the patch,
and because it is nearly impossible to verify changes in the related
fields code.
- 3rd party software likely relies a lot on field.rel introspection.
So, instead of trying to introduce a new field instance I think a better
approach is to do incremental changes to the code. The idea is to
continuously keep the field.rel as backwards compatible as possible while
making it more like a relation field. The end result should be a situation
where we can make field.rel a real field subclass.
--
Ticket URL: <https://code.djangoproject.com/ticket/24317#comment:5>
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/066.572e3c427f589a7117f24de727c6803e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.