Skip to content

Commit

Permalink
Use an import style reported not broken on Python 3.6
Browse files Browse the repository at this point in the history
Couldn't reproduce the issue but it has been documented in psycopg#550.
  • Loading branch information
dvarrazzo committed Jun 17, 2017
1 parent 8ab1680 commit 991f098
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ What's new in psycopg 2.7.2
(:ticket:`#545`).
- Fixed `~psycopg2.extras.ReplicationCursor.consume_stream()`
*keepalive_interval* argument (:ticket:`#547`).
- Maybe fixed random import error on Python 3.6 in multiprocess
environment (:ticket:`#550`).
- Fixed random `!SystemError` upon receiving abort signal (:ticket:`#551`).
- Parse intervals returned as microseconds from Redshift (:ticket:`#558`).
- Added `~psycopg2.extras.Json` `!prepare()` method to consider connection
Expand Down
2 changes: 1 addition & 1 deletion lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

# 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)

Expand Down
2 changes: 1 addition & 1 deletion lib/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# License for more details.

import psycopg2
import psycopg2.extensions as _ext
from psycopg2 import extensions as _ext


class PoolError(psycopg2.Error):
Expand Down
4 changes: 2 additions & 2 deletions lib/psycopg1.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
# 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


Expand Down

0 comments on commit 991f098

Please sign in to comment.