Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commitf44524a
committed
Avoid spurious "location may have moved" on Windows
The main case where this happens is when tempfile.gettempdir() hasa component in it that uses an 8.3-encoded path, e.g.,C:\Users\Administrator\... -> C:\Users\ADMINI~1\...This is a workaround forpython/cpython#90329. I call realpath onlyonce, when the venv is created, and not on any paths inside thevenv, to make it less likely this masks the problems the warning ismeant for. (For example, if Scripts, or python.exe in it, producedthis even with the venv created as it is now, then that may indictean actual problem.)Note that copying python.exe from Scripts to one level up in thevenv, and changing its name to bash.exe to use it to simulate thebash.exe impostor, as is done in test_hook_uses_shell_not_from_cwd,should not (and does not) produce this warning. If that ever startsto do so, then that should be examined as a sign of brittleness.1 parenta42ea0a commitf44524a
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
400 | 400 |
| |
401 | 401 |
| |
402 | 402 |
| |
403 |
| - | |
404 |
| - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
405 | 409 |
| |
406 | 410 |
| |
407 | 411 |
| |
|
0 commit comments
Comments
(0)