Loads version from the stream / version database
        # TODO: instance vs. tp.

        :param tp:
        :param params:
        :return:
18372
async def get_version(self, tp, params):
        
        tw = TypeWrapper(tp, params)
        if not tw.is_versioned():
            # self.registry.set_tr()
            return TypeWrapper.ELEMENTARY_RES

        # If not in the DB, load from archive at current position
        if not self.version_db.is_versioned(tw):
            tr = await load_uvarint(self.iobj)
            ver = await load_uvarint(self.iobj)
            self.version_db.set_version(tw, tr, ver)

        else:
            tr, ver = self.version_db.get_version(tw)

        obj_id = None if tr == 0 else await load_uvarint(self.iobj)
        self.registry.set_tr(obj_id)
        return ver
44668
def _parse_version(version):
        
        parsed_version = parse_version(version)
        return tuple(
            int(dot_version)
            for dot_version in parsed_version.base_version.split('.')
        ) + (parsed_version.is_prerelease,)
1167629
def pool_versions(self, updater_id=None, updater_name=None, pool_id=None):
        
        params = {
            'search[updater_id]': updater_id,
            'search[updater_name]': updater_name,
            'search[pool_id]': pool_id
            }
        return self._get('pool_versions.json', params)
615175
def version(self, version):
        
        if isinstance(version, type_check):
            self._version = int(version)
        elif isinstance(version, int):
            self._version = version
71765
function loadCurrentVersion (options, context) {
  return new Extension(options, context).read()
    .then(function (response) {
      let version = response.sys.version;

      options.version = version;
      return options;
    });
}
1020311
async def version(self):
        
        params = {'access_token': self.token}
        url = '/api/version.{ext}'.format(ext=self.format)
        return await self.query(url, "get", **params)
1200153
def get_version():
        """"""
        cmd = [PostgresFinder.find_root() / 'pg_ctl', '--version']
        results = subprocess.check_output(cmd).decode('utf-8')
        match = re.search(r'(\d+\.\d+(\.\d+)?)', results)
        if match:
            ver_string = match.group(0)
            return tuple(int(x) for x in ver_string.split('.'))
580097
def _parsed_version(user=None, host=None, port=None, maintenance_db=None,
                    password=None, runas=None):
    '''
    
    '''

    psql_version = version(
        user,
        host=host,
        port=port,
        maintenance_db=maintenance_db,
        password=password,
        runas=runas,
    )

    if psql_version:
        return _LooseVersion(psql_version)
    else:
        log.warning('Attempt to parse version of Postgres server failed. '
                    'Is the server responding?')
        return None
422336
def get_version_req(dep)
      req = get_key_or_sym(dep, :version_requirement)
      req = get_key_or_sym(dep, :version_range) unless req
      req
    end
202885
def _resolve_version(version):
    
    if version is not LATEST:
        return version

    resp = urlopen('https://pypi.python.org/pypi/setuptools/json')
    with contextlib.closing(resp):
        try:
            charset = resp.info().get_content_charset()
        except Exception:
            # Python 2 compat; assume UTF-8
            charset = 'UTF-8'
        reader = codecs.getreader(charset)
        doc = json.load(reader(resp))

    return str(doc['info']['version'])
133913
def _get_version(name, results):
    '''
    
    '''
    for line in salt.utils.itertools.split(results, '\n'):
        if not line:
            continue
        try:
            pkgname, pkgver = line.rsplit('-', 1)
        except ValueError:
            continue
        if pkgname == name:
            return pkgver
    return None
114912
def get_version
      version = nil
      Execute.task_popen3("_version") do |i, o, e, t|
        version = Helpers.to_gem_version(o.read.chomp)
      end
      version
    end
186036
def version
      @version ||= IO.popen([@path, "--version"]) do |io|
        io.gets[VERSION_PATTERN, 1]
      end
    rescue => e
      raise Error, "Couldn't load #{@path}: #{e}"
    end
36253
def get_version(model_instance, version):
    
    version_field = get_version_fieldname(model_instance)
    kwargs = {'pk': model_instance.pk, version_field: version}
    return model_instance.__class__.objects.get(**kwargs)
415643
def load(cls, stream):
        
        data = json.load(stream)['ts']
        return cls(data['time'], data['inc'])
1121434
def load(self, require=True, *args, **kwargs):
        
        if not require or args or kwargs:
            warnings.warn(
                "Parameters to load are deprecated.  Call .resolve and "
                ".require separately.",
                PkgResourcesDeprecationWarning,
                stacklevel=2,
            )
        if require:
            self.require(*args, **kwargs)
        return self.resolve()
582354
def version(self):
		
		lines = iter(self._invoke('version').splitlines())
		version = next(lines).strip()
		return self._parse_version(version)