Skip to content

Infinite loop when using create_all() on an Enum(metadata=...) in SQLite #3124

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by eevee (@eevee)

Reported here, but seen someone else experience it too: http://stackoverflow.com/q/24720380/17875

My diagnosis from figuring it out with the someone else on IRC:

18:43 <!eevee> somehow calling self._on_metadata_create within the metadata's create event is adding itself as an event listener again
18:44 <!eevee> because, i think, it re-creates a dialect-specific enum with the same args...
18:44 <!eevee> looks pretty clearly like a bug wow
18:44 <@Zhorken> it specifically hangs with SQLite
18:44 <@Zhorken> or at least, not with Postgres
18:45 <!eevee> ah, postgres has a real enum type; sqlite doesn't so it gets a fallback

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions