Commit Graph

1158 Commits

Author SHA1 Message Date
Monty Taylor 5da233503d Pecan has moved to https://github.com/pecan/pecan
This reverts commit 12df0fe05c.

Change-Id: I390852dd6b1454a85fd5781641e0fc984587c2ea
2015-11-24 17:27:06 +00:00
Monty Taylor 12df0fe05c Retire stackforge/pecan 2015-10-17 16:04:13 -04:00
Ryan Petrello b49e8c7be4 Pecan has moved to https://github.com/pecan/pecan
Change-Id: I1ee039e0e84cd4c32d49c1a0b858fbc247e75054
2015-07-29 14:40:05 -04:00
Jenkins cbcc8b3e51 Merge "Allow all RFC3986-specified characters in explicit path segments." 2015-07-09 21:15:34 +00:00
Jenkins f8cdcb7711 Merge "Replace pecan's homegrown interactive debugging middleware with backlash" 2015-07-09 20:49:52 +00:00
Ryan Petrello 1fe3cec746 Fix a bug in the way `default_renderer` is applied.
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
2015-06-25 11:50:09 -04:00
Ryan Petrello 3faec0800e Allow all RFC3986-specified characters in explicit path segments.
Change-Id: I37635b153bde00e47904f94ed212e03f4dd708e9
2015-06-25 10:45:48 -04:00
Ryan Petrello 177c566eca Replace pecan's homegrown interactive debugging middleware with backlash
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
2015-06-11 10:04:51 -04:00
Ryan Petrello 0001a9d94d Fix broken wsme-stable tests as of the latest 0.7.0 release.
Change-Id: I7b0c7c7fe423fd29b0792f9708b940116e6914c1
2015-06-08 08:51:29 -07:00
John Vrbanac d3159f1d6b Allowing tracebacks to be surfaced through abort
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
2015-06-03 19:12:53 -05:00
Jenkins 17d5357003 Merge "Version increment." 2015-05-28 17:38:42 +00:00
Ryan Petrello 6b1d0f0002 Require orderddict for Python 2.6 support.
Change-Id: Ib419baa13b819827517a9cf9851d19a90c8668bb
2015-05-27 13:58:10 -07:00
Ryan Petrello 74995b12c5 Version increment.
Change-Id: Id2088317d47dc43d0e58869fbc4fa20cee98c7e9
2015-05-27 16:35:36 -04:00
Ryan Petrello 0dbaa162b7 Add tox environments to gate pecan against openstack/gnocchi
Change-Id: Ic5b513f9668685c8ab831ba411abfca519ec2e87
2015-05-27 12:44:54 -07:00
Ryan Petrello e12bb3492b Add tox environments to gate pecan against openstack/magnum
Change-Id: Ie3ec3dc65ae22973fe831a29792eac845cf15376
2015-05-27 08:23:14 -07:00
Ryan Petrello ccb5f75e13 Gate against latest stable projects.
Change-Id: I3be22d88872c65be07bde495c5bd9fd7b33df397
2015-05-26 09:16:20 -07:00
Jenkins ac6b72e441 Merge "Allow users to specify custom path segments for routing." 2015-05-21 23:15:31 +00:00
Jenkins f09076cf10 Merge "Properly raise HTTP 405 (and specify Allow headers) for RestController" 2015-05-21 23:15:28 +00:00
Ryan Petrello 3c634de566 Properly raise HTTP 405 (and specify Allow headers) for RestController
Change-Id: Id790efc75c8207eb61d74e9b2242b310ccd62ab1
Depends-On: Ieffa3fddc3c8d3152742455ca46d69bcc7208d69
Closes-bug: #1334690
Closes-bug: #1450109
2015-05-21 13:04:23 -07:00
Ryan Petrello 5e48da32ac Update the `rest-api` scaffold to use generic controllers, *not* RestController
Closes-Bug #1413038

Change-Id: I6b91479d9af754b1833abf212a20112e8372a948
2015-05-21 13:00:22 -07:00
Ryan Petrello baf80afa5e Allow users to specify custom path segments for routing.
Change-Id: I3f998d62c2f188818a747f1aa91beb9439ed77a2
2015-05-21 12:58:48 -07:00
Ryan Petrello 26d1d59aec Fix broken wsme-stable tests.
Change-Id: If9824e18b83a5f273cb727193cb632629b1f0ea1
2015-05-21 12:29:17 -07:00
Jeremy Stanley e7b7daf44e Replace ci.o.o links with docs.o.o/infra
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
2015-05-14 21:46:38 +00:00
Jenkins bf03242912 Merge "Fix unquoting of positional args with plus sign" 2015-05-13 12:59:44 +00:00
Maxim Kulkin 472131549f Fix unquoting of positional args with plus sign
Closes-Bug: #1425750

