diff options
| -rw-r--r-- | CHANGES.txt | 5 | ||||
| -rw-r--r-- | pyramid/config/__init__.py | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 264497f5b..3d2b248ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,10 @@ Next release ============ -- ... +- Fix an issue whereby predicates would be resolved as maybe_dotted in the + introspectable but not when passed for registration. This would mean that + add_route_predicate for example can not take a string and turn it into the + actual callable function. 1.5 (2014-04-08) ================ diff --git a/pyramid/config/__init__.py b/pyramid/config/__init__.py index 32cf82fba..ebaae38a9 100644 --- a/pyramid/config/__init__.py +++ b/pyramid/config/__init__.py @@ -481,6 +481,7 @@ class Configurator( def _add_predicate(self, type, name, factory, weighs_more_than=None, weighs_less_than=None): + factory = self.maybe_dotted(factory) discriminator = ('%s predicate' % type, name) intr = self.introspectable( '%s predicates' % type, @@ -488,7 +489,7 @@ class Configurator( '%s predicate named %s' % (type, name), '%s predicate' % type) intr['name'] = name - intr['factory'] = self.maybe_dotted(factory) + intr['factory'] = factory intr['weighs_more_than'] = weighs_more_than intr['weighs_less_than'] = weighs_less_than def register(): |
