#16759: Expensive sql.Query cloning -------------------------------------+------------------------------------- Reporter: Suor | Owner: Suor Type: Bug | Status: new Milestone: | Component: Database layer Version: 1.3 | (models, ORM) Resolution: | Severity: Normal Triage Stage: Accepted | Keywords: orm performance Needs documentation: 0 | cloning Patch needs improvement: 1 | Has patch: 1 UI/UX: 0 | Needs tests: 0 | Easy pickings: 0 -------------------------------------+------------------------------------- Changes (by Alex):
* needs_better_patch: 0 => 1 * stage: Ready for checkin => Accepted Comment: The patch as written is not correct. It isn't correct for `deepcopy` to return a shallow copy. Either the object itself is immutable, in which case it should simply return `self`, or all of its components are immutable, in which case **they** should have `__deepcopy__` methods which simply return `self`. After discussing with Jacob, our conclusion is that the right fix is to make `django.db.model.options.Options` and `django.db.model.fields.Field` immutable (via changing their `__deepcopy__`). -- Ticket URL: <https://code.djangoproject.com/ticket/16759#comment:2> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.