From 96df8d5c511ec6742873b3e86d3c875899dc77e3 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Tue, 13 Aug 2013 23:51:17 -0400 Subject: added deprecation warning for mako tuple --- pyramid/mako_templating.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- cgit v1.2.3