Procházet zdrojové kódy

Removes __future__ imports

Ask Solem před 8 roky
rodič
revize
4a99648a08
100 změnil soubory, kde provedl 9 přidání a 213 odebrání
  1. 0 6
      celery/__init__.py
  2. 0 2
      celery/__main__.py
  3. 0 2
      celery/_state.py
  4. 0 2
      celery/app/__init__.py
  5. 0 2
      celery/app/amqp.py
  6. 0 2
      celery/app/annotations.py
  7. 0 2
      celery/app/base.py
  8. 0 2
      celery/app/builtins.py
  9. 0 2
      celery/app/control.py
  10. 0 2
      celery/app/defaults.py
  11. 0 2
      celery/app/log.py
  12. 0 2
      celery/app/registry.py
  13. 0 2
      celery/app/routes.py
  14. 0 2
      celery/app/task.py
  15. 0 2
      celery/app/trace.py
  16. 0 2
      celery/app/utils.py
  17. 0 2
      celery/apps/beat.py
  18. 0 2
      celery/apps/worker.py
  19. 0 2
      celery/backends/__init__.py
  20. 0 2
      celery/backends/amqp.py
  21. 0 2
      celery/backends/async.py
  22. 0 2
      celery/backends/base.py
  23. 0 2
      celery/backends/cache.py
  24. 5 6
      celery/backends/cassandra.py
  25. 0 2
      celery/backends/consul.py
  26. 0 2
      celery/backends/couchbase.py
  27. 0 2
      celery/backends/couchdb.py
  28. 0 2
      celery/backends/database/__init__.py
  29. 0 2
      celery/backends/database/models.py
  30. 0 2
      celery/backends/database/session.py
  31. 0 2
      celery/backends/elasticsearch.py
  32. 0 2
      celery/backends/filesystem.py
  33. 0 2
      celery/backends/mongodb.py
  34. 0 2
      celery/backends/redis.py
  35. 0 2
      celery/backends/riak.py
  36. 0 2
      celery/backends/rpc.py
  37. 0 2
      celery/beat.py
  38. 0 2
      celery/bin/__init__.py
  39. 0 2
      celery/bin/amqp.py
  40. 0 2
      celery/bin/base.py
  41. 0 2
      celery/bin/beat.py
  42. 0 2
      celery/bin/celery.py
  43. 0 2
      celery/bin/celeryd_detach.py
  44. 0 2
      celery/bin/events.py
  45. 0 2
      celery/bin/graph.py
  46. 0 3
      celery/bin/logtool.py
  47. 0 3
      celery/bin/multi.py
  48. 0 2
      celery/bin/worker.py
  49. 0 2
      celery/bootsteps.py
  50. 0 2
      celery/canvas.py
  51. 0 2
      celery/concurrency/__init__.py
  52. 3 1
      celery/concurrency/asynpool.py
  53. 0 2
      celery/concurrency/base.py
  54. 0 2
      celery/concurrency/eventlet.py
  55. 0 2
      celery/concurrency/gevent.py
  56. 0 2
      celery/concurrency/prefork.py
  57. 0 2
      celery/concurrency/solo.py
  58. 0 6
      celery/contrib/abortable.py
  59. 0 2
      celery/contrib/migrate.py
  60. 0 2
      celery/contrib/rdb.py
  61. 0 2
      celery/contrib/sphinx.py
  62. 0 2
      celery/events/__init__.py
  63. 0 2
      celery/events/cursesmon.py
  64. 0 2
      celery/events/dumper.py
  65. 0 2
      celery/events/snapshot.py
  66. 0 2
      celery/events/state.py
  67. 0 2
      celery/exceptions.py
  68. 0 2
      celery/five.py
  69. 0 2
      celery/fixups/django.py
  70. 0 2
      celery/loaders/__init__.py
  71. 0 2
      celery/loaders/app.py
  72. 0 2
      celery/loaders/base.py
  73. 0 2
      celery/loaders/default.py
  74. 0 2
      celery/local.py
  75. 1 3
      celery/platforms.py
  76. 0 2
      celery/result.py
  77. 0 2
      celery/schedules.py
  78. 0 2
      celery/security/__init__.py
  79. 0 2
      celery/security/certificate.py
  80. 0 2
      celery/security/key.py
  81. 0 2
      celery/security/serialization.py
  82. 0 2
      celery/security/utils.py
  83. 0 2
      celery/signals.py
  84. 0 1
      celery/states.py
  85. 0 2
      celery/task/__init__.py
  86. 0 2
      celery/task/base.py
  87. 0 2
      celery/tests/__init__.py
  88. 0 2
      celery/tests/app/test_amqp.py
  89. 0 2
      celery/tests/app/test_annotations.py
  90. 0 2
      celery/tests/app/test_app.py
  91. 0 2
      celery/tests/app/test_beat.py
  92. 0 2
      celery/tests/app/test_builtins.py
  93. 0 2
      celery/tests/app/test_celery.py
  94. 0 2
      celery/tests/app/test_control.py
  95. 0 2
      celery/tests/app/test_defaults.py
  96. 0 2
      celery/tests/app/test_exceptions.py
  97. 0 2
      celery/tests/app/test_loaders.py
  98. 0 2
      celery/tests/app/test_log.py
  99. 0 2
      celery/tests/app/test_registry.py
  100. 0 2
      celery/tests/app/test_routes.py

