From 0dbe068df42189315de01b1d39947ac029b37d02 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 8 Feb 2010 20:13:10 +0000 Subject: [PATCH] Stop the loop variable used to create __all__ leaking in the module. --- ChangeLog | 4 ++++ lib/__init__.py | 3 ++- lib/extensions.py | 2 +- lib/extras.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5fbce2c..a4b31b98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-02-12 Daniele Varrazzo + + * Stop the loop variable used to create __all__ leaking in the module. + 2010-02-10 Federico Di Gregorio * lib/extensions.py: Binary was not imported from _psycopg; now it is diff --git a/lib/__init__.py b/lib/__init__.py index 62479754..2968284c 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -83,4 +83,5 @@ from _psycopg import __version__ import psycopg2.extensions as _ext _ext.register_adapter(tuple, _ext.SQL_IN) -__all__ = [ k for k in locals().keys() if not k.startswith('_') ] +__all__ = filter(lambda k: not k.startswith('_'), locals().keys()) + diff --git a/lib/extensions.py b/lib/extensions.py index fbf98156..adc729e6 100644 --- a/lib/extensions.py +++ b/lib/extensions.py @@ -111,4 +111,4 @@ class SQL_IN(object): __str__ = getquoted -__all__ = [ k for k in locals().keys() if not k.startswith('_') ] +__all__ = filter(lambda k: not k.startswith('_'), locals().keys()) diff --git a/lib/extras.py b/lib/extras.py index af44d9bc..227389bb 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -471,4 +471,4 @@ def register_tstz_w_secs(oids=None, conn_or_curs=None): return _ext.TSTZ_W_SECS -__all__ = [ k for k in locals().keys() if not k.startswith('_') ] +__all__ = filter(lambda k: not k.startswith('_'), locals().keys())