You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid spurious "location may have moved" on Windows
The main case where this happens is when tempfile.gettempdir() has
a component in it that uses an 8.3-encoded path, e.g.,
C:\Users\Administrator\... -> C:\Users\ADMINI~1\...
This is a workaround for python/cpython#90329. I call realpath only
once, when the venv is created, and not on any paths inside the
venv, to make it less likely this masks the problems the warning is
meant for. (For example, if Scripts, or python.exe in it, produced
this even with the venv created as it is now, then that may indicte
an actual problem.)
Note that copying python.exe from Scripts to one level up in the
venv, and changing its name to bash.exe to use it to simulate the
bash.exe impostor, as is done in test_hook_uses_shell_not_from_cwd,
should not (and does not) produce this warning. If that ever starts
to do so, then that should be examined as a sign of brittleness.
0 commit comments