When an explicit `content_type` is specified to `pecan.expose()`, it should
always take precendece over the `default_renderer` specified at the application
level.
Fixes-bug: #1465688
Change-Id: I633777a3d682f17b7f61cbe691c6e93f2ce2a310
backlash is a port of Werkzeug's debugger middleware to Webob. It has no
additional dependencies beyond Webob and is being used by the TurboGears2 team
as an alternative to the antiquated Paste/WebError. Leveraging this as an
*optional* dependency to pecan would:
* Remove a sizable chunk of code from pecan, some of which is embedded
JavaScript that packagers have traditionally balked at.
* Improve the interactive debugging experience for developers in a very
meaningful way (the Werkzeug-based middleware provides features like an
in-browser console debugger, the ability to load source code on
a frame-by-frame basis).
* Improve the unified debugging experience amongst several popular Python
frameworks (some form of the debugging interface will be in use by Flask,
Pecan, and TurboGears2).
Change-Id: I85f50f677c6052bd2afd32811dedf33835135e12
Currently, anytime abort(...) is called, It raises a new
exception which then suppresses any existing tracebacks.
This causes error monitoring systems like NewRelic to
report back worthless surface-level tracebacks that have
nothing to do with the application.
This change allows for the exception type to change, but
keep the existing traceback (if one exists). This allows
for monitoring systems to see a real traceback that can
be correlated to logged information.
Change-Id: Ibe6eb37e25b74d1dcfca76dfc1f5bbce28d34e85
The http://ci.openstack.org/ documentation site has been deprecated,
replaced by redirects to corresponding paths within
http://docs.openstack.org/infra/ where other Project Infrastructure
documentation already resides.
Change-Id: Ic98ba41e1370039d99d233ccf318df11a40fb0d4
Given https://wiki.openstack.org/wiki/OSSN/OSSN-0046, it seems that this
portion of documentation needs to be far more visible on the page.
Change-Id: I00f48d23edf5a0844d247a0d1476e9cd31ca84d7
Setting app.debugger in setup.py now takes proper effect.
A warning is issued if the entry point is not callable.
Change-Id: I58a860b8ef0e1cb956b4554071275c024a1949d2
Closes-Bug: #1449573
If a controller is not a method (e.g. a staticmethod or a function),
there's no need to pop up the self argument. That actually make the
signature to mismatch, so let's fix that.
Change-Id: Ia96b7d19b2b664381e422b7182d0437b841914dd
Webob raises UnicodeDecodeErrors during request argument parsing in two
situations:
* HTTP POST requests composed of non-Unicode data (only affects Webob in
Python2)
* URL paths that contain invalid percent-encoded characters, e.g.,
/some/path/%AA
Pecan should detect these types of decoding failures when `webob.Request`
attributes are accessed, log the original exception, and coerce the HTTP 500
into a more accurate HTTP 400.
Fixes bug: 1408102
Fixes bug: 1407749
Change-Id: I734efd36230b6742805bcfd801dc0de2489ef92b