Skip to content

Commit

Permalink
Fix CI for pip 24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysle committed May 1, 2024
1 parent b692edb commit ae44f68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion piptools/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import operator
from typing import Iterable

from pip._internal.index.package_finder import PackageFinder
Expand Down Expand Up @@ -27,7 +28,9 @@ def __str__(self) -> str:
versions = []
pre_versions = []

for candidate in sorted(self.candidates_tried):
for candidate in sorted(
self.candidates_tried, key=operator.attrgetter("version")
):
version = str(candidate.version)
if candidate.version.is_prerelease:
pre_versions.append(version)
Expand Down

0 comments on commit ae44f68

Please sign in to comment.