Django allows users to register a custom lookups, but there are no public
way to unregister it.
I don't see a reason to keep `_unregister_lookup` as a private API, so I'm
proposing to make it be public and add documentation for it.
--
Ticket URL: <https://code.djangoproject.com/ticket/25069>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Do you have a use case in mind?
--
Ticket URL: <https://code.djangoproject.com/ticket/25069#comment:1>
Comment (by coldmind):
Well, my vision (in abstract) is if there is a public API to produce some
changes (for this case to add new entity to existing collection) there
should be a way to revert this change (for this case to remove entity from
collection).
--
Ticket URL: <https://code.djangoproject.com/ticket/25069#comment:2>
Comment (by timgraham):
We can wait for Anssi to say if there's any more explanation for making it
private other than the existing comment, "Meant to be used in tests only,"
but I don't see much advantage to making a public method that doesn't have
a concrete use case.
--
Ticket URL: <https://code.djangoproject.com/ticket/25069#comment:3>
Comment (by coldmind):
Well, I prefer to remove it at all :) I don't see a reason to have method
in codebase, which is used only in tests. We can avoid it as I described
it in comment of my PR.
Simon's opinion is that this method is needed.
So, I think if we will leave it, it should be made public.
--
Ticket URL: <https://code.djangoproject.com/ticket/25069#comment:4>
Comment (by charettes):
My point is that I'd rather have a method (private or public) that deals
with the implementation details of lookup unregistration than moving this
logic in the tests by directly assigning to `class_looukps`.
--
Ticket URL: <https://code.djangoproject.com/ticket/25069#comment:5>
* cc: akaariai (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/25069#comment:6>
* status: new => closed
* resolution: => wontfix
--
Ticket URL: <https://code.djangoproject.com/ticket/25069#comment:7>