Open gschaffner opened 1 month ago
I do not currently understand the failures of test_python_executable_option
(assert 0 == 2
) on various piplatest on GHA. tox -r -e "$(echo py{38,39,310,311,312,py3}-pip{previous,latest,main}-coverage | tr ' ' ',')" -- --no-cov -n=0 -v -k test_python_executable_option
passes locally.
The test for this seems difficult to fit into the current testing framework—the test requires access to multiple (differing) interpreters—so I was hoping someone with more familiarity could help with that.
Basically, we might just as well use the same interpreter and a corresponding marker?
Basically, we might just as well use the same interpreter and a corresponding marker?
I don't think I understand, where are you suggesting putting a marker?
My understanding is that for the bug to occur, InstallRequirement.markers.evaluate(environment)
needs to produce a different result with the pip-sync
interpreter's environment
and with the --python-executable=...
interpreter's environment
. AFAIK this is only possible if the two environment
s differ, and AFAIK that is only possible if they are not the same interpreter.
Applied review suggestions and fixed a crash on Windows.
Proposed patchset that fixes #2115.
I've marked this as a draft PR because it's just a fix; it does not yet include an automated test. The test for this seems difficult to fit into the current testing framework—the test requires access to multiple (differing) interpreters—so I was hoping someone with more familiarity could help with that.
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.