Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
15871707
P
pip
项目概览
镜像
/
Python_Packaging_Authority
/
pip
12 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pip
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
15871707
编写于
11月 19, 2020
作者:
P
Pradyun Gedam
提交者:
GitHub
11月 19, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #9124 from pradyunsg/nicer-error-message-wording
Update message displayed on conflicts post-resolution
上级
5eae3c92
7be91574
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
8 deletion
+11
-8
src/pip/_internal/commands/install.py
src/pip/_internal/commands/install.py
+10
-7
tests/functional/test_install_check.py
tests/functional/test_install_check.py
+1
-1
未找到文件。
src/pip/_internal/commands/install.py
浏览文件 @
15871707
...
...
@@ -529,14 +529,16 @@ class InstallCommand(RequirementCommand):
parts
=
[]
# type: List[str]
if
resolver_variant
==
"legacy"
:
parts
.
append
(
"
After October 2020 you may experience errors when installing
"
"
or updating packages. This is because pip will change
the "
"
way that it resolves dependency conflicts.
\n
"
"
pip's legacy dependency resolver does not consider dependency
"
"
conflicts when selecting packages. This behaviour is
the "
"
source of the following dependency conflicts.
"
)
else
:
assert
resolver_variant
==
"2020-resolver"
parts
.
append
(
"
We recommend you use --use-feature=2020-resolver to tes
t "
"
your packages with the new resolver before it become
s the "
"
default.
\n
"
"
pip's dependency resolver does not currently take into accoun
t "
"
all the packages that are installed. This behaviour i
s the "
"
source of the following dependency conflicts.
"
)
# NOTE: There is some duplication here, with commands/check.py
...
...
@@ -557,7 +559,7 @@ class InstallCommand(RequirementCommand):
version
=
package_set
[
project_name
][
0
]
for
dep_name
,
dep_version
,
req
in
conflicting
[
project_name
]:
message
=
(
"{name} {version} requires {requirement}, but
you'll
have "
"{name} {version} requires {requirement}, but
{you}
have "
"{dep_name} {dep_version} which is incompatible."
).
format
(
name
=
project_name
,
...
...
@@ -565,6 +567,7 @@ class InstallCommand(RequirementCommand):
requirement
=
req
,
dep_name
=
dep_name
,
dep_version
=
dep_version
,
you
=
(
"you"
if
resolver_variant
==
"2020-resolver"
else
"you'll"
)
)
parts
.
append
(
message
)
...
...
tests/functional/test_install_check.py
浏览文件 @
15871707
...
...
@@ -89,7 +89,7 @@ def test_check_install_does_not_warn_for_out_of_graph_issues(script):
assert_contains_expected_lines
(
result
.
stderr
,
[
"broken 1.0 requires missing, which is not installed."
,
"broken 1.0 requires conflict<1.0, "
"but you
'll
have conflict 1.0 which is incompatible."
"but you have conflict 1.0 which is incompatible."
])
# Install unrelated package
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录