+ 0 - 6
celery/__init__.py

@@ -5,9 +5,6 @@
 # :copyright: (c) 2009 - 2012 Ask Solem and individual contributors,
 # :copyright: (c) 2009 - 2012 Ask Solem and individual contributors,
 #                 All rights reserved.
 #                 All rights reserved.
 # :license:   BSD (3 Clause), see LICENSE for more details.
 # :license:   BSD (3 Clause), see LICENSE for more details.
-
-from __future__ import absolute_import, print_function, unicode_literals
-
 import os
 import os
 import re
 import re
 import sys
 import sys
@@ -168,7 +165,4 @@ old_module, new_module = five.recreate_module(  # pragma: no cover
     version_info=version_info,
     version_info=version_info,
     maybe_patch_concurrency=maybe_patch_concurrency,
     maybe_patch_concurrency=maybe_patch_concurrency,
     _find_option_with_arg=_find_option_with_arg,
     _find_option_with_arg=_find_option_with_arg,
-    absolute_import=absolute_import,
-    unicode_literals=unicode_literals,
-    print_function=print_function,
 )
 )

+ 0 - 2
celery/__main__.py

@@ -1,6 +1,4 @@
 """Entry-point for the :program:`celery` umbrella command."""
 """Entry-point for the :program:`celery` umbrella command."""
-from __future__ import absolute_import, print_function, unicode_literals
-
 import sys
 import sys
 
 
 from . import maybe_patch_concurrency
 from . import maybe_patch_concurrency

+ 0 - 2
celery/_state.py

@@ -6,8 +6,6 @@ like the ``current_app``, and ``current_task``.
 
 
 This module shouldn't be used directly.
 This module shouldn't be used directly.
 """
 """
-from __future__ import absolute_import, print_function, unicode_literals
-
 import os
 import os
 import sys
 import sys
 import threading
 import threading

+ 0 - 2
celery/app/__init__.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Celery Application."""
 """Celery Application."""
-from __future__ import absolute_import, print_function, unicode_literals
-
 import os
 import os
 
 
 from celery.local import Proxy
 from celery.local import Proxy

+ 0 - 2
celery/app/amqp.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Sending/Receiving Messages (Kombu integration)."""
 """Sending/Receiving Messages (Kombu integration)."""
-from __future__ import absolute_import, unicode_literals
-
 import numbers
 import numbers
 
 
 from collections import Mapping, namedtuple
 from collections import Mapping, namedtuple

+ 0 - 2
celery/app/annotations.py

@@ -7,8 +7,6 @@ in the configuration.
 This prepares and performs the annotations in the
 This prepares and performs the annotations in the
 :setting:`task_annotations` setting.
 :setting:`task_annotations` setting.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from celery.utils.functional import firstmethod, mlazy
 from celery.utils.functional import firstmethod, mlazy
 from celery.utils.imports import instantiate
 from celery.utils.imports import instantiate
 
 

+ 0 - 2
celery/app/base.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Actual App instance implementation."""
 """Actual App instance implementation."""
-from __future__ import absolute_import, unicode_literals
-
 import os
 import os
 import threading
 import threading
 import warnings
 import warnings

+ 0 - 2
celery/app/builtins.py

@@ -3,8 +3,6 @@
 
 
 The built-in tasks are always available in all app instances.
 The built-in tasks are always available in all app instances.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from celery._state import connect_on_app_finalize
 from celery._state import connect_on_app_finalize
 from celery.utils.log import get_logger
 from celery.utils.log import get_logger
 
 

+ 0 - 2
celery/app/control.py

@@ -4,8 +4,6 @@
 Client for worker remote control commands.
 Client for worker remote control commands.
 Server implementation is in :mod:`celery.worker.control`.
 Server implementation is in :mod:`celery.worker.control`.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import warnings
 import warnings
 
 
 from billiard.common import TERM_SIGNAME
 from billiard.common import TERM_SIGNAME

+ 0 - 2
celery/app/defaults.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Configuration introspection and defaults."""
 """Configuration introspection and defaults."""
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 
 
 from collections import deque, namedtuple
 from collections import deque, namedtuple

+ 0 - 2
celery/app/log.py

@@ -7,8 +7,6 @@ Sets up logging for the worker and other programs,
 redirects standard outs, colors log output, patches logging
 redirects standard outs, colors log output, patches logging
 related compatibility fixes, and so on.
 related compatibility fixes, and so on.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import logging
 import logging
 import os
 import os
 import sys
 import sys

