Skip to content

Commit 4a6b1dc

Browse files
committed
fix: do not pass global_options for pip >= 25.3
1 parent 606bc38 commit 4a6b1dc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

piptools/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,6 @@ def copy_install_requirement(
501501
"link": template.link,
502502
"markers": template.markers,
503503
"isolated": template.isolated,
504-
"global_options": template.global_options,
505504
"hash_options": template.hash_options,
506505
"constraint": template.constraint,
507506
"extras": template.extras,
@@ -510,8 +509,14 @@ def copy_install_requirement(
510509
if PIP_VERSION[:2] < (25, 3):
511510
# Ref: https://github.com/jazzband/pip-tools/issues/2252
512511
kwargs["use_pep517"] = template.use_pep517
512+
kwargs["global_options"] = template.global_options
513513
kwargs.update(extra_kwargs)
514514

515+
if PIP_VERSION[:2] >= (25, 3):
516+
# Ref: https://github.com/jazzband/pip-tools/issues/2252
517+
kwargs.pop("use_pep517", None)
518+
kwargs.pop("global_options", None)
519+
515520
if PIP_VERSION[:2] <= (23, 0):
516521
kwargs["install_options"] = template.install_options
517522

0 commit comments

Comments
 (0)