Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jinja support and Python 3 #294

Closed
drcongo opened this issue Jul 30, 2018 · 1 comment
Closed

Jinja support and Python 3 #294

drcongo opened this issue Jul 30, 2018 · 1 comment

Comments

@drcongo
Copy link

drcongo commented Jul 30, 2018

Caching Jinja templates with cacheops under Python 3 throws the error 'TokenStream' object has no attribute 'next'

File "/usr/lib/python3.6/site-packages/jinja2/environment.py", line 497, in _parse
    return Parser(self, source, name, encode_filename(filename)).parse()
  File "/usr/lib/python3.6/site-packages/jinja2/parser.py", line 901, in parse
    result = nodes.Template(self.subparse(), lineno=1)
  File "/usr/lib/python3.6/site-packages/jinja2/parser.py", line 883, in subparse
    rv = self.parse_statement()
  File "/usr/lib/python3.6/site-packages/jinja2/parser.py", line 137, in parse_statement
    return ext(self)
  File "/usr/lib/python3.6/site-packages/cacheops/jinja2.py", line 22, in parse
    parser.stream.next()
AttributeError: 'TokenStream' object has no attribute 'next'

I think the issue is that in Python 3 this should be using next(parser.stream)

@Suor
Copy link
Owner

Suor commented Aug 2, 2018

I will look into it

@Suor Suor closed this as completed in 47f6d29 Aug 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants