Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/dependency/parser/python/pip/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func (p *Parser) splitLine(line string) []string {
}
for _, sep := range separators {
if result := strings.Split(line, sep); len(result) == 2 {
// Trim the end-of-range suffix. For example, ">=2.31.0,<3" becomes ">=2.31.0".
// In version ranges, only `,` can be used as a separator:
// "The comma (“,”) is equivalent to a logical AND operator" (see PEP 440).
result[1], _, _ = strings.Cut(result[1], ",")
return result
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Mopidy-Dirble ~= 1.1 # Compatible release. Same as >= 1.1, == 1.*
Django == 2.3.4
SomeProject ==5.4 ; python_version < '3.8'
numpyNew; sys_platform == 'win32'
numpy >= 3.4.1; sys_platform == 'win32'
numpy >= 3.4.1; sys_platform == 'win32'
requests>=2.31.0,<3 # Minimum version 2.31.0. Trim the end-of-range suffix.