# Path: impala/error.py
# class Error(Exception):
#     pass
# 
# class Warning(Exception):
#     pass
# 
# class InterfaceError(Error):
#     pass
# 
# class DatabaseError(Error):
#     pass
# 
# class InternalError(DatabaseError):
#     pass
# 
# class OperationalError(DatabaseError):
#     pass
# 
# class ProgrammingError(DatabaseError):
#     pass
# 
# class IntegrityError(DatabaseError):
#     pass
# 
# class DataError(DatabaseError):
#     pass
# 
# class NotSupportedError(DatabaseError):
#     pass
# 
# Path: impala/util.py
# def warn_deprecate(functionality='This', alternative=None):
#     msg = ("{0} functionality in impyla is now deprecated and will be removed "
#            "in a future release".format(functionality))
#     if alternative:
#         msg += "; Please use {0} instead.".format(alternative)
#     warnings.warn(msg, Warning)
# 
# def warn_protocol_param():
#     msg = ("Specifying the protocol argument is no longer necessary because "
#            "impyla only supports HiveServer2.")
#     warnings.warn(msg, Warning)
# 
# def warn_unused_jwt():
#     msg = ("The JWT argument is ignored as auth_mechanism is not 'JWT'. "
#            "Specify auth_mechanism='JWT' to make use of JWT authentication.")
#     warnings.warn(msg, Warning)
# 
# def warn_nontls_jwt():
#     msg = ("JWT authentication is running without SSL/TLS. This is not a secure "
#            "configuration unless other layers are providing transport security.")
#     warnings.warn(msg, Warning)


import six
import time
import datetime
import impala.hiveserver2 as hs2
from impala.error import (  # noqa
    Error, Warning, InterfaceError, DatabaseError, InternalError,
    OperationalError, ProgrammingError, IntegrityError, DataError,
    NotSupportedError)
from impala.util import (
    warn_deprecate, warn_protocol_param, warn_unused_jwt, warn_nontls_jwt)
    ldap_user : str, optional
        Use `user` parameter instead.

        .. deprecated:: 0.11.0
    ldap_password : str, optional
        Use `password` parameter instead.

        .. deprecated:: 0.11.0
    use_kerberos : bool, optional
        Specify `auth_mechanism='GSSAPI'` instead.

        .. deprecated:: 0.11.0
    protocol : str, optional
        Do not use.  HiveServer2 is the only protocol currently supported.

        .. deprecated:: 0.11.0


    Returns
    -------
    HiveServer2Connection
        A `Connection` object (DB API 2.0-compliant).
    """
    # pylint: disable=too-many-locals
    if use_kerberos is not None:
        warn_deprecate('use_kerberos', 'auth_mechanism="GSSAPI"')
        if use_kerberos:
            auth_mechanism = 'GSSAPI'

    if use_ldap is not None:

# Path: impala/error.py
# class Error(Exception):
#     pass
# 
# class Warning(Exception):
#     pass
# 
# class InterfaceError(Error):
#     pass
# 
# class DatabaseError(Error):
#     pass
# 
# class InternalError(DatabaseError):
#     pass
# 
# class OperationalError(DatabaseError):
#     pass
# 
# class ProgrammingError(DatabaseError):
#     pass
# 
# class IntegrityError(DatabaseError):
#     pass
# 
# class DataError(DatabaseError):
#     pass
# 
# class NotSupportedError(DatabaseError):
#     pass
# 
# Path: impala/util.py
# def warn_deprecate(functionality='This', alternative=None):
#     msg = ("{0} functionality in impyla is now deprecated and will be removed "
#            "in a future release".format(functionality))
#     if alternative:
#         msg += "; Please use {0} instead.".format(alternative)
#     warnings.warn(msg, Warning)
# 
# def warn_protocol_param():
#     msg = ("Specifying the protocol argument is no longer necessary because "
#            "impyla only supports HiveServer2.")
#     warnings.warn(msg, Warning)
# 
# def warn_unused_jwt():
#     msg = ("The JWT argument is ignored as auth_mechanism is not 'JWT'. "
#            "Specify auth_mechanism='JWT' to make use of JWT authentication.")
#     warnings.warn(msg, Warning)
# 
# def warn_nontls_jwt():
#     msg = ("JWT authentication is running without SSL/TLS. This is not a secure "
#            "configuration unless other layers are providing transport security.")
#     warnings.warn(msg, Warning)


# Path: impala/dbapi.py
import six
import time
import datetime
import impala.hiveserver2 as hs2
from impala.error import (  # noqa
    Error, Warning, InterfaceError, DatabaseError, InternalError,
    OperationalError, ProgrammingError, IntegrityError, DataError,
    NotSupportedError)
from impala.util import (
    warn_deprecate, warn_protocol_param, warn_unused_jwt, warn_nontls_jwt)

    ldap_user : str, optional
        Use `user` parameter instead.

        .. deprecated:: 0.11.0
    ldap_password : str, optional
        Use `password` parameter instead.

        .. deprecated:: 0.11.0
    use_kerberos : bool, optional
        Specify `auth_mechanism='GSSAPI'` instead.

        .. deprecated:: 0.11.0
    protocol : str, optional
        Do not use.  HiveServer2 is the only protocol currently supported.

        .. deprecated:: 0.11.0


    Returns
    -------
    HiveServer2Connection
        A `Connection` object (DB API 2.0-compliant).
    """
    # pylint: disable=too-many-locals
    if use_kerberos is not None:
        warn_deprecate('use_kerberos', 'auth_mechanism="GSSAPI"')
        if use_kerberos:
            auth_mechanism = 'GSSAPI'

    if use_ldap is not None:

        warn_deprecate('use_ldap', 'auth_mechanism="LDAP"')