diff options
| author | Blaise Laflamme <blaise@laflamme.org> | 2013-08-13 23:51:17 -0400 |
|---|---|---|
| committer | Blaise Laflamme <blaise@laflamme.org> | 2013-08-13 23:51:17 -0400 |
| commit | 96df8d5c511ec6742873b3e86d3c875899dc77e3 (patch) | |
| tree | cdce8f5c35794669f51639ee491c1775ce2b4fba | |
| parent | 894d304ed5f738746195f956a204f7e551e1cb5b (diff) | |
| download | pyramid-96df8d5c511ec6742873b3e86d3c875899dc77e3.tar.gz pyramid-96df8d5c511ec6742873b3e86d3c875899dc77e3.tar.bz2 pyramid-96df8d5c511ec6742873b3e86d3c875899dc77e3.zip | |
added deprecation warning for mako tuple
| -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) |
