def __init__(self, url, **config):
        self.url = url
        parsed = urlparse(self.url)
        if parsed.scheme == "bolt":
            self.host = parsed.hostname
            self.port = parsed.port
        else:
            raise ProtocolError("Unsupported URI scheme: '%s' in url: '%s'. Currently only supported 'bolt'." %
                                (parsed.scheme, url))
        self.config = config
        self.max_pool_size = config.get("max_pool_size", DEFAULT_MAX_POOL_SIZE)
        self.session_pool = deque()
        try:
            self.encrypted = encrypted = config["encrypted"]
        except __HOLE__:
            _warn_about_insecure_default()
            self.encrypted = encrypted = ENCRYPTED_DEFAULT
        self.trust = trust = config.get("trust", TRUST_DEFAULT)
        if encrypted:
            if not SSL_AVAILABLE:
                raise RuntimeError("Bolt over TLS is only available in Python 2.7.9+ and Python 3.3+")
            ssl_context = SSLContext(PROTOCOL_SSLv23)
            ssl_context.options |= OP_NO_SSLv2
            if trust >= TRUST_SIGNED_CERTIFICATES:
                ssl_context.verify_mode = CERT_REQUIRED
            ssl_context.set_default_verify_paths()
            self.ssl_context = ssl_context
        else:
            self.ssl_context = None
dataset/ETHPy150Open nigelsmall/py2neo/py2neo/packages/neo4j/v1/session.py/Driver.__init__