summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaise Laflamme <blaise@laflamme.org>2013-08-13 23:51:17 -0400
committerBlaise Laflamme <blaise@laflamme.org>2013-08-13 23:51:17 -0400
commit96df8d5c511ec6742873b3e86d3c875899dc77e3 (patch)
treecdce8f5c35794669f51639ee491c1775ce2b4fba
parent894d304ed5f738746195f956a204f7e551e1cb5b (diff)
downloadpyramid-96df8d5c511ec6742873b3e86d3c875899dc77e3.tar.gz
pyramid-96df8d5c511ec6742873b3e86d3c875899dc77e3.tar.bz2
pyramid-96df8d5c511ec6742873b3e86d3c875899dc77e3.zip
added deprecation warning for mako tuple
-rw-r--r--pyramid/mako_templating.py9
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)