Blaise Laflamme
2013-08-14 ab40fd66b4cb715aaf2f3197b546627bbfe4109a
added deprecation warning for mako tuple
1 files modified
9 ■■■■■ changed files
pyramid/mako_templating.py 9 ●●●●● patch | view | raw | blame | history
pyramid/mako_templating.py
@@ -2,6 +2,7 @@
import posixpath
import sys
import threading
import warnings
from zope.interface import (
    implementer,
@@ -217,6 +218,14 @@
            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)