def find_deprecated_settings(source): from celery.utils import warn_deprecated for name, opt in flatten(NAMESPACES): if (opt.deprecate_by or opt.remove_by) and getattr(source, name, None): warn_deprecated(description="The %r setting" % (name, ), deprecation=opt.deprecate_by, removal=opt.remove_by, alternative=opt.alt)
def find_deprecated_settings(source): from celery.utils import warn_deprecated for name, opt in flatten(NAMESPACES): if (opt.deprecate_by or opt.remove_by) and getattr(source, name, None): warn_deprecated(description='The {0!r} setting'.format(name), deprecation=opt.deprecate_by, removal=opt.remove_by, alternative='Use the {0.alt} instead'.format(opt)) return source
def test_warn_deprecated(self, warn): warn_deprecated('Foo') self.assertTrue(warn.called)
"""This module has moved to celery.app.trace.""" from __future__ import absolute_import import sys from celery.app import trace from celery.utils import warn_deprecated warn_deprecated('celery.task.trace', removal='3.2', alternative='Please use celery.app.trace instead.') sys.modules[__name__] = trace
def test_warn_deprecated(self, warn): warn_deprecated('Foo') warn.assert_called()
Old ``group`` implementation, this module should not be used anymore use :func:`celery.group` instead. """ from __future__ import absolute_import from celery._state import get_current_worker_task from celery.app import app_or_default from celery.canvas import maybe_signature # noqa from celery.utils import uuid, warn_deprecated from celery.canvas import subtask # noqa warn_deprecated( 'celery.task.sets and TaskSet', removal='4.0', alternative="""\ Please use "group" instead (see the Canvas section in the userguide)\ """) class TaskSet(list): """A task containing several subtasks, making it possible to track how many, or when all of the tasks have been completed. :param tasks: A list of :class:`subtask` instances. Example:: >>> from myproj.tasks import refresh_feed >>> urls = ('http://cnn.com/rss', 'http://bbc.co.uk/rss')
def test_warn_deprecated(self, warn): utils.warn_deprecated('Foo') self.assertTrue(warn.called)
Old ``group`` implementation, this module should not be used anymore use :func:`celery.group` instead. """ from __future__ import absolute_import from celery._state import get_current_worker_task from celery.app import app_or_default from celery.canvas import maybe_signature # noqa from celery.utils import uuid, warn_deprecated from celery.canvas import subtask # noqa warn_deprecated('celery.task.sets and TaskSet', removal='4.0', alternative="""\ Please use "group" instead (see the Canvas section in the userguide)\ """) class TaskSet(list): """A task containing several subtasks, making it possible to track how many, or when all of the tasks have been completed. :param tasks: A list of :class:`subtask` instances. Example:: >>> from myproj.tasks import refresh_feed >>> urls = ('http://cnn.com/rss', 'http://bbc.co.uk/rss')
def test_warn_deprecated(self, warn): utils.warn_deprecated("Foo") self.assertTrue(warn.called)