Construct the user-agent header with the package info,
        Python version and OS version.

        Returns:
            The user agent string.
            e.g. 'Python/3.6.7 slack/2.0.0 Darwin/17.7.0'
554797
def _get_user_agent():
        
        # __name__ returns all classes, we only want the client
        client = "{0}/{1}".format(__name__.split(".")[0], ver.__version__)
        python_version = "Python/{v.major}.{v.minor}.{v.micro}".format(
            v=sys.version_info
        )
        system_info = "{0}/{1}".format(platform.system(), platform.release())
        user_agent_string = " ".join([python_version, client, system_info])
        return user_agent_string
1290251
def Name(self):
        
        name = ""
        if self.Version:
            name = self.Version.UserAgent
        return name
167547
def versions_information(include_salt_cloud=False):
    '''
    
    '''
    salt_info = list(salt_information())
    lib_info = list(dependency_information(include_salt_cloud))
    sys_info = list(system_information())

    return {'Salt Version': dict(salt_info),
            'Dependency Versions': dict(lib_info),
            'System Versions': dict(sys_info)}
1010292
def versionstring():
    # type: () -> Text
    '''
    
    '''
    pkg = pkg_resources.require("cwltool")
    if pkg:
        return u"%s %s" % (sys.argv[0], pkg[0].version)
    return u"%s %s" % (sys.argv[0], "unknown version")
1160193
def get_version():
    
    # "Spoof" the ``setup.py`` helper modules.
    sys.modules["setup_helpers"] = object()
    sys.modules["setup_helpers_macos"] = object()
    sys.modules["setup_helpers_windows"] = object()
    filename = os.path.join(_ROOT_DIR, "setup.py")
    loader = importlib.machinery.SourceFileLoader("setup", filename)
    setup_mod = loader.load_module()
    return setup_mod.VERSION
760264
def get_user_agent(name="ontobio", version=ontobio_version, modules=None, caller_name=None):
    

    user_agent_array = ["{}/{}".format(name, version)]
    if modules:
        module_info_array = []
        for m in modules:
            mod_name = m.__name__
            mod_version = None
            if hasattr(m, 'get_version'):
                mod_version = m.get_version()
            else:
                mod_version = m.__version__
            module_info_array.append("{}/{}".format(mod_name, mod_version))

        if caller_name:
            module_info_array.append(caller_name)

        user_agent_array.append("({})".format('; '.join(module_info_array)))
    else:
        if caller_name:
            user_agent_array.append("({})".format(caller_name))

    return ' '.join(user_agent_array)
738530
def pip_version(self):
        
        from .vendor.packaging.version import parse as parse_version
        pip = next(iter(
            pkg for pkg in self.get_installed_packages() if pkg.key == "pip"
        ), None)
        if pip is not None:
            pip_version = parse_version(pip.version)
        return parse_version("18.0")
230826
def version(self):
        '''
        
        '''
        url = "http://{master_addr}:{master_port}/dir/status".format(
            master_addr=self.master_addr,
            master_port=self.master_port)
        data = self.conn.get_data(url)
        response_data = json.loads(data)
        return response_data.get("Version")
620276
def version(self):
        
        for line in self.SLACKBUILDS_TXT.splitlines():
            if line.startswith(self.line_name):
                sbo_name = line[17:].strip()
            if line.startswith(self.line_ver):
                if sbo_name == self.name:
                    return line[20:].strip()
1333774
def default_user_agent(name="python-requests"):
    """"""
    _implementation = platform.python_implementation()

    if _implementation == 'CPython':
        _implementation_version = platform.python_version()
    elif _implementation == 'PyPy':
        _implementation_version = '%s.%s.%s' % (sys.pypy_version_info.major,
                                                sys.pypy_version_info.minor,
                                                sys.pypy_version_info.micro)
        if sys.pypy_version_info.releaselevel != 'final':
            _implementation_version = ''.join([_implementation_version, sys.pypy_version_info.releaselevel])
    elif _implementation == 'Jython':
        _implementation_version = platform.python_version()  # Complete Guess
    elif _implementation == 'IronPython':
        _implementation_version = platform.python_version()  # Complete Guess
    else:
        _implementation_version = 'Unknown'

    try:
        p_system = platform.system()
        p_release = platform.release()
    except IOError:
        p_system = 'Unknown'
        p_release = 'Unknown'

    return " ".join(['%s/%s' % (name, __version__),
                     '%s/%s' % (_implementation, _implementation_version),
                     '%s/%s' % (p_system, p_release)])
45242
def make_user_agent(prefix=None):
    """"""
    prefix = (prefix or platform.platform(terse=1)).strip().lower()
    return "cloudsmith-cli/%(prefix)s cli:%(version)s api:%(api_version)s" % {
        "version": get_cli_version(),
        "api_version": get_api_version(),
        "prefix": prefix,
    }
1341631
def get_runtime_version(self):  # pylint: disable=no-self-use
        
        import platform

        version_info = '\n\n'
        version_info += 'Python ({}) {}'.format(platform.system(), sys.version)
        version_info += '\n\n'
        version_info += 'Python location \'{}\''.format(sys.executable)
        version_info += '\n'
        return version_info
1000992
def get_version():
    
    _globals = {}
    _locals = {}
    exec(
        compile(
            open(TOP + "/manta/version.py").read(), TOP + "/manta/version.py",
            'exec'), _globals, _locals)
    return _locals["__version__"]
1298345
def package_path(self, team, user, package):
        
        return os.path.join(self.user_path(team, user), package)
115313
def _get_python_version_string():
    
    version_info = sys.version_info
    return '.'.join(map(str, [version_info[0], version_info[1], version_info[2]]))
313961
def get_package_version():
    """"""
    base = os.path.abspath(os.path.dirname(__file__))
    with open(os.path.join(base, "firepit/__init__.py")) as pkg:
        for line in pkg:
            m = version.match(line.strip())
            if not m:
                continue
            return ".".join(m.groups()[0].split(", "))
605886
def check_version():
    
    import requests
    r = requests.get('https://pypi.python.org/pypi/intern/json').json()
    r = r['info']['version']
    if r != __version__:
        print("You are using version {}. A newer version of intern is available: {} ".format(__version__, r) +
              "\n\n'pip install -U intern' to update.")
    return r