Here's a simple test case from the virtualenv which shows a failure to call the module using the existing import, and a success using an alternative approach:
(nova-22.0.0) root@infra1-nova-api-container-c49119df:~# python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import eventlet
>>> eventlet.tpool.execute
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'eventlet' has no attribute 'tpool'
>>> from eventlet import tpool
>>> tpool.execute
<function execute at 0x7f512ee14ea0>
Here's a simple test case from the virtualenv which shows a failure to call the module using the existing import, and a success using an alternative approach:
root@infra1- nova-api- container- c49119df: ~# source /openstack/ venvs/nova- 22.0.0/ bin/activate
(nova-22.0.0) root@infra1- nova-api- container- c49119df: ~# python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import eventlet tpool.execute
>>> eventlet.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'eventlet' has no attribute 'tpool'
>>> from eventlet import tpool
>>> tpool.execute
<function execute at 0x7f512ee14ea0>