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

Default value for reserved_names parameter to codegen.compile causes AttributeError #208

sqlalchemy-bot opened this Issue Feb 15, 2013 · 2 comments


None yet
1 participant

sqlalchemy-bot commented Feb 15, 2013

Migrated issue, originally created by Anonymous

The default value for reserved_names in codegen.compile is an empty tuple. reserved_names is expected to be a set. Generally this isn't a problem because the one place compile is called within the mako codebase the value passed in is guaranteed to be a set, but if third party software calls compile directly and depends on default values, an AttributeError is raised at codegen:1013 when the code attempts to call the intersection() method on the collection.

Patch fixes the problem by changing the default and adding a guard test.

Attachments: reserved_names.patch


This comment has been minimized.

sqlalchemy-bot commented Feb 15, 2013

Michael Bayer (@zzzeek) wrote:

any chance I can see this 3rd party usage of compile() ?

changed it to a frozenset in b809f95. I don't have your test case here but hopefully that resolves.


This comment has been minimized.

sqlalchemy-bot commented Feb 15, 2013

Changes by Michael Bayer (@zzzeek):

  • changed status to closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment