sqlalchemy.sql.__all__ exporting __path__, __file__, etc.

Issue #1215 resolved
Former user created an issue

When importing sqlalchemy.sql., module variables like {{{path}}}, {{{file}}} and {{{doc}}} are being exported too. This may cause problems to user's modules that "import sqlalchemy.sql.".

A simple fix to this would be to change {{{lib/sqlalchemy/sql/init.py}}} file:

line 56:

__all__ = sorted(locals().keys())

to something like this:

__tmp = locals().keys()
__all__ = sorted([for i in __tmp if not i.startswith('__')](i))

Thiago F Pappacena

Comments (3)

  1. Log in to comment