#11753: Q objects using callables won't combine in 2.4 ---------------------------------------------------+------------------------ Reporter: alexr | Owner: Status: new | Milestone: Component: Database layer (models, ORM) | Version: 1.1 Resolution: | Keywords: Q, mq Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Comment (by jdunck):
jezdez asked the same question. :-) {{{ r42573 | guido.van.rossum | 2006-02-25 16:38:04 -0600 (Sat, 25 Feb 2006) | 8 lines - Patch 1433928: - The copy module now "copies" function objects (as atomic objects). - dict.__getitem__ now looks for a __missing__ hook before raising KeyError. - Added a new type, defaultdict, to the collections module. This uses the new __missing__ hook behavior added to dict (see above). }}} Basically, it fixes the problem by adding the type to an internal data structure. {{{ 33121 loewis d[types.BuiltinFunctionType] = _deepcopy_atomic 42573 guido.van.rossum d[types.FunctionType] = _deepcopy_atomic }}} "d" there is an alias for copy._deepcopy_dispatch. I considered poking a value in there, but thought it was a bit presumptuous. Since you're asking about it, lemme see if just poking it in there actually fixes the problem. -- Ticket URL: <http://code.djangoproject.com/ticket/11753#comment:13> Django <http://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-upda...@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.