[Python-modules-team] Bug#750895: python3-tempita: doesn't work with python 3.3

Andrey Rahmatullin wrar at debian.org
Mon Jan 30 18:59:04 UTC 2017


Control: retitle -1 python3-tempita: doesn't work
Control: tags -1 + upstream

On Sun, Jun 08, 2014 at 10:00:33AM +0200, Matthias Urlichs wrote:
> This package does not work with Python3.3 (other versions not tested).
> 
> $ python3
> Python 3.3.5 (default, Mar 22 2014, 13:24:53) 
> [GCC 4.8.2] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from tempita import Template as t
> >>> w=t.from_filename("/tmp/test.tmpl")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 147, in from_filename
>     default_inherit=default_inherit, get_template=get_template)
>   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 131, in __init__
>     self._parsed = parse(content, name=name, line_offset=line_offset, delimiters=self.delimiters)
>   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 820, in parse
>     tokens = lex(s, name=name, line_offset=line_offset, delimiters=delimiters)
>   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 665, in lex
>     for match in token_re.finditer(s):
> TypeError: can't use a string pattern on a bytes-like object
> >>> 
> $ cat /tmp/test.tmpl 
> {{py:x="Hello"}}
> {{x}}
> $
This doesn't work with 3.5 either.
May be related to https://github.com/gjhiggins/tempita/issues/2 (see also
the comment there about specifying a default encoding). May be fixed
upstream as noted in that bug.

-- 
WBR, wRAR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 894 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20170130/c451852c/attachment-0002.sig>


More information about the Python-modules-team mailing list