Pass pngcrush on status png files

The png files have been added in Change I635ed101:
 "Add subway map to status page" (sha1 5caf4f6)

Change-Id: I9360e48bf29eaba30311dac44cda3866768842da
Use except x as y instead of except x, y

According to https://docs.python.org/3/howto/pyporting.html the
syntax changed in Python 3.x. The new syntax is usable with
Python >= 2.6 and should be preferred to be compatible with Python3.

Enabled hacking check H231.

Change-Id: I7ce80163cc328c0368583d1dc76e9e0b0f7cd6dc
Remove trailing spaces in debug log

We had a few trailing spaces in debug log.  My favorite pager (vim)
highlight trailing spaces with red characters which is slightly
annoying.

Change-Id: Ibd8aa4286d185b1b59d88352e68c6201a47e481d
Add toggleable yappi profiling to zuul

Add a bit more functionality to the SIGUSR2 handler in zuul. When that
handler is run toggle the state of the yappi profiler and when we turn
the profiler off log the profiling data. Do this in addition to the
normal thread dumps.

Change-Id: I127cfb924f0576072d26bde0b4204f8636195d97
Stop gzipping zuul status json in zuul

It is expensive for zuul to do gzipping of data in zuul. Stop gzipping
here and have apache (or some other proxy) do it for you in cases where
smaller json is helpful. This offloads the work from zuul so that it can
focus on scheduling tests.

partial-bug: 1326170
Change-Id: Ieef0a19b4b36b28118a6a93ebd595a5287848034
Cache zuul status.json for one second.

Serve previously rendered zuul status.json if it is was formatted less
than one second prior. This caches the status.json reducing expensive
calls to format the status.json.

The cache ttl is configurable using the zuul.status_expiry configuration
option in the zuul config.

Change-Id: Ib3fcd75f30bc4d4ef5f09d2adfd566d10c58a991
Merge "Stop gzipping zuul status json in zuul"
Merge "Cache zuul status.json for one second."
Merge "Add toggleable yappi profiling to zuul"
Set Last-Modified header when serving status.json

Apache won't cache anything without a Last-Modified header. Be a good
citizen and set the Last-Modified header when serving status.json data.
Set the value to the cache_time timestamp.

Update the status checking test to make sure that this and other headers
are properly present so that this does not regress.

Change-Id: I2215d9c9694bd9ef7b94f29f654da77ae85a9959
Merge "Remove trailing spaces in debug log"
Merge "Pass pngcrush on status png files"
Merge "Use except x as y instead of except x, y"
wmf: make swiftclient an optional dependency

Swift is only used when there is a [swift] configuration section, but we
always import the swiftclient module.

I can not use the switclient on my setup, so I thought about loading it
via extras just like we do for statsd to transparently ignore the
missing dependency.

Another way would be only import it when we have a [swift] section but
that makes it harder to find out that is an optional dependency.

Change-Id: Ie2ef84f86f9f57796a85758147ba87d8b22c3e55
wmf: soften requirements

WebOb and paramiko have a minimal version which is enforced by OpenStack
but is most probably not needed.

ordereddict is for python 2.6, the feature is included in python 2.7.

swiftclient/keystoneclient . A wmf hack to skip swift entirely.

soften PrettyTable. Precise only has 0.5, only impacts Zuul client.

Change-Id: I1aa1e3ae496d68d25dd64e8b21d2057c473342f4