+ 0 - 2
celery/app/registry.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Registry of available tasks."""
 """Registry of available tasks."""
-from __future__ import absolute_import, unicode_literals
-
 import inspect
 import inspect
 
 
 from importlib import import_module
 from importlib import import_module

+ 0 - 2
celery/app/routes.py

@@ -3,8 +3,6 @@
 
 
 Contains utilities for working with task routers, (:setting:`task_routes`).
 Contains utilities for working with task routers, (:setting:`task_routes`).
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import re
 import re
 import string
 import string
 
 

+ 0 - 2
celery/app/task.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Task implementation: request context and the task base class."""
 """Task implementation: request context and the task base class."""
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 
 
 from billiard.einfo import ExceptionInfo
 from billiard.einfo import ExceptionInfo

+ 0 - 2
celery/app/trace.py

@@ -4,8 +4,6 @@
 This module defines how the task execution is traced:
 This module defines how the task execution is traced:
 errors are recorded, handlers are applied and so on.
 errors are recorded, handlers are applied and so on.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 # ## ---
 # ## ---
 # This is the heart of the worker, the inner loop so to speak.
 # This is the heart of the worker, the inner loop so to speak.
 # It used to be split up into nice little classes and methods,
 # It used to be split up into nice little classes and methods,

+ 0 - 2
celery/app/utils.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """App utilities: Compat settings, bug-report tool, pickling apps."""
 """App utilities: Compat settings, bug-report tool, pickling apps."""
-from __future__ import absolute_import, unicode_literals
-
 import os
 import os
 import platform as _platform
 import platform as _platform
 import re
 import re

+ 0 - 2
celery/apps/beat.py

@@ -5,8 +5,6 @@ It does everything necessary to run that module
 as an actual application, like installing signal handlers
 as an actual application, like installing signal handlers
 and so on.
 and so on.
 """
 """
-from __future__ import absolute_import, print_function, unicode_literals
-
 import numbers
 import numbers
 import socket
 import socket
 import sys
 import sys

+ 0 - 2
celery/apps/worker.py

@@ -5,8 +5,6 @@ It does everything necessary to run that module
 as an actual application, like installing signal handlers,
 as an actual application, like installing signal handlers,
 platform tweaks, and so on.
 platform tweaks, and so on.
 """
 """
-from __future__ import absolute_import, print_function, unicode_literals
-
 import logging
 import logging
 import os
 import os
 import platform as _platform
 import platform as _platform

+ 0 - 2
celery/backends/__init__.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Backend abstract factory (...did I just say that?) and alias definitions."""
 """Backend abstract factory (...did I just say that?) and alias definitions."""
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 import types
 import types
 
 

+ 0 - 2
celery/backends/amqp.py

@@ -3,8 +3,6 @@
 
 
 This backend publishes results as messages, one queue per task(!)
 This backend publishes results as messages, one queue per task(!)
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from .rpc import BaseRPCBackend
 from .rpc import BaseRPCBackend
 
 
 from celery.utils import deprecated
 from celery.utils import deprecated

+ 0 - 2
celery/backends/async.py

@@ -1,6 +1,4 @@
 """Async I/O backend support utilities."""
 """Async I/O backend support utilities."""
-from __future__ import absolute_import, unicode_literals
-
 import socket
 import socket
 
 
 from collections import deque
 from collections import deque

+ 0 - 2
celery/backends/base.py

@@ -6,8 +6,6 @@
 - :class:`KeyValueStoreBackend` is a common base class
 - :class:`KeyValueStoreBackend` is a common base class
     using K/V semantics like _get and _put.
     using K/V semantics like _get and _put.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 import time
 import time
 
 

+ 0 - 2
celery/backends/cache.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Memcached and in-memory cache result backend."""
 """Memcached and in-memory cache result backend."""
-from __future__ import absolute_import, unicode_literals
-
 from kombu.utils import cached_property
 from kombu.utils import cached_property
 from kombu.utils.encoding import bytes_to_str, ensure_bytes
 from kombu.utils.encoding import bytes_to_str, ensure_bytes
 
 

+ 5 - 6
celery/backends/cassandra.py

@@ -1,6 +1,10 @@
 # -* coding: utf-8 -*-
 # -* coding: utf-8 -*-
 """Apache Cassandra result store backend using the DataStax driver."""
 """Apache Cassandra result store backend using the DataStax driver."""
-from __future__ import absolute_import, unicode_literals
+from celery import states
+from celery.exceptions import ImproperlyConfigured
+from celery.utils.log import get_logger
+
+from .base import BaseBackend
 
 
 try:  # pragma: no cover
 try:  # pragma: no cover
     import cassandra
     import cassandra
@@ -9,11 +13,6 @@ try:  # pragma: no cover
 except ImportError:  # pragma: no cover
 except ImportError:  # pragma: no cover
     cassandra = None   # noqa
     cassandra = None   # noqa
 
 
-from celery import states
-from celery.exceptions import ImproperlyConfigured
-from celery.utils.log import get_logger
-from .base import BaseBackend
-
 __all__ = ['CassandraBackend']
 __all__ = ['CassandraBackend']
 
 
 logger = get_logger(__name__)
 logger = get_logger(__name__)

+ 0 - 2
celery/backends/consul.py

