diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-07-30 09:40:47 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-07-30 09:40:47 +0000 |
commit | 00fa37f2c8249c3f226484ba3f2d470a5a7f9f3d (patch) | |
tree | acd14d8ea5bce861ef6183b90a8a18c096d1cb48 | |
parent | d1c546e5bb8c35c7f8d35a230d8c58414d4866b7 (diff) | |
parent | 93eb0febc7e46121f4d7baca921085cb7b19b729 (diff) | |
download | oslo-messaging-00fa37f2c8249c3f226484ba3f2d470a5a7f9f3d.tar.gz |
Merge "Fully use futurist code-base to abstract concurrent.futures away"
-rw-r--r-- | oslo_messaging/_executors/impl_pooledexecutor.py | 6 | ||||
-rw-r--r-- | requirements.txt | 12 |
2 files changed, 2 insertions, 16 deletions
diff --git a/oslo_messaging/_executors/impl_pooledexecutor.py b/oslo_messaging/_executors/impl_pooledexecutor.py index 6874336..598229c 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 1ec26bf..764d699 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 |