For a while now, the nightly job has bombed out with something like
Warning, treated as error:
.../swift/doc/source/middleware.rst:268: (WARNING/2) autodoc: failed to import module
'swift.common.middleware.xprofile'; the following exception was raised:
Traceback (most recent call last):
File ".../python3.5/site-packages/sphinx/ext/autodoc.py", line 657, in import_object
__import__(self.modname)
File ".../python3.5/site-packages/swift/common/middleware/xprofile.py", line 82, in <module>
import eventlet.green.profile as eprofile
File ".../python3.5/site-packages/eventlet/green/profile.py", line 45, in <module>
thread = patcher.original('thread') # non-monkeypatched module needed
File ".../python3.5/site-packages/eventlet/patcher.py", line 194, in original
real_mod = __import__(modname, {}, {}, modname.split('.')[:-1])
ImportError: No module named 'thread'
Not sure why we're running under py35 (the job definition calls out
`sphinx_python: python2`), but that's the crux of the issue -- neither
us nor our dependencies support py3 that far back, so having eventlet
constrained to 0.20.0 on stable/pike and stable/queens is setting us up
for failure.
On the plus side, it's just docs! We don't really *need* this import to
build docs, so catch the ImportError and call it None.
After that, also need to fix some import for xprofile.
Also, fix some tuple-unpacking-in-function-args trouble.
Related-Change: Ie8d28218b974a1b6b7b7b691f786ff1d6bdded05
Change-Id: I56f10d8e25e57da59f3da57fe797f615433d70a7