From 8e5893f0ad074a3b82d7e8f5b8821695ee6ec15b Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 26 Mar 2020 10:33:22 -0500 Subject: [PATCH] Revert "Switch to futurist for concurrency" This partially reverts commit b6a22e3749555ecf9fea762dfc4935e312f6d8bb. The addition of futurist as a hard depend broke python2, and at the same time didn't mark the release as having done so. In looking at the issue we realized that we don't actually need the hard depend. Change-Id: I2d874f618f5b3f66d49cd2e964c6e05655f22c0f --- .zuul.yaml | 2 -- lower-constraints.txt | 1 - openstack/connection.py | 4 ++-- releasenotes/notes/revert-futurist-34acc42fd3f0e7f3.yaml | 8 ++++++++ requirements.txt | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/revert-futurist-34acc42fd3f0e7f3.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 26a204990..f44c4e0b3 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -413,7 +413,6 @@ voting: false - osc-functional-devstack-tips: voting: false - - nodepool-functional-openstack-src # Ironic jobs, non-voting to avoid tight coupling - ironic-inspector-tempest-openstacksdk-src: voting: false @@ -428,4 +427,3 @@ - openstacksdk-functional-devstack - openstacksdk-functional-devstack-networking - openstacksdk-functional-devstack-senlin - - nodepool-functional-openstack-src diff --git a/lower-constraints.txt b/lower-constraints.txt index 5760bc665..1f491875d 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -9,7 +9,6 @@ extras==1.0.0 fixtures==3.0.0 future==0.16.0 futures==3.0.0 -futurist==2.1.0 ipaddress==1.0.17 iso8601==0.1.11 jmespath==0.9.0 diff --git a/openstack/connection.py b/openstack/connection.py index 2ee65ec06..1da50c601 100644 --- a/openstack/connection.py +++ b/openstack/connection.py @@ -179,7 +179,7 @@ Additional information about the services can be found in the import warnings import weakref -import futurist +import concurrent.futures import keystoneauth1.exceptions import requestsexceptions import six @@ -504,7 +504,7 @@ class Connection( @property def _pool_executor(self): if not self.__pool_executor: - self.__pool_executor = futurist.ThreadPoolExecutor( + self.__pool_executor = concurrent.futures.ThreadPoolExecutor( max_workers=5) return self.__pool_executor diff --git a/releasenotes/notes/revert-futurist-34acc42fd3f0e7f3.yaml b/releasenotes/notes/revert-futurist-34acc42fd3f0e7f3.yaml new file mode 100644 index 000000000..28712cd8f --- /dev/null +++ b/releasenotes/notes/revert-futurist-34acc42fd3f0e7f3.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + Removed the dependency on futurist, which isn't necessary. + Users can still pass futurist executors if they want, as + the API is the same, but if nothing is passed, + ``concurrent.futures.ThreadPoolExecutor`` will be used as + the default. diff --git a/requirements.txt b/requirements.txt index bda4eb9ff..90a88c6e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ munch>=2.1.0 # MIT decorator>=4.4.1 # BSD jmespath>=0.9.0 # MIT ipaddress>=1.0.17;python_version<'3.3' # PSF -futurist>=2.1.0 # Apache-2.0 +futures>=3.0.0;python_version=='2.7' or python_version=='2.6' # BSD iso8601>=0.1.11 # MIT netifaces>=0.10.4 # MIT