﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19511	Thread safe bound method weakrefs	German M. Bravo	nobody	"I'm often getting this traceback:
{{{
AttributeError: 'BoundMethodWeakref' object has no attribute 'deletionMethods'

Stacktrace (most recent call last):

  File ""django/core/handlers/base.py"", line 119, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File ""posts/views.py"", line 404, in get
    posts_post.save()
  File ""django/db/models/base.py"", line 475, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File ""django/db/models/base.py"", line 506, in save_base
    signals.pre_save.send(sender=origin, instance=self, raw=raw, using=using)
  File ""django/dispatch/dispatcher.py"", line 183, in send
    response = receiver(signal=self, sender=sender, **named)
  File ""haystack/models.py"", line 268, in load_indexes
    ui.setup_indexes()
  File ""haystack/utils/loading.py"", line 283, in setup_indexes
    index._setup_save()
  File ""celery_haystack/indexes.py"", line 33, in _setup_save
    signals.post_save.connect(self._enqueue_save, sender=model, dispatch_uid=CelerySearchIndex)
  File ""django/dispatch/dispatcher.py"", line 105, in connect
    receiver = saferef.safeRef(receiver, onDelete=self._remove_receiver)
  File ""django/dispatch/saferef.py"", line 29, in safeRef
    onDelete=onDelete
  File ""django/dispatch/saferef.py"", line 248, in get_bound_method_weakref
    return BoundMethodWeakref(target=target, onDelete=onDelete)
  File ""django/dispatch/saferef.py"", line 88, in __new__
    current.deletionMethods.append( onDelete)
}}}

I suspect this has something to do with the threading environment I'm using. I'm attaching a patch that I believe fixes the issue."	Bug	closed	Core (Other)	1.4	Normal	invalid		German M. Bravo	Accepted	0	0	0	0	0	0
