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

templater: drop Jinja Python 2 compatibility shim #353

Merged
merged 2 commits into from
May 15, 2020

Conversation

OddBloke
Copy link
Collaborator

@OddBloke OddBloke commented May 6, 2020

No description provided.

Copy link
Contributor

@lucasmoura lucasmoura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what I could understand, this is because in python2 the character representation is done through __unicode__ snd this decorator just create an abstraction to allow __str__ to also return unicode strings.

If that is the case, I can see no problems with the proposed change

Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested jinja template variable render failures with this branch and missing vars are properly rendered in error messages. LGTM!

.tox/py3/bin/python3 -m cloudinit.cmd.main  query -f '{{absent}}' -i instance-data.json 
WARNING: Could not render jinja template variables in file 'query commandline': 'absent'
CI_MISSING_JINJA_VAR/absent

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

4 participants