File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -452,6 +452,7 @@ def get_applicable_candidates(
452
452
# Using None infers from the specifier instead.
453
453
allow_prereleases = self ._allow_all_prereleases or None
454
454
specifier = self ._specifier
455
+ candidates_and_versions = [(c , str (c .version )) for c in candidates ]
455
456
versions = {
456
457
str (v )
457
458
for v in specifier .filter (
@@ -462,13 +463,13 @@ def get_applicable_candidates(
462
463
# types. This way we'll use a str as a common data interchange
463
464
# format. If we stop using the pkg_resources provided specifier
464
465
# and start using our own, we can drop the cast to str().
465
- (str ( c . version ) for c in candidates ),
466
+ (v for _ , v in candidates_and_versions ),
466
467
prereleases = allow_prereleases ,
467
468
)
468
469
}
469
470
470
471
# Again, converting version to str to deal with debundling.
471
- applicable_candidates = [c for c in candidates if str ( c . version ) in versions ]
472
+ applicable_candidates = [c for c , v in candidates_and_versions if v in versions ]
472
473
473
474
filtered_applicable_candidates = filter_unallowed_hashes (
474
475
candidates = applicable_candidates ,
You can’t perform that action at this time.
0 commit comments