@@ -4,8 +4,6 @@
 - :class:`ConsulBackend` implements KeyValueStoreBackend to store results
 - :class:`ConsulBackend` implements KeyValueStoreBackend to store results
     in the key-value store of Consul.
     in the key-value store of Consul.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from kombu.utils.url import parse_url
 from kombu.utils.url import parse_url
 
 
 from celery.exceptions import ImproperlyConfigured
 from celery.exceptions import ImproperlyConfigured

+ 0 - 2
celery/backends/couchbase.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Couchbase result store backend."""
 """Couchbase result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 import logging
 import logging
 
 
 try:
 try:

+ 0 - 2
celery/backends/couchdb.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """CouchDB result store backend."""
 """CouchDB result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 from kombu.utils.url import _parse_url
 from kombu.utils.url import _parse_url
 
 
 from celery.exceptions import ImproperlyConfigured
 from celery.exceptions import ImproperlyConfigured

+ 0 - 2
celery/backends/database/__init__.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """SQLAlchemy result store backend."""
 """SQLAlchemy result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 import logging
 import logging
 
 
 from contextlib import contextmanager
 from contextlib import contextmanager

+ 0 - 2
celery/backends/database/models.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Database models used by the SQLAlchemy result store backend."""
 """Database models used by the SQLAlchemy result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 from datetime import datetime
 from datetime import datetime
 
 
 import sqlalchemy as sa
 import sqlalchemy as sa

+ 0 - 2
celery/backends/database/session.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """SQLAlchemy session."""
 """SQLAlchemy session."""
-from __future__ import absolute_import, unicode_literals
-
 from sqlalchemy import create_engine
 from sqlalchemy import create_engine
 from sqlalchemy.ext.declarative import declarative_base
 from sqlalchemy.ext.declarative import declarative_base
 from sqlalchemy.orm import sessionmaker
 from sqlalchemy.orm import sessionmaker

+ 0 - 2
celery/backends/elasticsearch.py

@@ -1,7 +1,5 @@
 # -* coding: utf-8 -*-
 # -* coding: utf-8 -*-
 """Elasticsearch result store backend."""
 """Elasticsearch result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 from datetime import datetime
 from datetime import datetime
 
 
 from kombu.utils.url import _parse_url
 from kombu.utils.url import _parse_url

+ 0 - 2
celery/backends/filesystem.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """File-system result store backend."""
 """File-system result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 from kombu.utils.encoding import ensure_bytes
 from kombu.utils.encoding import ensure_bytes
 
 
 from celery import uuid
 from celery import uuid

+ 0 - 2
celery/backends/mongodb.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """MongoDB result store backend."""
 """MongoDB result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 from datetime import datetime, timedelta
 from datetime import datetime, timedelta
 
 
 from kombu.utils import cached_property
 from kombu.utils import cached_property

+ 0 - 2
celery/backends/redis.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Redis result store backend."""
 """Redis result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 from functools import partial
 from functools import partial
 
 
 from kombu.utils import cached_property, retry_over_time
 from kombu.utils import cached_property, retry_over_time

+ 0 - 2
celery/backends/riak.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Riak result store backend."""
 """Riak result store backend."""
-from __future__ import absolute_import, unicode_literals
-
 try:
 try:
     import riak
     import riak
     from riak import RiakClient
     from riak import RiakClient

+ 0 - 2
celery/backends/rpc.py

@@ -3,8 +3,6 @@
 
 
 RPC-style result backend, using reply-to and one queue per client.
 RPC-style result backend, using reply-to and one queue per client.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from kombu import Consumer, Exchange, Producer, Queue
 from kombu import Consumer, Exchange, Producer, Queue
 from kombu.common import maybe_declare
 from kombu.common import maybe_declare
 from kombu.utils import cached_property, register_after_fork
 from kombu.utils import cached_property, register_after_fork

+ 0 - 2
celery/beat.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """The periodic task scheduler."""
 """The periodic task scheduler."""
-from __future__ import absolute_import, unicode_literals
-
 import errno
 import errno
 import heapq
 import heapq
 import os
 import os

+ 0 - 2
celery/bin/__init__.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 from .base import Option
 from .base import Option
 
 
 __all__ = ['Option']
 __all__ = ['Option']

+ 0 - 2
celery/bin/amqp.py

@@ -3,8 +3,6 @@
 
 
 .. program:: celery amqp
 .. program:: celery amqp
 """
 """
-from __future__ import absolute_import, print_function, unicode_literals
-
 import cmd
 import cmd
 import sys
 import sys
 import shlex
 import shlex

