#27634: Refactor Query.clone _setup_query logic
-------------------------------------+-------------------------------------
               Reporter:  Adam       |          Owner:  Adam Chainz
  Chainz                             |
                   Type:             |         Status:  assigned
  Cleanup/optimization               |
              Component:  Database   |        Version:  1.10
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Currently `Query.clone()` does:

 {{{
 if hasattr(obj, '_setup_query'):
             obj._setup_query()
 }}}

 Afaict there's only one subclass of `Query` that has a `_setup_query`
 method: `UpdateQuery`. The other users were `DateQuerySet` and
 `DateTimeQuerySet` which got removed in #23867 by Anssi. The call can be
 pushed down into `UpdateQuery` which already overrides `clone()`.

--
Ticket URL: <https://code.djangoproject.com/ticket/27634>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.48cf254cd8b2096014e82230791446b4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to