requirements.txt 波浪号等于 (~=) vs 波浪号大于 (~>)
requirements.txt tilde equals (~=) vs tilde greater-than (~>)
根据
它与其他地方的链接,我了解到 ~= V.N
与 >= V.N, == V.*
相同
For a given release identifier V.N , the compatible release clause is approximately equivalent to the pair of comparison clauses:
>= V.N, == V.*
但是~> V.N
是什么意思呢?它是否仅表示 > V.N, == V.*
,表示版本 V.N
不能满足要求,但 V.(N+1)
可以?
注意:我在任何地方都没有看到使用过这种表示法,但是 GitHub 最近发送了一条安全警报,说要更新一个 requirements.txt 以使用这种语法。
此 ~>
不是 Python 中的有效要求说明符。
安全警报一定是在谈论另一种语言 - 也许是 Gemfile (Ruby)?
根据~= V.N
与 >= V.N, == V.*
For a given release identifier V.N , the compatible release clause is approximately equivalent to the pair of comparison clauses:
>= V.N, == V.*
但是~> V.N
是什么意思呢?它是否仅表示 > V.N, == V.*
,表示版本 V.N
不能满足要求,但 V.(N+1)
可以?
注意:我在任何地方都没有看到使用过这种表示法,但是 GitHub 最近发送了一条安全警报,说要更新一个 requirements.txt 以使用这种语法。
此 ~>
不是 Python 中的有效要求说明符。
安全警报一定是在谈论另一种语言 - 也许是 Gemfile (Ruby)?