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
Fix an infinite recursion error in PecanHook application.

Subclassing both `rest.RestController` and `hooks.HookController` results in an
infinite recursion error in hook application (which prevents your application
from starting).

Fixes bug 1357540

Change-Id: I6e26c6d8771b4b35943bfb85bf41e73d0982e74c
Include test requirements in sdist tarball

Currently the created tarballs via "python setup.py sdist" are missing
some files to run the testsuite. Include these files so i.e. package
maintainers can run the testuite during package build.

Change-Id: I85a94f66abf5781ffc4fcee4671defab4006a8c4
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."