我们从Python开源项目中,提取了以下46个代码示例,用于说明如何使用pip.utils.deprecation.RemovedInPip9Warning()。
def _build_req_from_url(url): parts = [p for p in url.split('#', 1)[0].split('/') if p] req = None if len(parts) > 2 and parts[-2] in ('tags', 'branches', 'tag', 'branch'): req = parts[-3] elif len(parts) > 1 and parts[-1] == 'trunk': req = parts[-2] if req: warnings.warn( 'Sniffing the requirement name from the url is deprecated and ' 'will be removed in the future. Please specify an #egg segment ' 'instead.', RemovedInPip9Warning, stacklevel=2) return req