diff options
-rw-r--r-- | lib/__init__.py | 2 | ||||
-rw-r--r-- | lib/pool.py | 2 | ||||
-rw-r--r-- | lib/psycopg1.py | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/__init__.py b/lib/__init__.py index 492b924..f4d4fc7 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -65,7 +65,7 @@ from psycopg2 import tz # noqa # Register default adapters. -import psycopg2.extensions as _ext +from psycopg2 import extensions as _ext _ext.register_adapter(tuple, _ext.SQL_IN) _ext.register_adapter(type(None), _ext.NoneAdapter) diff --git a/lib/pool.py b/lib/pool.py index e57875c..a91c9cc 100644 --- a/lib/pool.py +++ b/lib/pool.py @@ -25,7 +25,7 @@ This module implements thread-safe (and not) connection pools. # License for more details. import psycopg2 -import psycopg2.extensions as _ext +from psycopg2 import extensions as _ext class PoolError(psycopg2.Error): diff --git a/lib/psycopg1.py b/lib/psycopg1.py index 3808aaa..0ee7942 100644 --- a/lib/psycopg1.py +++ b/lib/psycopg1.py @@ -28,12 +28,12 @@ old code while porting to psycopg 2. Import it as follows:: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public # License for more details. -import psycopg2._psycopg as _2psycopg # noqa +from psycopg2 import _psycopg as _2psycopg # noqa from psycopg2.extensions import cursor as _2cursor from psycopg2.extensions import connection as _2connection from psycopg2 import * # noqa -import psycopg2.extensions as _ext +from psycopg2 import extensions as _ext _2connect = connect |