summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Version increment.0.8.0Ryan Petrello2014-10-142-1/+12
| | | | Change-Id: I7edccb6171682585891d9898055fc6b7da54cfaa
* Merge "Fix a routing bug for generic subcontrollers."Jenkins2014-10-142-1/+38
|\
| * Fix a routing bug for generic subcontrollers.Ryan Petrello2014-09-262-1/+38
| | | | | | | | | | Change-Id: I3764da98f19f02c1f28a29377c6d24238d869930 Fixes-bug: 1361728
* | Merge "Resolve a bug that mixes up argument order for generic functions."Jenkins2014-10-142-3/+96
|\ \
| * | Resolve a bug that mixes up argument order for generic functions.Ryan Petrello2014-09-282-3/+96
| |/ | | | | | | | | | | | | | | | | When context locals are disabled, the order of arguments passed explicitly to generic controller handlers is incorrect (and causes the user to interact with e.g., a Response object, when they're really getting a Request object). Fixes-bug: 1374683 Change-Id: I5922b0a441f1ebae032d5b0d64c9ee0f4cf018e0
* | Merge "Remove `assert` for flow control; it can be optimized away with ↵Jenkins2014-09-265-7/+10
|\ \ | |/ |/| | | `python -O`."
| * Remove `assert` for flow control; it can be optimized away with `python -O`.Ryan Petrello2014-09-255-7/+10
| | | | | | | | | | Change-Id: Iaa3b9e5d6234db0c2a68992c8ef17dd90de59e40 Fixes-bug: 1373538
* | For HTTP POSTs, map JSON request bodies to controller keyword arguments.Ryan Petrello2014-09-252-0/+107
|/ | | | | Fixes-bug: 1336943 Change-Id: I2e59e5d43d87a5279c41b155188ebe3281de0e11
* Merge "Improve argspec detection and leniency for wrapped controllers."Jenkins2014-09-256-7/+111
|\
| * Improve argspec detection and leniency for wrapped controllers.Ryan Petrello2014-09-246-7/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ↵Jenkins2014-09-242-3/+17
|\ \ | |/ |/| | | UnicodeDecodeError."
| * When detecting non-content for HTTP 204, properly catch UnicodeDecodeError.Ryan Petrello2014-09-232-3/+17
| | | | | | | | | | Fixes-bug: 1373003 Change-Id: I7761004c047976195a680bfb2ca23fe92516f3a6
* | When path arguments are incorrect for RestController, return HTTP 404, not 400.Ryan Petrello2014-09-242-10/+12
|/ | | | | | | | | 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
* Merge "Revert "Import run_cross_tests.sh from oslo-incubator""Jenkins2014-09-222-77/+0
|\
| * Revert "Import run_cross_tests.sh from oslo-incubator"Ryan Petrello2014-09-102-77/+0
| | | | | | | | | | | | | | | | This reverts commit 6c0ad7c5f5fbd2a0808ce268b3ba29627b7682a3. I'd like to wait to see what happens with https://review.openstack.org/#/c/95885/. Change-Id: I736b632fb568a0c711b3cb0a91c22d74c811edc2
* | Fix a bug in generic function handling when context locals are disabled.Ryan Petrello2014-09-222-6/+59
| | | | | | | | | | | | Fixes bug 1364113 Change-Id: I192c75b73ae95338dc2f1ea019e83a42fb8da87b
* | Stop using distribute for Python 3 tests.Ryan Petrello2014-09-221-12/+0
|/ | | | Change-Id: Ief2256281ea701a5fd765955aac96521773d1484
* Add docs environment to tox.iniMonty Taylor2014-09-081-0/+4
| | | | | | | | 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
* Version increment.0.7.0Ryan Petrello2014-08-282-1/+14
| | | | Change-Id: Icd58638f87108a0954dd26db31a22772b4d450ed
* Merge "Configure the root logger properly"Jenkins2014-08-274-5/+4
|\
| * Configure the root logger properlyStanislaw Pitucha2014-08-274-5/+4
| | | | | | | | | | | | | | | | 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 "Refactor 204 handling."Jenkins2014-08-271-14/+20
|\ \
| * | Refactor 204 handling.Ryan Petrello2014-07-281-14/+20
| | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Add a few py.test options to improve ease of use for the py.test runner."Jenkins2014-08-271-1/+1
|\ \ \
| * | | Add a few py.test options to improve ease of use for the py.test runner.Ryan Petrello2014-08-251-1/+1
| | |/ | |/| | | | | | | Change-Id: I0ea8f3519e004c141d115e9bfcf0110e53600ff5
* | | Catch an edge case in RestController routing and properly return an HTTP 400.Ryan Petrello2014-08-252-15/+136
|/ / | | | | | | Change-Id: I0e57cf719a2c3372ebc61efe71a832b0482a0a3e
* | Include test requirements in sdist tarballThomas Bechtold2014-08-201-0/+1
| | | | | | | | | | | | | | | | 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
* | Fix an infinite recursion error in PecanHook application.Ryan Petrello2014-08-152-1/+50
| | | | | | | | | | | | | | | | | | | | 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
* | Provide `pecan.state.arguments` for inspecting controller call argumentsRyan Petrello2014-07-283-13/+388
|/ | | | Change-Id: Ibbd8b2f075a875b109c7309bc42e0d1f1d5ae610
* Version increment.0.6.1Ryan Petrello2014-07-102-1/+6
| | | | Change-Id: Idda4968eb448dd5fe12a069f23f29fcedfebbd09
* Don't (mistakenly) set HTTP 204 on controllers which set `response.body_file`.Ryan Petrello2014-07-092-2/+105
| | | | | | Fixes bug 1339121 Change-Id: I70785315837b3907b63bb10565f3ccdf07559e8d
* Merge "Gate on designate stable and HEAD."0.6.0Jenkins2014-06-271-0/+16
|\
| * Gate on designate stable and HEAD.Ryan Petrello2014-06-251-0/+16
| | | | | | | | Change-Id: I653c2c7929442eaa3ac4f0950ff68d328e724e5d
* | Version increment.Ryan Petrello2014-06-263-1/+28
| | | | | | | | Change-Id: Idac278b53431988c6a3a3dfe89fcb4156f5574c1
* | Merge "Be gracious in deprecation of method signatures related to ↵Jenkins2014-06-262-9/+57
|\ \ | | | | | | | | | threadlocal removal."
| * | Be gracious in deprecation of method signatures related to threadlocal removal.Ryan Petrello2014-06-252-9/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain OpenStack projects that use pecan have overridden private methods of `pecan.rest.RestController` for custom behavior, and these method signatures are changing in the next release of pecan to support optional threadlocals. As good citizens, let's give these projects a deprecation period to get their implementations back in sync with upstream pecan. Change-Id: I02823c7fb79488aea0dd8ad3266aa7f0024bc4a0
* | | For an HTTP 405 on generic methods, attempt to specify an Allow header.Ryan Petrello2014-06-263-1/+32
|/ / | | | | | | Change-Id: I726d698fc014c21cc1e43a09a129384fa1f1235f
* | Merge "Serialize WebOb errors as JSON if the client requests it via an ↵Jenkins2014-06-252-3/+55
|\ \ | | | | | | | | | Accept header."
| * | Serialize WebOb errors as JSON if the client requests it via an Accept header.Ryan Petrello2014-06-252-3/+55
| | | | | | | | | | | | | | | Change-Id: I32040eff4259daf7a0e58b81ce861758d1d14bd9 Fixes bug 1324134
* | | Merge "Add support for specifying custom request and response implementations."Jenkins2014-06-254-16/+95
|\ \ \ | |/ / |/| |
| * | Add support for specifying custom request and response implementations.Ryan Petrello2014-06-254-16/+95
| | | | | | | | | | | | | | | | | | | | | | | | I noticed that people using pecan have taken to writing custom webob req/resp subclasses and monkeypatching onto `pecan.request` and `pecan.response`. Let's give them what they need to do this properly. Change-Id: If0ac953e381cec3a744388000a3b3afc0ea2525c
* | | Merge "Added inheritance for hooks from parent classes"Jenkins2014-06-253-4/+182
|\ \ \
| * | | Added inheritance for hooks from parent classesTihomir Trifonov2014-06-173-4/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also added hook inheritance from mixins, and adding hooks to child controllers, added as sub-controllers. Fixes bug 1330673 Change-Id: I709cece7bcce26943b254b15dc8ddac5613b1202
* | | | Fix a bug that broke `default_renderer = json`.Ryan Petrello2014-06-252-1/+16
| |/ / |/| | | | | | | | | | | Change-Id: Ie57feadb6efe664c1bc3c39debcb21c3355f210c Fixes bug 1332501
* | | Merge "Add support for Pecan *without* thread local request/response objects"Jenkins2014-06-259-129/+1650
|\ \ \
| * | | Add support for Pecan *without* thread local request/response objectsRyan Petrello2014-05-289-129/+1650
| |/ / | | | | | | | | | Change-Id: I5a5a05e1f57ef2d8ad64e925c7ffa6907b914273
* | | Test ceilometer on py27.Ryan Petrello2014-06-241-8/+8
| | | | | | | | | | | | Change-Id: I885dbfbddd2d6acdcbec6271acbccaebbc0de5de
* | | Fix routing docs about "Interacting with the Request and Response Object"Pierre Padrixe2014-06-191-2/+2
| |/ |/| | | | | | | | | | | | | pecan.response.text and pecan.response.status should be written instead of pecan.response.body and pecan.response.status_int Change-Id: Ie3f4011e3f299c77d464308cabfd2245ed01bb9f Closes-Bug: #1332101
* | Merge "Missing import in example"Jenkins2014-06-191-0/+1
|\ \
| * | Missing import in exampleStanislaw Pitucha2014-05-271-0/+1
| | | | | | | | | | | | | | | | | | `import logging` is required in the example. Change-Id: I92777da13b64592d4fb064c3ee0fc9507360ca0f