微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Python psycopg2 模块-__version__() 实例源码

Python psycopg2 模块,__version__() 实例源码

我们从Python开源项目中,提取了以下21代码示例,用于说明如何使用psycopg2.__version__()

项目:psycopg2-for-aws-lambda    作者:iwitaly    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool,msg) about the lo64 support"""
    if conn.server_version < 90300:
        return (False, "server version %s doesn't support the lo64 API"
                % conn.server_version)

    if 'lo64' not in psycopg2.__version__:
        return (False, "this psycopg build doesn't support the lo64 API")

    return (True, "this server and build support the lo64 API")
项目:psycopg2-for-aws-lambda    作者:iwitaly    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:gprime    作者:GenealogyCollective    | 项目源码 | 文件源码
def get_summary(cls):
        """
        Return a diction of information about this database
        backend.
        """
        summary = {
            "DB-API version": "2.0",
            "Database sql type": cls.__name__,
            "Database sql module": "psycopg2",
            "Database sql module version": psycopg2.__version__,
            "Database sql module location": psycopg2.__file__,
        }
        return summary
项目:ShelbySearch    作者:Agentscreech    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:userbase-sns-lambda    作者:fartashh    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:userbase-sns-lambda    作者:fartashh    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:userbase-sns-lambda    作者:fartashh    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:userbase-sns-lambda    作者:fartashh    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:userbase-sns-lambda    作者:fartashh    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:userbase-sns-lambda    作者:fartashh    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:userbase-sns-lambda    作者:fartashh    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:userbase-sns-lambda    作者:fartashh    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:Price-Comparator    作者:Thejas-1    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:nmbs-realtime-Feed    作者:datamindedbe    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:aws-lambda-redshift-copy    作者:christianhxc    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:remoteControlPPT    作者:htwenning    | 项目源码 | 文件源码
def make_psycopg_green():
    """Configure Psycopg to be used with eventlet in non-blocking way."""
    if not hasattr(extensions, 'set_wait_callback'):
        raise ImportError(
            "support for coroutines not available in this Psycopg version (%s)"
            % psycopg2.__version__)

    extensions.set_wait_callback(eventlet_wait_callback)
项目:ansible-provider-docs    作者:alibaba    | 项目源码 | 文件源码
def ensure_libs(sslrootcert=None):
    if not HAS_PSYcopG2:
        raise LibraryError('psycopg2 is not installed. we need psycopg2.')
    if sslrootcert and psycopg2.__version__ < '2.4.3':
        raise LibraryError('psycopg2 must be at least 2.4.3 in order to use the ssl_rootcert parameter')

    # no problems
    return None
项目:PyEloqua-Examples    作者:colemanja91    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")
项目:deb-python-eventlet    作者:openstack    | 项目源码 | 文件源码
def make_psycopg_green():
    """Configure Psycopg to be used with eventlet in non-blocking way."""
    if not hasattr(extensions, 'set_wait_callback'):
        raise ImportError(
            "support for coroutines not available in this Psycopg version (%s)"
            % psycopg2.__version__)

    extensions.set_wait_callback(eventlet_wait_callback)
项目:Sentry    作者:NetEaseGame    | 项目源码 | 文件源码
def make_psycopg_green():
    """Configure Psycopg to be used with gevent in non-blocking way."""
    if not hasattr(extensions, 'set_wait_callback'):
        raise ImportError(
            "support for coroutines not available in this Psycopg version (%s)"
            % psycopg2.__version__)

    extensions.set_wait_callback(gevent_wait_callback)
项目:flask    作者:bobohope    | 项目源码 | 文件源码
def _has_lo64(conn):
    """Return (bool, "this server and build support the lo64 API")

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