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

how do you pass a dict as a parameter to <%namespace:def #400

Open
zzzeek opened this issue May 13, 2024 Discussed in #396 · 2 comments
Open

how do you pass a dict as a parameter to <%namespace:def #400

zzzeek opened this issue May 13, 2024 Discussed in #396 · 2 comments
Labels
bug Something isn't working lexer

Comments

@zzzeek
Copy link
Member

zzzeek commented May 13, 2024

Discussed in #396

Originally posted by jjgalvez May 5, 2024
How do I pass a dict to a def when it's called from <%namespace:def>.
I would expect that calling
<%namespace:def param="${ {'id':123} }"></namespace:def> to work, but when I do I get an error saying I am missing a closing }
for reference <%call expr="namespace.def(param={'id':123})"></%call> works as expected.

@zzzeek zzzeek added bug Something isn't working lexer labels May 13, 2024
@sqla-tester
Copy link
Collaborator

Jose has proposed a fix for this issue in the main branch:

Update parsetree.py removed "?" from for x in re.compile(r"(${.+})" … https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5296

@zzzeek
Copy link
Member Author

zzzeek commented May 14, 2024

bug remains open as we have to revert this, see #401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lexer
Projects
None yet
Development

No branches or pull requests

2 participants