uv
f615e81a - Clear ephemeral overlays when running tools (#11141)

Commit
312 days ago
Clear ephemeral overlays when running tools (#11141) ## Summary This PR removes the ephemeral `.pth` overlay when using a cached environment. This solution isn't _completely_ safe, since we could remove the `.pth` file just as another process is starting the environment... But that risk already exists today, since we could _overwrite_ the `.pth` file just as another process is starting the environment, so I think what I've added here is a strict improvement. Ideally, we wouldn't write this file at all, and we'd instead somehow (e.g.) pass a file to the interpreter to run at startup? Or find some other solution that doesn't require poisoning the cache like this. Closes https://github.com/astral-sh/uv/issues/11117. # Test Plan Ran through the great reproduction steps from the linked issue. Before: ![Screenshot 2025-01-31 at 2 11 31 PM](https://github.com/user-attachments/assets/d36e1db5-27b1-483a-9ced-bec67bd7081d) After: ![Screenshot 2025-01-31 at 2 11 39 PM](https://github.com/user-attachments/assets/1f963ce0-7903-4acd-9fd6-753374c31705)
Author
Parents
Loading