From f61fd94e47138cc6067a474cf43423237d41fff5 Mon Sep 17 00:00:00 2001 From: Raf Baluyot Date: Thu, 1 Dec 2022 17:14:42 -0500 Subject: Fix StringIO import for the example in usage.rst For some reason people fixed the `print` call but not the import when https://github.com/sqlalchemy/mako/issues/234 was brought up. I also mentioned in in https://github.com/sqlalchemy/mako/issues/369 Closes: #370 Pull-request: https://github.com/sqlalchemy/mako/pull/370 Pull-request-sha: 8560bfed22f11b7edb5d2ac2e5cfc6a7bd59b718 Change-Id: I236eef05f5b45420035c522287fa66eb3cb21a00 --- doc/build/usage.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/build/usage.rst b/doc/build/usage.rst index c439c35..22b6bac 100644 --- a/doc/build/usage.rst +++ b/doc/build/usage.rst @@ -53,7 +53,7 @@ render with it, using the :meth:`~.Template.render_context` method: from mako.template import Template from mako.runtime import Context - from StringIO import StringIO + from io import StringIO mytemplate = Template("hello, ${name}!") buf = StringIO() @@ -517,4 +517,3 @@ API Reference .. autofunction:: mako.exceptions.html_error_template .. autofunction:: mako.exceptions.text_error_template - -- cgit v1.2.1