swift/swift
Tim Burke 1af2dd6ac9 Fix docs-building on old stable branches
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
2022-04-19 22:48:19 -07:00
..
account Add Timestamp.now() helper 2017-04-27 14:19:00 -07:00
cli Merge "Add a jitter for check of time synchronization." 2017-08-18 23:55:47 +00:00
common Fix docs-building on old stable branches 2022-04-19 22:48:19 -07:00
container Merge "Add Timestamp.now() helper" 2017-07-18 03:27:50 +00:00
locale Imported Translations from Zanata 2017-08-02 10:44:25 +00:00
obj object-server can 409 in response to x-if-delete-at 2019-01-09 09:01:30 +01:00
proxy Fix time skew when using X-Delete-After 2018-08-03 08:15:09 +02:00
__init__.py Make pbr a build-time only dependency 2013-10-29 12:29:49 -07:00