#32948: Optimise Q combination and inversion
-------------------------------------+-------------------------------------
     Reporter:  Keryn Knight         |                    Owner:  Nick Pope
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"ddf0002bb760e5f1df664a81bd2a554c522f2c0f" ddf0002]:
 {{{
 #!CommitTicketReference repository=""
 revision="ddf0002bb760e5f1df664a81bd2a554c522f2c0f"
 Refs #32948 -- Renamed Node._new_instance() to Node.create().

 Node._new_instance() was added in
 6dd2b5468fa275d53aa60fdcaff8c28bdc5e9c25 to work around Q.__init__()
 having an incompatible signature with Node.__init__().

 It was intended as a hook that could be overridden if subclasses needed
 to change the behaviour of instantiation of their specialised form of
 Node. In practice this doesn't ever seem to have been used for this
 purpose and there are very few calls to Node._new_instance() with other
 code, e.g. Node.__deepcopy__() calling Node and overriding __class__ as
 required.

 Rename this to Node.create() to make it a more "official" piece of
 private API that we can use to simplify a lot of other areas internally.

 The docstring and nearby comment have been reworded to read more
 clearly.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32948#comment:10>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701823ed38aed-aa18adde-5ed8-4c77-82f4-f5d552820115-000000%40eu-central-1.amazonses.com.

Reply via email to