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

Upgrade bundled cherrypy #2113

Closed
matthewrmshin opened this issue Jan 12, 2017 · 3 comments
Closed

Upgrade bundled cherrypy #2113

matthewrmshin opened this issue Jan 12, 2017 · 3 comments
Assignees

Comments

@matthewrmshin
Copy link
Contributor

matthewrmshin commented Jan 12, 2017

We need to upgrade cherrypy (from modified 3.2 to 10) and jinja2 (from 2.8 to 2.9).

(cherrypy is going to be more challenging as it has been modified in several changesets.)

@matthewrmshin matthewrmshin added this to the soon milestone Jan 12, 2017
@matthewrmshin matthewrmshin self-assigned this Jan 12, 2017
@matthewrmshin
Copy link
Contributor Author

matthewrmshin commented Jan 25, 2017

Version number of cherrypy is going up like crazy in the last year (>30 releases since June 2016 and >10 releases since Boxing Day 2016!) It is now impossible to determine what is the stable release - with 2 major releases within 2 days - only a few days ago. The project is also being split into 3 parts, so it may become a pain to bundle in the future. If situation does not improve, we may need to consider moving to another web framework, e.g. flask or perhaps tornado.

@hjoliver
Copy link
Member

The Jinja2 upgrade is somewhat urgent, in that users (in a suite portability context) have run into a bug in 2.8 that I have confirmed is fixed in 2.9. The bug should probably be documented in the Suite Design Guide where use of {% import ... %} is mentioned. Details, for the record:

Jinja2 variables defined in the top level template (i.e. suite.rc) are available to sub-templates via {% include ... %} but not via {% import ... %} unless with context is added to the import statement.

E.g. if sub.rc is:

{% set RESULT = STUFF | default("ERROR") %}

then the following will print # ERROR under jinja2 v 2.8 and (correctly) # stuff at v 2.9:

{% set STUFF = "stuff" %}
{% from 'sub.rc' import RESULT with context %}
# {{RESULT}}

As a workaround I've found the following does work at 2.8:

{% set STUFF = "stuff" %}
{% import 'sub.rc' as SUB with context %}
# {{SUB.RESULT}}

@matthewrmshin matthewrmshin changed the title Upgrade bundled cherrypy and jinja2 Upgrade bundled cherrypy May 26, 2017
@matthewrmshin matthewrmshin removed this from the soon milestone Jan 24, 2018
@matthewrmshin
Copy link
Contributor Author

Superseded by #2563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants