Get the detailed version of QGIS.

    :returns: List containing major, minor and patch.
    :rtype: list
189157
def qgis_version_detailed():
    
    version = str(Qgis.QGIS_VERSION_INT)
    return [int(version[0]), int(version[1:3]), int(version[3:])]
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])
841765
def get_version(version):
    ""
    # 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

    main = get_main_version(version)

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

    return main + sub
585290
def get_versions() -> FileVersionResult:
    

    version_counter = Counter()
    versions_match = False
    version_str = None
    versions_discovered = OrderedDict()

    for version_obj in version_objects:
        discovered = version_obj.get_version()
        versions_discovered[version_obj.key_name] = discovered
        version_counter.update([discovered])

    if len(version_counter) == 1:
        versions_match = True
        version_str = list(version_counter.keys())[0]

    return FileVersionResult(
        uniform=versions_match,
        version_details=versions_discovered,
        version_result=version_str,
    )
522524
def get_version(version=None):
    
    if version is None:
        from modeltranslation import VERSION as version
    else:
        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:
        git_changeset = get_git_changeset()
        if git_changeset:
            sub = '.dev%s' % git_changeset

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

    return str(main + sub)
1138395
def versionString(version):
    
    ver = list(map(str, version))
    numbers, rest = ver[:2 if ver[2] == '0' else 3], ver[3:]
    return '.'.join(numbers) + '-'.join(rest)
963982
def _getEngineVersionDetails(self):
		
		versionFile = os.path.join(self.getEngineRoot(), 'Engine', 'Build', 'Build.version')
		return json.loads(Utility.readFile(versionFile))
306386
def settings(self):
        
        if self._settings is None:
            self._settings = SettingsList(self._version, )
        return self._settings
1198919
def get_ilo_firmware_version_as_major_minor(self):
        
        try:
            manager, reset_uri = self._get_ilo_details()
            ilo_fw_ver_str = (
                manager['Oem']['Hp']['Firmware']['Current']['VersionString']
            )
            return common.get_major_minor(ilo_fw_ver_str)
        except Exception:
            return None
140500
def summary(self):
        
        if not self.bug.resolution:
            return self.bug.summary
        if (self.bug.resolution.lower() in self.parent.resolutions
                or "all" in self.parent.resolutions):
            return "{0} [{1}]".format(
                self.bug.summary, self.bug.resolution.lower())
        return self.bug.summary
146834
def version_at_least(version_string, major, minor, micro, patch):
    
    parts = re.match(
        r'^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+).*$',
        version_string,
    )
    for ver, gold in zip(parts.group(1, 2, 3, 4), (major, minor, micro, patch)):
        if int(ver) < int(gold):
            return False
        elif int(ver) > int(gold):
            return True
    return True
641369
def get_version(self):
        # type: () -> str
        
        # Get the version value
        version = getattr(self.__module, "__version__", None)
        if version:
            return version

        # Convert the __version_info__ entry
        info = getattr(self.__module, "__version_info__", None)
        if info:
            return ".".join(str(part) for part in __version_info__)

        # No version
        return "0.0.0"
591099
def get_version_details(self, version_name):
    
    name = ('%s/versions/%s' % (self._full_model_name, version_name))
    return self._api.projects().models().versions().get(name=name).execute()
1200934
def version():
    '''
    
    '''
    _false_return = {'result': False,
                     'comment': 'OSQuery version unavailable.'}
    res = _osquery_cmd(table='osquery_info', attrs=['version'])
    if 'result' in res and res['result']:
        if 'data' in res and isinstance(res['data'], list):
            return res['data'][0].get('version', '') or _false_return
    return _false_return
101904
def get_version() :
    ""
    major = ct.c_int()
    minor = ct.c_int()
    micro = ct.c_int()
    dbus.dbus_get_version(ct.byref(major), ct.byref(minor), ct.byref(micro))
    return \
        (major.value, minor.value, micro.value)
633780
def base_version(self):
        """"""
        components = [self.xyz_version]
        if self.ver_extra:
            components.append(self.ver_extra)
        return ''.join(components)
830662
def get_package_update_list(package_name, version):
    
    package_version = semantic_version.Version.coerce(version)

    # Get package and version data from pypi
    package_data = get_pypi_package_data(package_name)
    version_data = get_pypi_package_data(package_name, version)

    # Current release specific information
    current_release = ''
    current_release_license = ''

    # Latest release specific information
    latest_release = ''
    latest_release_license = ''

    # Information about packages
    major_updates = []
    minor_updates = []
    patch_updates = []
    pre_releases = []
    non_semantic_versions = []

    if package_data:
        latest_release = package_data['info']['version']
        latest_release_license = package_data['info']['license'] if package_data['info']['license'] else ''

        for release, info in package_data['releases'].items():
            parsed_release = parse(release)

            upload_time = None
            if info:
                upload_time = datetime.strptime(info[0]['upload_time'], "%Y-%m-%dT%H:%M:%S")

            try:
                # Get semantic version of package
                release_version = semantic_version.Version.coerce(release)

                if not parsed_release.is_prerelease:
                    # Place package in the appropriate semantic visioning list
                    if release_version in semantic_version.Spec(">=%s" % package_version.next_major()):
                        major_updates.append({
                            'version': release,
                            'upload_time': upload_time,
                        })
                    elif release_version in semantic_version.Spec(">=%s,<%s" % (package_version.next_minor(), package_version.next_major())):
                        minor_updates.append({
                            'version': release,
                            'upload_time': upload_time,
                        })
                    elif release_version in semantic_version.Spec(">=%s,<%s" % (package_version.next_patch(), package_version.next_minor())):
                        patch_updates.append({
                            'version': release,
                            'upload_time': upload_time,
                        })
                else:
                    pre_releases.append({
                        'version': release,
                        'upload_time': upload_time
                    })
            except ValueError:
                # Keep track of versions that could not be recognized as semantic
                non_semantic_versions.append({'version': release, 'upload_time': upload_time})

    if version_data:
        current_release = version_data['info']['version']
        current_release_license = version_data['info']['license'] if version_data['info']['license'] else ''

    # Get number of newer releases available for the given package
    newer_releases = len(major_updates + minor_updates + patch_updates)

    return {
        'current_release': current_release,
        'current_release_license': current_release_license,
        'latest_release': latest_release,
        'latest_release_license': latest_release_license,
        'newer_releases': newer_releases,
        'pre_releases': len(pre_releases),
        'major_updates': sorted(major_updates, key=lambda x: semantic_version.Version.coerce(x['version']), reverse=True),
        'minor_updates': sorted(minor_updates, key=lambda x: semantic_version.Version.coerce(x['version']), reverse=True),
        'patch_updates': sorted(patch_updates, key=lambda x: semantic_version.Version.coerce(x['version']), reverse=True),
        'pre_release_updates': sorted(pre_releases, key=lambda x: semantic_version.Version.coerce(x['version']), reverse=True),
        'non_semantic_versions': non_semantic_versions,
    }