diff options
| -rw-r--r-- | pyramid/mako_templating.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pyramid/mako_templating.py b/pyramid/mako_templating.py index fa45b671c..c07ee227f 100644 --- a/pyramid/mako_templating.py +++ b/pyramid/mako_templating.py @@ -2,6 +2,7 @@ import os import posixpath import sys import threading +import warnings from zope.interface import ( implementer, @@ -217,6 +218,14 @@ class MakoLookupTemplateRenderer(object): system['_context'] = context # tuple returned to be deprecated if isinstance(value, tuple): + warnings.warn( + 'Using a tuple in the form (\'defname\', {}) to render a ' + 'Mako partial will be deprecated in the future. Use a ' + 'Mako template renderer as documented in the "Using A ' + 'Mako def name Within a Renderer Name" chapter of the ' + 'Pyramid narrative documentation instead', + DeprecationWarning, + 3) self.defname, value = value try: system.update(value) |