Change-Id: I60616299b7853b0587ff25b74bfc155dc7589204
2015-05-12 17:20:40 -04:00
Ryan Petrello c3ce70b613 Add more emphasis to the need for debug=False in deployment documentation.
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
2015-05-11 10:50:49 -04:00
Ryan Petrello 9a6a893d5e Properly handle Python3 Unicode path segments in pecan routing.
Change-Id: I3890d73a087f7635ddc51b71d3d6f68a41058c42
Closes-Bug: 1451842
2015-05-07 11:15:45 -07:00
Jenkins d907987e70 Merge "make_app() now uses the debugger param in DebugMiddleware()" 2015-04-29 20:25:29 +00:00
Joe D'Andrea ec7bdc432d make_app() now uses the debugger param in DebugMiddleware()
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
2015-04-29 12:09:09 -04:00
Ryan Petrello 760f434471 Drop support for Python 3.2.
Change-Id: I3586dcdb6202282f244d61e51420053dba20bb28
2015-04-29 11:23:23 -04:00
Jenkins 87b8d00a2e Merge "Prevent @expose(generic=True) on special methods (_route, _lookup, _default)." 2015-04-12 18:45:21 +00:00
Ryan Petrello 465088213b Prevent @expose(generic=True) on special methods (_route, _lookup, _default).
Change-Id: Ie180cc4092ab1457dd97176cc72c563e1d4c561f
2015-03-02 21:11:31 -05:00
Julien Danjou a98e5f4547 core: do not assume controller is a method
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
2015-03-02 20:43:45 -05:00
Julien Danjou f4d923dca6 Fix broken wsme-stable job and pep8 failures.
Change-Id: I4ff0a7a7926f7a645fa8d59242be9d31bd683106
2015-03-02 12:29:37 -05:00
Jenkins ff88de0f8c Merge "Document how to serve static files (with an iterable, not in-memory)." 2015-02-04 19:28:17 +00:00
Ryan Petrello 3591c9ed07 Document how to serve static files (with an iterable, not in-memory).
Fixes bug 1221342

Change-Id: Icfad6a262ed211a73291eaead568248f67cfbfc9
2015-02-04 13:56:22 -05:00
Ryan Petrello ec8b95e432 Default the `pecan` log level to DEBUG for development.
Change-Id: Iae970712567794698aa0ba331a958b9fd238b5c0
2015-01-12 21:22:58 -05:00
Ryan Petrello 67abf118f8 *Properly* detect Python < 3.3.
Change-Id: I259727d3204d4740ea9defb0c2adfdf59d81f3aa
2015-01-12 17:06:42 -05:00
Ryan Petrello efd3857e39 Fix py32 support; importlib.machinery.SourceFileLoader doesn't exist until py33
Change-Id: I78a34016f87d36ed320a0883a740cd4018e42e4b
2015-01-12 16:16:37 -05:00
Ryan Petrello 868c28d031 Version increment.
Change-Id: I310bfb38ed550e7e5932988ba21602bbea689e83
2015-01-12 15:19:08 -05:00
Jenkins b98aac0abc Merge "Change pecan to more gracefully handle a few odd request encoding edge cases." 2015-01-12 19:59:37 +00:00
Jenkins 62871d2d34 Merge "Document pecan.request.context" 2015-01-09 19:34:34 +00:00
Ryan Petrello f491076a0f Change pecan to more gracefully handle a few odd request encoding edge cases.
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
2015-01-08 14:58:21 -05:00
Ryan Petrello fe19eb67a8 Document pecan.request.context
Fixes-bug: 1408755

Change-Id: Ie87a6b9e72fd1387e69db1b6f24d4475ecba56c6
2015-01-08 14:58:16 -05:00
Ryan Petrello 868ab86e76 Improve ImportError verbosity for configuration files.
Fixes bug: 1408008

Change-Id: Iac73b6b0017794de9dea4180d043c18d3fb6d942
2015-01-06 13:47:29 -05:00
Jenkins 97306eda45 Merge "core: optimize renderer computing" 2014-12-31 17:08:02 +00:00
Julien Danjou a82e395118 core: optimize renderer computing
This just use if/elif/else to do the proper renderer finding once and
for all.

Change-Id: I5e754afad2a7ce64e692d6898a9cf9eed5a7e94c
2014-12-19 14:48:12 +01:00
Julien Danjou 1ee7db9473 middleware.static: remove useless stored variable
For the sake of it.

Change-Id: If34e33af1e590492bec45946d863a663cb384915
2014-12-19 11:45:46 +01:00
Ryan Petrello fcfbd06ccc Version increment.
Change-Id: Ibf1506b1aa378caccf322cfc3297c208aae662c5
2014-12-17 09:59:19 -08:00
Ryan Petrello c93399b258 Don't clone pecan-dependent projects from cgit.
Change-Id: I68469327fc0403f36a37125147a15b05de9e1555
2014-12-16 10:21:37 -08:00