summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-09-22 07:58:42 -0400
committerChris McDonough <chrism@plope.com>2012-09-22 07:58:42 -0400
commit8c526eb6c1342a7506d83a3316e6386a3447a0b1 (patch)
tree67e0b52bc86521a97618949d59736165569adda1
parent246c13ed4366d3e3869185919ea1877fe23fe1ff (diff)
parent72561a213ccc456738582551e85fab0f0c8d09ab (diff)
downloadpyramid-8c526eb6c1342a7506d83a3316e6386a3447a0b1.tar.gz
pyramid-8c526eb6c1342a7506d83a3316e6386a3447a0b1.tar.bz2
pyramid-8c526eb6c1342a7506d83a3316e6386a3447a0b1.zip
Merge branch 'master' into 1.4-branch
-rw-r--r--TODO.txt4
-rw-r--r--pyramid/config/routes.py1
-rw-r--r--pyramid/mako_templating.py2
-rw-r--r--pyramid/tests/test_mako_templating.py14
4 files changed, 19 insertions, 2 deletions
diff --git a/TODO.txt b/TODO.txt
index 1686c27a2..6787b8a55 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -140,6 +140,10 @@ Future
- 1.5: Maybe? deprecate set_request_property in favor of pointing people at
add_request_method, schedule removal for 1.8?
+- 1.5: Remove pyramid.config.rendering set_renderer_globals_factory maybe.
+
+- 1.5: remove pyramid.config.route _add_view_from_route function.
+
- 1.6: Remove IContextURL and TraversalContextURL.
Probably Bad Ideas
diff --git a/pyramid/config/routes.py b/pyramid/config/routes.py
index 1a7fdfac9..30bebfb98 100644
--- a/pyramid/config/routes.py
+++ b/pyramid/config/routes.py
@@ -4,7 +4,6 @@ from pyramid.interfaces import (
IRequest,
IRouteRequest,
IRoutesMapper,
- PHASE1_CONFIG,
PHASE2_CONFIG,
)
diff --git a/pyramid/mako_templating.py b/pyramid/mako_templating.py
index 5d09cad01..f2627c1fc 100644
--- a/pyramid/mako_templating.py
+++ b/pyramid/mako_templating.py
@@ -91,7 +91,7 @@ class MakoRendererFactoryHelper(object):
def __call__(self, info):
p = re.compile(
- r'(?P<asset>[\w_.:/]+)'
+ r'(?P<asset>[\w_.:/-]+)'
r'(?:\#(?P<defname>[\w_]+))?'
r'(\.(?P<ext>.*))'
)
diff --git a/pyramid/tests/test_mako_templating.py b/pyramid/tests/test_mako_templating.py
index 97b2c679b..37264aa48 100644
--- a/pyramid/tests/test_mako_templating.py
+++ b/pyramid/tests/test_mako_templating.py
@@ -31,6 +31,20 @@ class Test_renderer_factory(Base, unittest.TestCase):
from pyramid.mako_templating import IMakoLookup
return self.config.registry.getUtility(IMakoLookup, name=name)
+ def test_hyphen_filenames(self):
+ from pyramid.mako_templating import renderer_factory
+
+ info = DummyRendererInfo({
+ 'name':'app:moon-and-world.mak',
+ 'package':None,
+ 'registry':self.config.registry,
+ 'settings':{},
+ 'type': ''
+ })
+
+ result = renderer_factory(info)
+ self.assertEqual(result.path, 'app:moon-and-world.mak')
+
def test_no_directories(self):
info = DummyRendererInfo({
'name':'pyramid.tests:fixtures/helloworld.mak',