celery/celery — pull request #1678 by limnick (2013-11-22 00:36:15+00:00)
Title: fix old callable with new builtin callable

I was getting errors on Python 2.7.5 after installing celery.

This fixes those errors by replacing old isinstance(foo, collections.Callable) with callable(foo) in the safe weak function reference module

The test suite still passes for me after this change.

```
File "python2.7/site-packages/celery/utils/dispatch/saferef.py", line 143, in remove
if isinstance(function, Callable):
File "python2.7/abc.py", line 144, in __instancecheck__
return cls.__subclasscheck__(subtype)
File "python2.7/abc.py", line 165, in __subclasscheck__
cls._abc_cache.add(subclass)
File "python2.7/_weakrefset.py", line 84, in add
self.data.add(ref(item, self._remove))
Exception TypeError: TypeError('isinstance() arg 2 must be a class, type, or tuple of classes and types',) in ignored
```