This document describes the current stable version of Celery (4.4). For development docs, go here.


Weakref compatibility.

weakref_backports is a partial backport of the weakref module for Python versions below 3.4.

Copyright (C) 2013 Python Software Foundation, see LICENSE.python for details.

The following changes were made to the original sources during backporting:

  • Added self to super calls.

  • Removed from None when raising exceptions.

class celery.utils.dispatch.weakref_backports.WeakMethod[source]

Weak reference to bound method.

A custom weakref.ref subclass which simulates a weak reference to a bound method, working around the lifetime problem of bound methods.