Get a tuple with major and minor version number

    :param Integer protocol_version: Internal version ID
    :return: Tuple of major and minor protocol version
    :rtype: Tuple
437235
def get_version_id(protocol_version):
    
    ver = registry.version_info.get(protocol_version)
    if ver:
        return ver.version_id
1125894
def get_version_url(self, version):
        
        for each_version in self.other_versions():
            if version == each_version['version'] and 'location' in each_version:
                return each_version.get('location')
        raise VersionNotInHive(version)
63556
def version_str(version):
    
    if isinstance(version, str):
        return version
    elif isinstance(version, tuple):
        return '.'.join([str(int(x)) for x in version])
    else:
        raise ValueError("Invalid version: %s" % version)
195612
def readProtocolVersion(self, data):
        
        data.readType(self._version)
        if not self._version.value in [ProtocolVersion.RFB003003, ProtocolVersion.RFB003007, ProtocolVersion.RFB003008]:
            self._version.value = ProtocolVersion.UNKNOWN
846959
def _parse_version(self, line):
        
        version_string = line.split(' ')[1]
        version_list = version_string.split('.')
        major_version = ''.join([version_list[0], version_list[1]])
        release_num = ''.join([version_list[2].rstrip(), "-03"])
        return (major_version, release_num)
32831
def update_version(self, version: Union[http.HttpVersion, str]) -> None:
        
        if isinstance(version, str):
            v = [l.strip() for l in version.split('.', 1)]
            try:
                version = http.HttpVersion(int(v[0]), int(v[1]))
            except ValueError:
                raise ValueError(
                    'Can not parse http version number: {}'
                    .format(version)) from None
        self.version = version
1312712
def getVersionNumber(self):
        """"""
        print '%s call getVersionNumber' % self.port
        versionStr = self.__sendCommand(WPANCTL_CMD + 'getprop -v NCP:Version')[0]

        return self.__stripValue(versionStr)
900177
def _pep425_version():
    

    if hasattr(sys, 'pypy_version_info'):
        return (sys.version_info[0], sys.pypy_version_info.major,
                sys.pypy_version_info.minor)
    else:
        return (sys.version_info[0], sys.version_info[1])
635512
def _sane_version_list(version):
    
    v0 = str(version[0])
    if v0:
        # Test if the major is a number.
        try:
            v0 = v0.lstrip("v").lstrip("V")
            # Handle the common case where tags have v before major.
            v0 = int(v0)
        except ValueError:
            v0 = None

    if v0 is None:
        version = [0, 0] + version
    else:
        version[0] = v0

    try:
        # Test if the minor is a number.
        version[1] = int(version[1])
    except ValueError:
        # Insert Minor 0.
        version = [version[0], 0] + version[1:]

    return version
714919
def get_version(version=None):
    """"""
    if version is None:
        version = VERSION
    assert len(version) == 5
    assert version[3] in ('alpha', 'beta', 'rc', 'final')

    # Now build the two parts of the version number:
    # main = X.Y[.Z]
    # sub = .devN - for pre-alpha releases
    #     | {a|b|c}N - for alpha, beta and rc releases

    parts = 2 if version[2] == 0 else 3
    main = '.'.join(str(x) for x in version[:parts])

    sub = ''
    if version[3] == 'alpha' and version[4] == 0:
        # At the toplevel, this would cause an import loop.
        from django.utils.version import get_svn_revision
        svn_revision = get_svn_revision()[4:]
        if svn_revision != 'unknown':
            sub = '.dev%s' % svn_revision

    elif version[3] != 'final':
        mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
        sub = mapping[version[3]] + str(version[4])

    return main + sub
556365
def tupletize_version(version_string):
    '''
    
    '''
    return tuple(int(x) for x in re.findall(r'[0-9]+', version_string))
715262
def inform_version_connect(self, msg):
        """"""
        if len(msg.arguments) < 2:
            return
        # Store version information.
        name = msg.arguments[0]
        self.versions[name] = tuple(msg.arguments[1:])
        if msg.arguments[0] == "katcp-protocol":
            protocol_flags = ProtocolFlags.parse_version(msg.arguments[1])
            self._set_protocol_from_inform(protocol_flags, msg)
652970
def get_version(version):
    ""
    assert len(version) == 5
    assert version[3] in ('alpha', 'beta', 'rc', 'final')
    parts = 2 if version[2] == 0 else 3
    main = '.'.join(map(str, version[:parts]))
    sub = ''
    if version[3] == 'alpha' and version[4] == 0:
        git_changeset = get_git_changeset()
        if git_changeset:
            sub = '.dev%s' % git_changeset
    elif version[3] != 'final':
        mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
        sub = mapping[version[3]] + str(version[4])
    return main + sub
1223051
def get_version(release_level=True):
    
    vers = ["%(major)i.%(minor)i.%(micro)i" % __version_info__]
    if release_level and __version_info__['releaselevel'] != 'final':
        vers.append('%(releaselevel)s%(serial)i' % __version_info__)
    return ''.join(vers)
279510
def get_version(self, as_tuple=False):
        
        if as_tuple:
            return uwsgi.version_info

        return decode(uwsgi.version)
1019741
def tokenize_version(version_string: str) -> Tuple[int, int, int]:
    
    before_dash = version_string.split('-')[0]
    major, minor, patch = before_dash.split('.')[:3]  # take only the first 3 in case there's an extension like -dev.0
    return int(major), int(minor), int(patch)
386786
def version
      return ExtPubkey.version_from_purpose(number) if depth == 1
      ver ? ver : Bitcoin.chain_params.extended_pubkey_version
    end