Skip to content

Commit c538404

Browse files
committed
Moved ssl_compat to compat.ssl
1 parent d68e965 commit c538404

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

neo4j/v1/bolt.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
the `session` module provides the main user-facing abstractions.
2626
"""
2727

28-
2928
from __future__ import division
3029

3130
from base64 import b64encode
@@ -36,13 +35,13 @@
3635
from os.path import dirname, isfile
3736
from select import select
3837
from socket import create_connection, SHUT_RDWR, error as SocketError
39-
from struct import pack as struct_pack, unpack as struct_unpack, unpack_from as struct_unpack_from
38+
from struct import pack as struct_pack, unpack as struct_unpack
4039
from threading import RLock
4140

41+
from .compat.ssl import SSL_AVAILABLE, HAS_SNI, SSLError
4242
from .constants import DEFAULT_USER_AGENT, KNOWN_HOSTS, MAGIC_PREAMBLE, TRUST_DEFAULT, TRUST_ON_FIRST_USE
4343
from .exceptions import ProtocolError, Unauthorized, ServiceUnavailable
4444
from .packstream import Packer, Unpacker
45-
from .ssl_compat import SSL_AVAILABLE, HAS_SNI, SSLError
4645

4746

4847
# Signature bytes for each message type

neo4j/v1/ssl_compat.py renamed to neo4j/v1/compat/ssl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
2020

21+
from __future__ import absolute_import
22+
2123
try:
2224
from ssl import SSLContext, PROTOCOL_SSLv23, OP_NO_SSLv2, CERT_REQUIRED, HAS_SNI, SSLError
2325
except ImportError:

neo4j/v1/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
from os.path import expanduser, join
2323

24+
from .compat.ssl import SSL_AVAILABLE
2425
from ..meta import version
25-
from .ssl_compat import SSL_AVAILABLE
2626

2727

2828
DEFAULT_PORT = 7687

neo4j/v1/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232

3333
from .bolt import connect, Response, RUN, PULL_ALL, ConnectionPool
3434
from .compat import integer, string, urlparse
35+
from .compat.ssl import SSL_AVAILABLE, SSLContext, PROTOCOL_SSLv23, OP_NO_SSLv2, CERT_REQUIRED
3536
from .constants import DEFAULT_PORT, ENCRYPTION_DEFAULT, TRUST_DEFAULT, TRUST_SIGNED_CERTIFICATES, \
3637
TRUST_ON_FIRST_USE, READ_ACCESS, TRUST_SYSTEM_CA_SIGNED_CERTIFICATES, \
3738
TRUST_ALL_CERTIFICATES, TRUST_CUSTOM_CA_SIGNED_CERTIFICATES
3839
from .exceptions import CypherError, ProtocolError, ResultError, TransactionError, \
3940
ServiceUnavailable, SessionExpired
4041
from .routing import RoutingConnectionPool
41-
from .ssl_compat import SSL_AVAILABLE, SSLContext, PROTOCOL_SSLv23, OP_NO_SSLv2, CERT_REQUIRED
4242
from .summary import ResultSummary
4343
from .types import hydrated
4444

0 commit comments

Comments
 (0)