From 47a200f06bab74b81e770cd71c3e5a9ea3bda3be Mon Sep 17 00:00:00 2001 From: JiachenSmith Date: Wed, 19 Apr 2023 02:02:27 +0800 Subject: [PATCH] InstallRequirement.extras is expected to be a set anyway Pointed out in https://github.com/jazzband/pip-tools/issues/1451#issuecomment-919264865 --- piptools/resolver.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/piptools/resolver.py b/piptools/resolver.py index 2cc1cb7..4a475e7 100644 --- a/piptools/resolver.py +++ b/piptools/resolver.py @@ -78,8 +78,7 @@ def combine_install_requirements( if combined_ireq.req is not None and ireq.req is not None: combined_ireq.req.specifier &= ireq.req.specifier combined_ireq.constraint &= ireq.constraint - # Return a sorted, de-duped tuple of extras - combined_ireq.extras = tuple(sorted({*combined_ireq.extras, *ireq.extras})) + combined_ireq.extras = {*combined_ireq.extras, *ireq.extras} # InstallRequirements objects are assumed to come from only one source, and # so they support only a single comes_from entry. This function breaks this