Returns missing dependencies for provider key.
        Missing meaning no instance can be provided at this time.

        :param key: Provider key
        :type key: object
        :return: Missing dependencies
        :rtype: list
431039
def get_missing_deps(self, obj):
        '''
        
        '''
        deps = self.get_deps(obj)
        ret = []
        for key in deps:
            provider = self._providers.get(key)
            if provider and provider.providable:
                continue
            ret.append(key)
        return ret
153917
def _resolve_deps(name, pkgs, **kwargs):
    '''
    
    '''
    missing_deps = []
    for pkg_file in pkgs:
        deb = apt.debfile.DebPackage(filename=pkg_file, cache=apt.Cache())
        if deb.check():
            missing_deps.extend(deb.missing_deps)

    if missing_deps:
        cmd = ['apt-get', '-q', '-y']
        cmd = cmd + ['-o', 'DPkg::Options::=--force-confold']
        cmd = cmd + ['-o', 'DPkg::Options::=--force-confdef']
        cmd.append('install')
        cmd.extend(missing_deps)

        ret = __salt__['cmd.retcode'](
            cmd,
            env=kwargs.get('env'),
            python_shell=False
        )

        if ret != 0:
            raise CommandExecutionError(
                'Error: unable to resolve dependencies for: {0}'.format(name)
            )
        else:
            try:
                cmd = ['apt-mark', 'auto'] + missing_deps
                __salt__['cmd.run'](
                    cmd,
                    env=kwargs.get('env'),
                    python_shell=False
                )
            except MinionError as exc:
                raise CommandExecutionError(exc)
    return
1132031
def search_dependencies(self):
        
        #It is understood that this executable's module is obviously required. Just
        #add any additional modules from the parameters.
        result = [p.dependency() for p in self.ordered_parameters]
        result.extend([v.dependency() for k, v in list(self.members.items())])
        for ekey, anexec in list(self.executables.items()):
            result.extend(anexec.search_dependencies())
        return [m for m in result if m is not None and m != self.module.name]
1356397
def get(self, key, bucket):
        

        try:
            return self._cache[bucket][key]
        except (KeyError, TypeError):
            return None
509594
def resolve_or_missing(self, key):
        
        if self._legacy_resolve_mode:
            rv = self.resolve(key)
            if isinstance(rv, Undefined):
                rv = missing
            return rv
        return resolve_or_missing(self, key)
385713
def lookup_cert(self, key):
        
        if not self.consumers:
            log.critical(("No consumers defined in settings."
                          "Have you created a configuration file?"))
            return None

        consumer = self.consumers.get(key)
        if not consumer:
            log.info("Did not find consumer, using key: %s ", key)
            return None
        cert = consumer.get('cert', None)
        return cert
1118057
def key_from_req(req):
    """"""
    if hasattr(req, "key"):
        # from pkg_resources, such as installed dists for pip-sync
        key = req.key
    else:
        # from packaging, such as install requirements from requirements.txt
        key = req.name

    key = key.replace("_", "-").lower()
    return key
629069
def dependencies(self, task, params={}, **options): 
        
        path = "/tasks/%s/dependencies" % (task)
        return self.client.get(path, params, **options)
1156336
def _key_from_req(req):
    """"""
    if hasattr(req, 'key'):
        # from pkg_resources, such as installed dists for pip-sync
        key = req.key
    else:
        # from packaging, such as install requirements from requirements.txt
        key = req.name

    key = key.replace('_', '-').lower()
    return key
1224298
def _lookup_required_session(self, key):
        
        session = self.session_handler.do_get_session(key)
        if (not session):
            msg = ("Unable to locate required Session instance based "
                   "on session_key [" + str(key) + "].")
            raise ValueError(msg)
        return session
587140
def get(self, key, default=None):
        
        try:
            return self[key]
        except KeyError:
            return default or self._default
1072657
def get_dependencies(self) -> Optional[List[str]]:
        

        if not self.apt_dependencies:
            return None

        try:
            dependencies = list([str(x).strip() for x in self.apt_dependencies])
        except (TypeError, ValueError):
            raise ArcaMisconfigured("Apk dependencies can't be converted into a list of strings")

        if not len(dependencies):
            return None

        dependencies.sort()

        return dependencies
755387
def get_dependency_package(
        self, package_name: str
    ) -> "Package":  # type: ignore # noqa: F821
        
        self._validate_name(package_name)
        return self.build_dependencies.get(package_name)
168652
def get_dependencies(self, item):
        
        def _get_sub_dependency(sub_item):
            e = self._deps.get(sub_item)
            if e is None:
                return self.get_default()

            if e.dependencies is NotInitialized:
                e.dependencies = self.merge_dependency(sub_item, _get_sub_dependency, e.parent)
            return e.dependencies

        return _get_sub_dependency(item)
912404
def iresolve(self, *keys):
        '''
        
        '''
        for key in keys:
            missing = self.get_missing_deps(key)
            if missing:
                raise UnresolvableError("Missing dependencies for %s: %s" % (key, missing))

            provider = self._providers.get(key)
            if not provider:
                raise UnresolvableError("Provider does not exist for %s" % key)

            yield provider()
57373
def _get_dependencies_from_kwargs(self, args):
        
        if not isinstance(args, dict):
            raise TypeError('"kwargs" must be a dictionary')

        dependency_names = set()
        for arg in args.values():
            new_names = self._check_arg(arg)
            dependency_names.update(new_names)
        return dependency_names
436356
def missing_requirements(self, specifiers):
        
        for specifier in specifiers:
            try:
                pkg_resources.require(specifier)
            except pkg_resources.DistributionNotFound:
                yield specifier