Python pip._vendor.pkg_resources 模块,parse_version() 实例源码

我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用pip._vendor.pkg_resources.parse_version()

项目:Flask_Blog    作者:sugarguo    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:swjtu-pyscraper    作者:Desgard    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:noc-orchestrator    作者:DirceuSilvaLabs    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:noc-orchestrator    作者:DirceuSilvaLabs    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:noc-orchestrator    作者:DirceuSilvaLabs    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:zanph    作者:zanph    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:hostapd-mana    作者:adde88    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:isni-reconcile    作者:cmh2166    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:flasky    作者:RoseOu    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:threatdetectionservice    作者:flyballlabs    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:oa_qian    作者:sunqb    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:chihu    作者:yelongyu    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:pyetje    作者:rorlika    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:Problematica-public    作者:TechMaz    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:bawk    作者:jttwnsnd    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:Price-Comparator    作者:Thejas-1    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:fieldsight-kobocat    作者:awemulya    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:chalktalk_docs    作者:loremIpsum1771    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:sslstrip-hsts-openwrt    作者:adde88    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:Flask-NvRay-Blog    作者:rui7157    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:NeuroMobile    作者:AndrewADykman    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:My-Web-Server-Framework-With-Python2.7    作者:syjsu    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:WebAct    作者:CreatCodeBuild    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:python-on    作者:hemangsk    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:python-on    作者:hemangsk    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:remoteControlPPT    作者:htwenning    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:ASE-Fall2016    作者:Dai0526    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:vmmenu    作者:piggyking    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:vmmenu    作者:piggyking    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:APIGateway    作者:n89nanda    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:mibici-tools    作者:regenhans    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:QA4LOV    作者:gatemezing    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:Flask-SocketIO    作者:cutedogspark    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:metrics    作者:Jeremy-Friedman    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:metrics    作者:Jeremy-Friedman    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:projeto    作者:BarmyPenguin    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:compatify    作者:hatooku    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:compatify    作者:hatooku    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:ropi    作者:ThumbGen    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:Tweetme_Django    作者:wycliff    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:Data-visualization    作者:insta-code1    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:aweasome_learning    作者:Knight-ZXW    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:Salonniere    作者:txizzle    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:Sommarprojekt16    作者:fregu856    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:beepboop    作者:nicolehe    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:micro-blog    作者:nickChenyx    | 项目源码 | 文件源码
def should_warn(current_version, removal_version):
    # Our Significant digits on versions is 2, so remove everything but the
    #   first two places.
    current_version = ".".join(current_version.split(".")[:2])
    removal_version = ".".join(removal_version.split(".")[:2])

    # Our warning threshold is one minor version before removal, so we
    #   decrement the minor version by one
    major, minor = removal_version.split(".")
    minor = str(int(minor) - 1)
    warn_version = ".".join([major, minor])

    # Test if our current_version should be a warn
    return (pkg_resources.parse_version(current_version)
                < pkg_resources.parse_version(warn_version))
项目:quizwizard    作者:naveensaikiran    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:PyEloqua-Examples    作者:colemanja91    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))
项目:bc-7-Todo-Console-Application    作者:Onikah    | 项目源码 | 文件源码
def highest_version(versions):
    return next(iter(
        sorted(versions, key=pkg_resources.parse_version, reverse=True)
    ))