Ver código fonte

Removes compat programs celeryd, celerybeat and celeryd-multi (scheduled for removal in 4.0)

Ask Solem 9 anos atrás
pai
commit
149de1291e
2 arquivos alterados com 0 adições e 45 exclusões
  1. 0 36
      celery/__main__.py
  2. 0 9
      setup.py

+ 0 - 36
celery/__main__.py

@@ -2,26 +2,10 @@ from __future__ import absolute_import, print_function, unicode_literals
 
 import sys
 
-from os.path import basename
-
 from . import maybe_patch_concurrency
 
 __all__ = ['main']
 
-DEPRECATED_FMT = """
-The {old!r} command is deprecated, please use {new!r} instead:
-
-$ {new_argv}
-
-"""
-
-
-def _warn_deprecated(new):
-    print(DEPRECATED_FMT.format(
-        old=basename(sys.argv[0]), new=new,
-        new_argv=' '.join([new] + sys.argv[1:])),
-    )
-
 
 def main():
     if 'multi' not in sys.argv:
@@ -30,25 +14,5 @@ def main():
     main()
 
 
-def _compat_worker():
-    maybe_patch_concurrency()
-    _warn_deprecated('celery worker')
-    from celery.bin.worker import main
-    main()
-
-
-def _compat_multi():
-    _warn_deprecated('celery multi')
-    from celery.bin.multi import main
-    main()
-
-
-def _compat_beat():
-    maybe_patch_concurrency()
-    _warn_deprecated('celery beat')
-    from celery.bin.beat import main
-    main()
-
-
 if __name__ == '__main__':  # pragma: no cover
     main()

+ 0 - 9
setup.py

@@ -42,8 +42,6 @@ PYPY_VERSION = getattr(sys, 'pypy_version_info', None)
 PYPY = PYPY_VERSION is not None
 PYPY24_ATLEAST = PYPY_VERSION and PYPY_VERSION >= (2, 4)
 
-CELERY_COMPAT_PROGRAMS = int(os.environ.get('CELERY_COMPAT_PROGRAMS', 1))
-
 if PY26_OR_LESS:
     raise Exception(E_UNSUPPORTED_PYTHON % (PYIMP, '2.7'))
 elif PY33_OR_LESS and not PYPY24_ATLEAST:
@@ -190,13 +188,6 @@ console_scripts = entrypoints['console_scripts'] = [
     'celery = celery.__main__:main',
 ]
 
-if CELERY_COMPAT_PROGRAMS:
-    console_scripts.extend([
-        'celeryd = celery.__main__:_compat_worker',
-        'celerybeat = celery.__main__:_compat_beat',
-        'celeryd-multi = celery.__main__:_compat_multi',
-    ])
-
 # -*- Extras -*-