+ 0 - 2
celery/bin/base.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Base command-line interface."""
 """Base command-line interface."""
-from __future__ import absolute_import, print_function, unicode_literals
-
 import os
 import os
 import random
 import random
 import re
 import re

+ 0 - 2
celery/bin/beat.py

@@ -64,8 +64,6 @@
 
 
     Executable to use for the detached process.
     Executable to use for the detached process.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from functools import partial
 from functools import partial
 
 
 from celery.platforms import detached, maybe_drop_privileges
 from celery.platforms import detached, maybe_drop_privileges

+ 0 - 2
celery/bin/celery.py

@@ -254,8 +254,6 @@ in any command that also has a `--detach` option.
 
 
     Destination routing key (defaults to the queue routing key).
     Destination routing key (defaults to the queue routing key).
 """
 """
-from __future__ import absolute_import, unicode_literals, print_function
-
 import codecs
 import codecs
 import numbers
 import numbers
 import os
 import os

+ 0 - 2
celery/bin/celeryd_detach.py

@@ -5,8 +5,6 @@ Using :func:`os.execv` as forking and multiprocessing
 leads to weird issues (it was a long time ago now, but it
 leads to weird issues (it was a long time ago now, but it
 could have something to do with the threading mutex bug)
 could have something to do with the threading mutex bug)
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import celery
 import celery
 import os
 import os
 import sys
 import sys

+ 0 - 2
celery/bin/events.py

@@ -65,8 +65,6 @@
 
 
     Executable to use for the detached process.
     Executable to use for the detached process.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 
 
 from functools import partial
 from functools import partial

+ 0 - 2
celery/bin/graph.py

@@ -3,8 +3,6 @@
 
 
 .. program:: celery graph
 .. program:: celery graph
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from operator import itemgetter
 from operator import itemgetter
 
 
 from celery.utils.graph import DependencyGraph, GraphFormatter
 from celery.utils.graph import DependencyGraph, GraphFormatter

+ 0 - 3
celery/bin/logtool.py

@@ -3,9 +3,6 @@
 
 
 .. program:: celery logtool
 .. program:: celery logtool
 """
 """
-
-from __future__ import absolute_import, unicode_literals
-
 import re
 import re
 
 
 from collections import Counter
 from collections import Counter

+ 0 - 3
celery/bin/multi.py

@@ -93,9 +93,6 @@ Examples
     celery worker -n baz@myhost -c 10
     celery worker -n baz@myhost -c 10
     celery worker -n xuzzy@myhost -c 3
     celery worker -n xuzzy@myhost -c 3
 """
 """
-from __future__ import absolute_import, print_function, unicode_literals
-
-import errno
 import os
 import os
 import shlex
 import shlex
 import signal
 import signal

+ 0 - 2
celery/bin/worker.py

@@ -161,8 +161,6 @@ The :program:`celery worker` command (previously known as ``celeryd``)
 
 
     Executable to use for the detached process.
     Executable to use for the detached process.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 
 
 from optparse import OptionGroup
 from optparse import OptionGroup

+ 0 - 2
celery/bootsteps.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """A directed acyclic graph of reusable components."""
 """A directed acyclic graph of reusable components."""
-from __future__ import absolute_import, unicode_literals
-
 from collections import deque
 from collections import deque
 from threading import Event
 from threading import Event
 
 

+ 0 - 2
celery/canvas.py

@@ -5,8 +5,6 @@
 
 
     You should import these from :mod:`celery` and not this module.
     You should import these from :mod:`celery` and not this module.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from collections import MutableSequence, deque
 from collections import MutableSequence, deque
 from copy import deepcopy
 from copy import deepcopy
 from functools import partial as _partial, reduce
 from functools import partial as _partial, reduce

+ 0 - 2
celery/concurrency/__init__.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Pool implementation abstract factory, and alias definitions."""
 """Pool implementation abstract factory, and alias definitions."""
-from __future__ import absolute_import, unicode_literals
-
 # Import from kombu directly as it's used
 # Import from kombu directly as it's used
 # early in the import stage, where celery.utils loads
 # early in the import stage, where celery.utils loads
 # too much (e.g. for eventlet patching)
 # too much (e.g. for eventlet patching)

+ 3 - 1
celery/concurrency/asynpool.py

@@ -13,7 +13,7 @@ This code deals with three major challenges:
 #. Sending jobs to the processes and receiving results back.
 #. Sending jobs to the processes and receiving results back.
 #. Safely shutting down this system.
 #. Safely shutting down this system.
 """
 """
-from __future__ import absolute_import, unicode_literals
+from __future__ import generator_stop
 
 
 import errno
 import errno
 import gc
 import gc
@@ -849,6 +849,8 @@ class AsynPool(_pool.Pool):
                         yield
                         yield
                     else:
                     else:
                         errors = 0
                         errors = 0
+            except StopIteration:
+                pass
             finally:
             finally:
                 hub_remove(fd)
                 hub_remove(fd)
                 write_stats[proc.index] += 1
                 write_stats[proc.index] += 1

+ 0 - 2
celery/concurrency/base.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Base Execution Pool"""
 """Base Execution Pool"""
-from __future__ import absolute_import, unicode_literals
-
 import logging
 import logging
 import os
 import os
 import sys
 import sys

+ 0 - 2
celery/concurrency/eventlet.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Eventlet execution pool."""
 """Eventlet execution pool."""
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 
 
 from time import time
 from time import time

