Skip to content

Fix the detection of an unhappy installation path in a venv under Windows#554

Merged
tramora merged 1 commit intomainfrom
548-fix-status-pip-on-windows
Mar 3, 2026
Merged

Fix the detection of an unhappy installation path in a venv under Windows#554
tramora merged 1 commit intomainfrom
548-fix-status-pip-on-windows

Conversation

@tramora
Copy link
Collaborator

@tramora tramora commented Feb 13, 2026

External tools like VSCode can modify the case of the path saved in sys.executable

Fixes #548

The case is indeed reproductible in saving the value of sys.executable and altering its case.

Implementing an automatic test would required extracting a function returning sys.executable and mocking it during the test.
Possible but but a bit overkill.


TODO Before Asking for a Review

  • Rebase your branch to the latest version of main (or main-v10)
  • Make sure all CI workflows are green
  • When adding a public feature/fix: Update the Unreleased section of CHANGELOG.md (no date)
  • Self-Review: Review "Files Changed" tab and fix any problems you find
  • API Docs (only if there are changes in docstrings, rst files or samples):
    • Check the docs build without warning: see the log of the API Docs workflow
    • Check that your changes render well in HTML: download the API Docs artifact and open index.html
    • If there are any problems it is faster to iterate by building locally the API Docs

@tramora tramora requested review from popescu-v and removed request for popescu-v February 13, 2026 17:32
@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch from 1029be1 to 92b1a47 Compare February 16, 2026 15:06
@tramora tramora requested a review from popescu-v February 16, 2026 16:00
Copy link
Collaborator

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the comments.

@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch from 92b1a47 to 3606064 Compare February 17, 2026 18:12
@tramora tramora requested a review from popescu-v February 17, 2026 18:13
Copy link
Collaborator

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the remaining open comment.

@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch from 3606064 to c088121 Compare February 20, 2026 17:13
@tramora tramora requested a review from popescu-v February 20, 2026 17:18
Copy link
Collaborator

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few remaining issues (see the comments).

@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch from c088121 to dee6493 Compare February 26, 2026 12:11
@tramora tramora requested a review from popescu-v February 26, 2026 12:11
@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch from dee6493 to 886058e Compare February 26, 2026 19:43
@tramora tramora requested review from popescu-v and removed request for popescu-v February 26, 2026 19:47
@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch 2 times, most recently from 3ed7b8c to f8fe43e Compare March 2, 2026 09:00
@tramora tramora requested a review from popescu-v March 2, 2026 09:01
@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch from f8fe43e to df30e0c Compare March 2, 2026 15:01
@tramora tramora requested a review from popescu-v March 2, 2026 15:02
@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch from df30e0c to 1415375 Compare March 3, 2026 11:22
@tramora tramora requested a review from popescu-v March 3, 2026 11:41
Copy link
Collaborator

@popescu-v popescu-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Change the sentence "This later sees case-insensitive paths." in the commit message to "The latter considers paths as case-insensitive." or another text along these lines.

- External tools like VSCode can modify for example the case of the path saved in `sys.executable`
- As a general rule a pathlib.Path object is always built. Depending on the OS either a PosixPath or a WindowsPath instance is created. The latter considers paths as case-insensitive.
@tramora tramora force-pushed the 548-fix-status-pip-on-windows branch from 1415375 to 3135e17 Compare March 3, 2026 20:33
@tramora tramora merged commit 50ef378 into main Mar 3, 2026
18 checks passed
@tramora tramora deleted the 548-fix-status-pip-on-windows branch March 3, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spurious Warning Occurs in Binary + Pip installations on Windows

2 participants