diff options
| -rw-r--r-- | TODO.txt | 29 | ||||
| -rw-r--r-- | pyramid/router.py | 10 | ||||
| -rw-r--r-- | pyramid/urldispatch.py | 1 |
3 files changed, 29 insertions, 11 deletions
@@ -5,15 +5,38 @@ Should-Have ----------- - Make "localizer" a property of request (instead of requiring - "get_localizer(request)"? + "get_localizer(request)" + +- Make ``current_route_url`` a method of request. + +- Create a ``current_route_path`` function and make it a method of request. - Add narrative docs for wsgiapp and wsgiapp2. -Nice-to-Have ------------- +- Provide a way to set the authentication policy and the authorization policy + during a config.include (they are related, so just exposing the currently + underscored-private _set_auth* methods won't cut it). - Rename all config file values with a ``pyramid.`` prefix. +- Try to figure out a way to keep "settings" as the original dictionary + passed to the Configurator instead of copying it. + +- Merge aodag's config.include(route_prefix=...) fork. + +- Michael's route group work. + +- Kill off ``bfg.routes`` envvars in router. + +- Provide a ``has_view`` function. + +- Alias the stupid long default session factory name. + +- Fix indirect circular import between router and config. + +Nice-to-Have +------------ + - Maybe add ``add_renderer_globals`` method to Configurator. - Speed up startup time (defer _bootstrap and registerCommonDirectives() diff --git a/pyramid/router.py b/pyramid/router.py index e8c19fca0..efbf0b326 100644 --- a/pyramid/router.py +++ b/pyramid/router.py @@ -65,6 +65,7 @@ class Router(object): has_listeners = registry.has_listeners notify = registry.notify logger = self.logger + try: # matches except Exception (exception view execution) has_listeners and notify(NewRequest(request)) # find the root object @@ -205,22 +206,17 @@ class Router(object): threadlocals = {'registry':registry, 'request':request} manager.push(threadlocals) - try: # matches finally: manager.pop() - - try: # matches finally: ... call request finished callbacks ... - - # create the request + try: + try: request = self.request_factory(environ) threadlocals['request'] = request request.registry = registry response = self.handle_request(request) - finally: if request is not None and request.finished_callbacks: request._process_finished_callbacks() return response(request.environ, start_response) - finally: manager.pop() diff --git a/pyramid/urldispatch.py b/pyramid/urldispatch.py index 2cbbb8709..3530126eb 100644 --- a/pyramid/urldispatch.py +++ b/pyramid/urldispatch.py @@ -10,7 +10,6 @@ from pyramid.exceptions import URLDecodeError from pyramid.traversal import traversal_path from pyramid.traversal import quote_path_segment - _marker = object() class Route(object): |