+ 0 - 2
celery/concurrency/gevent.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Gevent execution pool."""
 """Gevent execution pool."""
-from __future__ import absolute_import, unicode_literals
-
 from time import time
 from time import time
 
 
 try:
 try:

+ 0 - 2
celery/concurrency/prefork.py

@@ -3,8 +3,6 @@
 
 
 Pool implementation using :mod:`multiprocessing`.
 Pool implementation using :mod:`multiprocessing`.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import os
 import os
 
 
 from billiard.common import REMAP_SIGTERM, TERM_SIGNAME
 from billiard.common import REMAP_SIGTERM, TERM_SIGNAME

+ 0 - 2
celery/concurrency/solo.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Single-threaded execution pool."""
 """Single-threaded execution pool."""
-from __future__ import absolute_import, unicode_literals
-
 import os
 import os
 
 
 from .base import BasePool, apply_target
 from .base import BasePool, apply_target

+ 0 - 6
celery/contrib/abortable.py

@@ -28,8 +28,6 @@ In the consumer:
 
 
 .. code-block:: python
 .. code-block:: python
 
 
-    from __future__ import absolute_import
-
     from celery.contrib.abortable import AbortableTask
     from celery.contrib.abortable import AbortableTask
     from celery.utils.log import get_task_logger
     from celery.utils.log import get_task_logger
 
 
@@ -57,8 +55,6 @@ In the producer:
 
 
 .. code-block:: python
 .. code-block:: python
 
 
-    from __future__ import absolute_import
-
     import time
     import time
 
 
     from proj.tasks import MyLongRunningTask
     from proj.tasks import MyLongRunningTask
@@ -83,8 +79,6 @@ have it block until the task is finished.
    database backend.  Therefore, this class will only work with the
    database backend.  Therefore, this class will only work with the
    database backends.
    database backends.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from celery import Task
 from celery import Task
 from celery.result import AsyncResult
 from celery.result import AsyncResult
 
 

+ 0 - 2
celery/contrib/migrate.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Message migration tools (Broker <-> Broker)."""
 """Message migration tools (Broker <-> Broker)."""
-from __future__ import absolute_import, print_function, unicode_literals
-
 import socket
 import socket
 
 
 from functools import partial
 from functools import partial

+ 0 - 2
celery/contrib/rdb.py

@@ -41,8 +41,6 @@ Environment Variables
     The debugger will try to find an available port starting from the
     The debugger will try to find an available port starting from the
     base port.  The selected port will be logged by the worker.
     base port.  The selected port will be logged by the worker.
 """
 """
-from __future__ import absolute_import, print_function, unicode_literals
-
 import errno
 import errno
 import os
 import os
 import socket
 import socket

+ 0 - 2
celery/contrib/sphinx.py

@@ -28,8 +28,6 @@ using `:task:proj.tasks.add` syntax.
 
 
 Use ``.. autotask::`` to manually document a task.
 Use ``.. autotask::`` to manually document a task.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from inspect import formatargspec, getfullargspec
 from inspect import formatargspec, getfullargspec
 
 
 from sphinx.domains.python import PyModulelevel
 from sphinx.domains.python import PyModulelevel

+ 0 - 2
celery/events/__init__.py

@@ -5,8 +5,6 @@ Events is a stream of messages sent for certain actions occurring
 in the worker (and clients if :setting:`task_send_sent_event`
 in the worker (and clients if :setting:`task_send_sent_event`
 is enabled), used for monitoring purposes.
 is enabled), used for monitoring purposes.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import os
 import os
 import time
 import time
 import threading
 import threading

+ 0 - 2
celery/events/cursesmon.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Graphical monitor of Celery events using curses."""
 """Graphical monitor of Celery events using curses."""
-from __future__ import absolute_import, print_function, unicode_literals
-
 import curses
 import curses
 import sys
 import sys
 import threading
 import threading

+ 0 - 2
celery/events/dumper.py

@@ -4,8 +4,6 @@
 This is a simple program that dumps events to the console
 This is a simple program that dumps events to the console
 as they happen. Think of it like a `tcpdump` for Celery events.
 as they happen. Think of it like a `tcpdump` for Celery events.
 """
 """
-from __future__ import absolute_import, print_function, unicode_literals
-
 import sys
 import sys
 
 
 from datetime import datetime
 from datetime import datetime

+ 0 - 2
celery/events/snapshot.py

@@ -7,8 +7,6 @@ state of a cluster at regular intervals.  There is a full
 implementation of this writing the snapshots to a database
 implementation of this writing the snapshots to a database
 in :mod:`djcelery.snapshots` in the `django-celery` distribution.
 in :mod:`djcelery.snapshots` in the `django-celery` distribution.
 """
 """
-from __future__ import absolute_import, print_function, unicode_literals
-
 from kombu.utils.limits import TokenBucket
 from kombu.utils.limits import TokenBucket
 
 
 from celery import platforms
 from celery import platforms

+ 0 - 2
celery/events/state.py

@@ -13,8 +13,6 @@ Snapshots (:mod:`celery.events.snapshot`) can be used to
 take "pictures" of this state at regular intervals
 take "pictures" of this state at regular intervals
 to e.g. store that in a database.
 to e.g. store that in a database.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import bisect
 import bisect
 import sys
 import sys
 import threading
 import threading

+ 0 - 2
celery/exceptions.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """This module contains all exceptions used by the Celery API."""
 """This module contains all exceptions used by the Celery API."""
