Commit 1fa9e413 authored by Stefan Behnel's avatar Stefan Behnel

fix imports in compiled Tempita for Py3

parent 9f21e8be
...@@ -32,10 +32,16 @@ If there are syntax errors ``TemplateError`` will be raised. ...@@ -32,10 +32,16 @@ If there are syntax errors ``TemplateError`` will be raised.
import re import re
import sys import sys
import cgi import cgi
from urllib import quote as url_quote try:
from urllib import quote as url_quote
except ImportError: # Py3
from urllib.parse import quote as url_quote
import os import os
import tokenize import tokenize
from cStringIO import StringIO try:
from io import StringIO
except ImportError:
from cStringIO import StringIO
from Cython.Tempita._looper import looper from Cython.Tempita._looper import looper
from Cython.Tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text from Cython.Tempita.compat3 import bytes, basestring_, next, is_unicode, coerce_text
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment