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

Experiment: run Jinja in async mode #404

Closed
wants to merge 1 commit into from
Closed

Experiment: run Jinja in async mode #404

wants to merge 1 commit into from

Conversation

simonw
Copy link
Owner

@simonw simonw commented Jan 27, 2019

See http://jinja.pocoo.org/docs/2.10/api/#async-support

Tests all pass. Have not checked performance difference yet.

Creating pull request to run tests in Travis. This is not ready to merge - I'm not yet sure if this is a good idea.

See http://jinja.pocoo.org/docs/2.10/api/#async-support

Tests all pass. Have not checked performance difference yet.
@simonw
Copy link
Owner Author

simonw commented Jan 28, 2019

This failed in Python 3.5:

  File "/home/travis/virtualenv/python3.5.6/lib/python3.5/site-packages/jinja2/environment.py", line 1020, in render_async
    raise NotImplementedError('This feature is not available for this '
NotImplementedError: This feature is not available for this version of Python

It looks like this is caused by this feature detection code:

https://github.com/pallets/jinja/blob/a7ba0b637805c53d442e975e3864d3ea38d8743f/jinja2/utils.py#L633-L638

@simonw
Copy link
Owner Author

simonw commented Nov 11, 2019

#622 will drop 3.5 support.

@simonw
Copy link
Owner Author

simonw commented Nov 12, 2019

Closing this because it was written against Sanic. #628 tracks future work on this topic.

@simonw simonw closed this Nov 12, 2019
@simonw simonw deleted the jinja-async branch November 12, 2019 05:02
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

Successfully merging this pull request may close these issues.

None yet

1 participant