mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-28 20:03:43 +03:00
Use an import style reported not broken on Python 3.6
Couldn't reproduce the issue but it has been documented in #550.
This commit is contained in:
parent
8ab16807c6
commit
991f0988ee
2
NEWS
2
NEWS
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user