diff --git a/oslo_messaging/_executors/impl_pooledexecutor.py b/oslo_messaging/_executors/impl_pooledexecutor.py index 68743368c..598229c07 100644 --- a/oslo_messaging/_executors/impl_pooledexecutor.py +++ b/oslo_messaging/_executors/impl_pooledexecutor.py @@ -15,10 +15,9 @@ # under the License. import collections -import functools import threading -from concurrent import futures +from futurist import waiters from oslo_config import cfg from oslo_utils import excutils @@ -54,8 +53,7 @@ class PooledExecutor(base.ExecutorBase): _executor_cls = None # Blocking function that should wait for all provided futures to finish. - _wait_for_all = functools.partial(futures.wait, - return_when=futures.ALL_COMPLETED) + _wait_for_all = staticmethod(waiters.wait_for_all) def __init__(self, conf, listener, dispatcher): super(PooledExecutor, self).__init__(conf, listener, dispatcher) diff --git a/requirements.txt b/requirements.txt index 1ec26bf2a..764d699d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,18 +37,6 @@ kombu>=3.0.7 # middleware oslo.middleware>=2.4.0 # Apache-2.0 -# FIXME: concurrent.futures is part of the Python stdlib since Python 3.2, -# but the requirements is still needed because of a bug in tox: -# https://bitbucket.org/hpk42/tox/issue/236/tox-must-create-the-source-distribution -# -# Tox builds a source distribution with "python setup.py sdist" which uses -# requirements.txt even if tox wants to build the py34 virtual environment. -# As a consequence, oslo.messaging.egg_info/requires.txt contains futures -# and oslo_messaging.tests.test_opts.OptsTestCase.test_entry_point fails. -# -# for the futures based executor -futures>=3.0;python_version=='2.7' or python_version=='2.6' - # needed by the aioeventlet executor aioeventlet>=0.4 trollius>=1.0