-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Mako 1.3.7 breaks my code with "NameError: name 'n' is not defined" #415
Comments
with Mako I am just reverting these fixes, since they cannot predict real world cases, which here we will add and see if the contributor @cocolato wants to try again. the issue is that use of the default filter names has inconsistent behavior vs names that are not default filters. |
I need to have an MCVE. Can you show me the arguments to make this script fail? t1 = Template(
"hello world", strict_undefined=True, default_filters=["h"]
)
t1.render_unicode() |
this does it t1 = Template(
"hello world ${x}", strict_undefined=True, default_filters=["str", "n"]
)
t1.render_unicode(x='hi') |
Mike Bayer has proposed a fix for this issue in the main branch: Revert "Support passing custom filters with the same name as built-in flags" https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5579 |
1.3.7 is yanked |
1.3.8 is released |
Wow that was fast. Thank you! |
The project in question: https://github.com/mgedmin/project-summary.
A week ago it was building fine, and today I got an email from GitHub Actions telling me about build failures. I've narrowed down the cause to a mako version change: 1.3.7 breaks my test suite, 1.3.6 works fine. The errors look like this:
I'm rendering the template using
Is this missing something?
This is probably related to the fix for #140, but I don't understand that issue nor what I'm doing wrong here. The release notes are also not very helpful.
The text was updated successfully, but these errors were encountered: