summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-07-25 01:53:44 -0400
committerChris McDonough <chrism@plope.com>2011-07-25 01:53:44 -0400
commit73e31c15fd405a8848592800a66ffad547d49e19 (patch)
treefab9754e7791e9e2e27302c129772bc3d5b2e26c
parentbc116a15f94b92aa0216d86f2e0a32fe53d4c450 (diff)
downloadpyramid-73e31c15fd405a8848592800a66ffad547d49e19.tar.gz
pyramid-73e31c15fd405a8848592800a66ffad547d49e19.tar.bz2
pyramid-73e31c15fd405a8848592800a66ffad547d49e19.zip
garden; whitespace, comment cleanups
-rw-r--r--TODO.txt18
-rw-r--r--pyramid/router.py10
-rw-r--r--pyramid/urldispatch.py1
3 files changed, 20 insertions, 9 deletions
diff --git a/TODO.txt b/TODO.txt
index 49f137fa2..8cfac8ceb 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -5,7 +5,11 @@ 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.
@@ -18,6 +22,18 @@ Should-Have
- 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
------------
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):