-from __future__ import absolute_import, unicode_literals
-
 import numbers
 import numbers
 
 
 from billiard.exceptions import (  # noqa
 from billiard.exceptions import (  # noqa

+ 0 - 2
celery/five.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Python 2/3 compatibility utilities."""
 """Python 2/3 compatibility utilities."""
-from __future__ import absolute_import, unicode_literals
-
 import operator
 import operator
 import sys
 import sys
 
 

+ 0 - 2
celery/fixups/django.py

@@ -1,6 +1,4 @@
 """Django-specific customization."""
 """Django-specific customization."""
-from __future__ import absolute_import, unicode_literals
-
 import os
 import os
 import sys
 import sys
 import warnings
 import warnings

+ 0 - 2
celery/loaders/__init__.py

@@ -4,8 +4,6 @@
 Loaders define how configuration is read, what happens
 Loaders define how configuration is read, what happens
 when workers start, when tasks are executed and so on.
 when workers start, when tasks are executed and so on.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from celery.utils.imports import symbol_by_name, import_from_cwd
 from celery.utils.imports import symbol_by_name, import_from_cwd
 
 
 __all__ = ['get_loader_cls']
 __all__ = ['get_loader_cls']

+ 0 - 2
celery/loaders/app.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """The default loader used with custom app instances."""
 """The default loader used with custom app instances."""
-from __future__ import absolute_import, unicode_literals
-
 from .base import BaseLoader
 from .base import BaseLoader
 
 
 __all__ = ['AppLoader']
 __all__ = ['AppLoader']

+ 0 - 2
celery/loaders/base.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Loader base class."""
 """Loader base class."""
-from __future__ import absolute_import, unicode_literals
-
 import imp as _imp
 import imp as _imp
 import importlib
 import importlib
 import os
 import os

+ 0 - 2
celery/loaders/default.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """The default loader used when no custom app has been initialized."""
 """The default loader used when no custom app has been initialized."""
-from __future__ import absolute_import, unicode_literals
-
 import os
 import os
 import warnings
 import warnings
 
 

+ 0 - 2
celery/local.py

@@ -6,8 +6,6 @@ soon as possible, and that shall not load any third party modules.
 
 
 Parts of this module is Copyright by Werkzeug Team.
 Parts of this module is Copyright by Werkzeug Team.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 import importlib
 import importlib
 
 
 __all__ = ['Proxy', 'PromiseProxy', 'try_import', 'maybe_evaluate']
 __all__ = ['Proxy', 'PromiseProxy', 'try_import', 'maybe_evaluate']

+ 1 - 3
celery/platforms.py

@@ -1,8 +1,6 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Utilities dealing with platform specifics: signals, daemonization,
 """Utilities dealing with platform specifics: signals, daemonization,
 users, groups, and so on."""
 users, groups, and so on."""
-from __future__ import absolute_import, print_function, unicode_literals
-
 import atexit
 import atexit
 import errno
 import errno
 import math
 import math
@@ -136,7 +134,7 @@ class Pidfile:
         """Acquire lock."""
         """Acquire lock."""
         try:
         try:
             self.write_pid()
             self.write_pid()
-        except FileExistsError:
+        except FileExistsError as exc:
             raise LockFailed(str(exc)).with_traceback(sys.exc_info()[2])
             raise LockFailed(str(exc)).with_traceback(sys.exc_info()[2])
         return self
         return self
     __enter__ = acquire
     __enter__ = acquire

+ 0 - 2
celery/result.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Task results/state and results for groups of tasks."""
 """Task results/state and results for groups of tasks."""
-from __future__ import absolute_import, unicode_literals
-
 import time
 import time
 
 
 from collections import OrderedDict, deque
 from collections import OrderedDict, deque

+ 0 - 2
celery/schedules.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Schedules define the intervals at which periodic tasks run."""
 """Schedules define the intervals at which periodic tasks run."""
-from __future__ import absolute_import, unicode_literals
-
 import numbers
 import numbers
 import re
 import re
 
 

+ 0 - 2
celery/security/__init__.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Message Signing Serializer."""
 """Message Signing Serializer."""
-from __future__ import absolute_import, unicode_literals
-
 from kombu.serialization import (
 from kombu.serialization import (
     registry, disable_insecure_serializers as _disable_insecure_serializers,
     registry, disable_insecure_serializers as _disable_insecure_serializers,
 )
 )

+ 0 - 2
celery/security/certificate.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """X.509 certificates."""
 """X.509 certificates."""
-from __future__ import absolute_import, unicode_literals
-
 import glob
 import glob
 import os
 import os
 
 

+ 0 - 2
celery/security/key.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Private keys for the security serializer."""
 """Private keys for the security serializer."""
-from __future__ import absolute_import, unicode_literals
-
 from kombu.utils.encoding import ensure_bytes
 from kombu.utils.encoding import ensure_bytes
 
 
 from .utils import crypto, reraise_errors
 from .utils import crypto, reraise_errors

+ 0 - 2
celery/security/serialization.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Secure serializer."""
 """Secure serializer."""
-from __future__ import absolute_import, unicode_literals
-
 from kombu.serialization import registry, dumps, loads
 from kombu.serialization import registry, dumps, loads
 from kombu.utils.encoding import bytes_to_str, str_to_bytes, ensure_bytes
 from kombu.utils.encoding import bytes_to_str, str_to_bytes, ensure_bytes
 
 

+ 0 - 2
celery/security/utils.py

@@ -1,7 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
 """Utilities used by the message signing serializer."""
 """Utilities used by the message signing serializer."""
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 
 
 from contextlib import contextmanager
 from contextlib import contextmanager

+ 0 - 2
celery/signals.py

@@ -9,8 +9,6 @@ functions are called whenever a signal is called.
 
 
 See :ref:`signals` for more information.
 See :ref:`signals` for more information.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from .utils.dispatch import Signal
 from .utils.dispatch import Signal
 
 
 __all__ = [
 __all__ = [

+ 0 - 1
celery/states.py

@@ -52,7 +52,6 @@ Misc.
 -----
 -----
 
 
 """
 """
-from __future__ import absolute_import, unicode_literals
 
 
 __all__ = [
 __all__ = [
     'PENDING', 'RECEIVED', 'STARTED', 'SUCCESS', 'FAILURE',
     'PENDING', 'RECEIVED', 'STARTED', 'SUCCESS', 'FAILURE',

+ 0 - 2
celery/task/__init__.py

@@ -6,8 +6,6 @@ import from the main 'celery' module instead.
 If you're looking for the decorator implementation then that's in
 If you're looking for the decorator implementation then that's in
 ``celery.app.base.Celery.task``.
 ``celery.app.base.Celery.task``.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from celery._state import current_app, current_task as current
 from celery._state import current_app, current_task as current
 from celery.five import LazyModule, recreate_module
 from celery.five import LazyModule, recreate_module
 from celery.local import Proxy
 from celery.local import Proxy

+ 0 - 2
celery/task/base.py

@@ -6,8 +6,6 @@ The task implementation has been moved to :mod:`celery.app.task`.
 This contains the backward compatible Task class used in the old API,
 This contains the backward compatible Task class used in the old API,
 and shouldn't be used in new applications.
 and shouldn't be used in new applications.
 """
 """
-from __future__ import absolute_import, unicode_literals
-
 from kombu import Exchange
 from kombu import Exchange
 
 
 from celery import current_app
 from celery import current_app

+ 0 - 2
celery/tests/__init__.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 import logging
 import logging
 import os
 import os
 import sys
 import sys

+ 0 - 2
celery/tests/app/test_amqp.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 from datetime import datetime, timedelta
 from datetime import datetime, timedelta
 
 
 from kombu import Exchange, Queue
 from kombu import Exchange, Queue

+ 0 - 2
celery/tests/app/test_annotations.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 from celery.app.annotations import MapAnnotation, prepare
 from celery.app.annotations import MapAnnotation, prepare
 from celery.utils.imports import qualname
 from celery.utils.imports import qualname
 
 

+ 0 - 2
celery/tests/app/test_app.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 import gc
 import gc
 import os
 import os
 import itertools
 import itertools

+ 0 - 2
celery/tests/app/test_beat.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 import errno
 import errno
 
 
 from datetime import datetime, timedelta
 from datetime import datetime, timedelta

+ 0 - 2
celery/tests/app/test_builtins.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 from celery import group, chord
 from celery import group, chord
 from celery.app import builtins
 from celery.app import builtins
 from celery.utils.functional import pass1
 from celery.utils.functional import pass1

+ 0 - 2
celery/tests/app/test_celery.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 from celery.tests.case import AppCase
 from celery.tests.case import AppCase
 
 
 import celery
 import celery

+ 0 - 2
celery/tests/app/test_control.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 from kombu.pidbox import Mailbox
 from kombu.pidbox import Mailbox
 from vine.utils import wraps
 from vine.utils import wraps
 
 

+ 0 - 2
celery/tests/app/test_defaults.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 
 
 from importlib import import_module
 from importlib import import_module

+ 0 - 2
celery/tests/app/test_exceptions.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 import pickle
 import pickle
 
 
 from datetime import datetime
 from datetime import datetime

+ 0 - 2
celery/tests/app/test_loaders.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 import os
 import os
 import sys
 import sys
 import warnings
 import warnings

+ 0 - 2
celery/tests/app/test_log.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 import sys
 import sys
 import logging
 import logging
 
 

+ 0 - 2
celery/tests/app/test_registry.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 from celery.app.registry import _unpickle_task, _unpickle_task_v2
 from celery.app.registry import _unpickle_task, _unpickle_task_v2
 from celery.tests.case import AppCase, depends_on_current_app
 from celery.tests.case import AppCase, depends_on_current_app
 
 

+ 0 - 2
celery/tests/app/test_routes.py

@@ -1,5 +1,3 @@
-from __future__ import absolute_import, unicode_literals
-
 from kombu import Exchange, Queue
 from kombu import Exchange, Queue
 from kombu.utils.functional import maybe_evaluate
 from kombu.utils.functional import maybe_evaluate
 
 

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů