Refactor 204 handling.

Place the HTTP 204 handling in a `finally` at the bottom of the WSGI __call__
to ensure we catch *all* changes to `state.response`.

Change-Id: Id150205f295a3c0ca9c73ad897a41d4790476811
Add a few py.test options to improve ease of use for the py.test runner.

Change-Id: I0ea8f3519e004c141d115e9bfcf0110e53600ff5
Catch an edge case in RestController routing and properly return an HTTP 400.

Change-Id: I0e57cf719a2c3372ebc61efe71a832b0482a0a3e
Configure the root logger properly

The documentation and project template showed logging configuration
which sets level INFO for module called 'root' rather than the root
logger. Configure the root (default) logger instead.

Change-Id: I172d06dc6b81a31c5b698e43be50ab6302d54984
Merge "Add a few py.test options to improve ease of use for the py.test runner."
Merge "Refactor 204 handling."
Merge "Configure the root logger properly"
Version increment.

Change-Id: Icd58638f87108a0954dd26db31a22772b4d450ed
Add docs environment to tox.ini

As per the governance resolution https://review.openstack.org/119875,
projects should have a docs environment in their tox.ini testing
interface. Add one.

Change-Id: Ic8285618f3a8b00767ef150411c2f25c09c311b6
Revert "Import run_cross_tests.sh from oslo-incubator"

This reverts commit 6c0ad7c5f5fbd2a0808ce268b3ba29627b7682a3.

I'd like to wait to see what happens with https://review.openstack.org/#/c/95885/.

Change-Id: I736b632fb568a0c711b3cb0a91c22d74c811edc2
Stop using distribute for Python 3 tests.

Change-Id: Ief2256281ea701a5fd765955aac96521773d1484
Fix a bug in generic function handling when context locals are disabled.

Fixes bug 1364113

Change-Id: I192c75b73ae95338dc2f1ea019e83a42fb8da87b
Merge "Revert "Import run_cross_tests.sh from oslo-incubator""
When detecting non-content for HTTP 204, properly catch UnicodeDecodeError.

Fixes-bug: 1373003
Change-Id: I7761004c047976195a680bfb2ca23fe92516f3a6
When path arguments are incorrect for RestController, return HTTP 404, not 400.

When RestController encounters a mismatch between function signatures and
positional URL chunks (e.g., /authors/books vs /authors/1/books), it shouldn't
raise an HTTP 400; the issue is a nonexistant URL path, not the structure of
the request/body itself.

Change-Id: I6637f88b7da4f09497f905ebafa7bf1e3788151a
Improve argspec detection and leniency for wrapped controllers.

Pecan makes abundant use of `inspect.getargspec`, but unless you're very
meticulous in the decorators you wrap your controllers with, the original
argspec is not persisted (and pecan functionality can break in various ways).
When a controller is decorated in a way that breaks argspec, we should instead
attempt to locate the *actual* argspec for the method (not the wrapped
function) and use it.

Additionally, when controllers are missing **kwargs in the method signature to
map optional GET and POST arguments, we shouldn't consider that
a non-routable offense (an HTTP 400); instead, we should just *not* pass
extraneous arguments to the function.

Change-Id: I47fe0496ff6aa105359ee8e5b99f6c80476cc2e9
Merge "When detecting non-content for HTTP 204, properly catch UnicodeDecodeError."
Merge "Improve argspec detection and leniency for wrapped controllers."
For HTTP POSTs, map JSON request bodies to controller keyword arguments.

Fixes-bug: 1336943
Change-Id: I2e59e5d43d87a5279c41b155188ebe3281de0e11
Remove `assert` for flow control; it can be optimized away with `python -O`.

Change-Id: Iaa3b9e5d6234db0c2a68992c8ef17dd90de59e40
Fixes-bug: 1373538