You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inconsistent behavior of filter pulling from context based on name #140
the issue is because we consider the identifier 'h' to be declared at parse tree time. the undeclared_identifiers method of Expression and DefTag would need to be modified to walk through the parsed filter expression fully, and only pop out single, undotted identifiers that are present in DEFAULT_ESCAPES instead of everything in DEFAULT_ESCAPES - however, that still wouldn't solve this:
${'foo' | h, h.strip}
I suppose the fix to that would be, because h.strip is there, its undeclared. "h" as a builtin would basically be blown away from that.
the other solution is, don't allow "h.strip" in there. if we work with the regexp in codegen create_filter_callable(), we could have that. It's probably preferable.
Activity
sqlalchemy-bot commentedon Jun 28, 2010
Michael Bayer (@zzzeek) wrote:
the issue is because we consider the identifier 'h' to be declared at parse tree time. the
undeclared_identifiersmethod ofExpressionandDefTagwould need to be modified to walk through the parsed filter expression fully, and only pop out single, undotted identifiers that are present in DEFAULT_ESCAPES instead of everything in DEFAULT_ESCAPES - however, that still wouldn't solve this:${'foo' | h, h.strip}
I suppose the fix to that would be, because h.strip is there, its undeclared. "h" as a builtin would basically be blown away from that.
the other solution is, don't allow "h.strip" in there. if we work with the regexp in codegen create_filter_callable(), we could have that. It's probably preferable.
sqlalchemy-bot commentedon Jun 28, 2010
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Nov 13, 2010
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Feb 21, 2011
Changes by Michael Bayer (@zzzeek):
sqla-tester commentedon Dec 3, 2024
cocolato has proposed a fix for this issue in the main branch:
Support passing custom filters with the same name as built-in flags https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5557
Support passing custom filters with the same name as built-in flags
zzzeek commentedon Dec 7, 2024
1.3.7 is yanked. a test + yank is added in https://gerrit.sqlalchemy.org/c/sqlalchemy/mako/+/5579
zzzeek commentedon Dec 7, 2024
add new tests that use 'n' as a default filter argument and ensure 'n' takes effect when used in this way
cocolato commentedon Dec 9, 2024
I will try this again.