mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +03:00
SQL_IN adapter is now automatically registered
This commit is contained in:
parent
3b4c0443e4
commit
a9673f31d6
|
@ -1,5 +1,7 @@
|
|||
2010-02-10 Federico Di Gregorio <fog@initd.org>
|
||||
|
||||
* lib/__init__: SQL_IN adapter is now automatically registered.
|
||||
|
||||
* ZPsycopgDA/db.py: removed logging debug calls; psycopg does
|
||||
not depend on the logger module.
|
||||
|
||||
|
|
|
@ -60,9 +60,10 @@ if sys.version_info[0] >= 2 and sys.version_info[1] >= 4:
|
|||
warnings.warn(
|
||||
"can't import decimal module probably needed by _psycopg",
|
||||
RuntimeWarning)
|
||||
from psycopg2 import tz
|
||||
del sys, warnings
|
||||
|
||||
from psycopg2 import tz
|
||||
|
||||
# Import the DBAPI-2.0 stuff into top-level module.
|
||||
|
||||
from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
|
||||
|
@ -77,4 +78,9 @@ from _psycopg import NotSupportedError, OperationalError
|
|||
from _psycopg import connect, apilevel, threadsafety, paramstyle
|
||||
from _psycopg import __version__
|
||||
|
||||
# Register default adapters.
|
||||
|
||||
import psycopg2.extensions as _ext
|
||||
_ext.register_adapter(tuple, _ext.SQL_IN)
|
||||
|
||||
__all__ = [ k for k in locals().keys() if not k.startswith('_') ]
|
||||
|
|
|
@ -110,7 +110,5 @@ class SQL_IN(object):
|
|||
|
||||
__str__ = getquoted
|
||||
|
||||
register_adapter(tuple, SQL_IN)
|
||||
|
||||
|
||||
__all__ = [ k for k in locals().keys() if not k.startswith('_') ]
|
||||
|
|
Loading…
Reference in New Issue
Block a user