File tree 1 file changed +12
-0
lines changed
src/poetry/core/constraints/version
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,15 @@ def allowed_min(self) -> Version | None:
36
36
if self .min is None :
37
37
return None
38
38
39
+ # That is a bit inaccurate because
40
+ # 1) The exclusive ordered comparison >V MUST NOT allow a post-release
41
+ # of the given version unless V itself is a post release.
42
+ # 2) The exclusive ordered comparison >V MUST NOT match
43
+ # a local version of the specified version.
44
+ # https://peps.python.org/pep-0440/#exclusive-ordered-comparison
45
+ # However, there is no specific min greater than the greatest post release
46
+ # or greatest local version identifier. These cases have to be handled by
47
+ # the callers of allowed_min.
39
48
return self .min
40
49
41
50
@property
@@ -50,6 +59,9 @@ def allowed_max(self) -> Version | None:
50
59
# this is an equality range
51
60
return self .max
52
61
62
+ # The exclusive ordered comparison <V MUST NOT allow a pre-release
63
+ # of the specified version unless the specified version is itself a pre-release.
64
+ # https://peps.python.org/pep-0440/#exclusive-ordered-comparison
53
65
return self .max .first_devrelease ()
54
66
55
67
def allows_lower (self , other : VersionRangeConstraint ) -> bool :
You can’t perform that action at this time.
0 commit comments