Skip to content

Commit 417cd74

Browse files
lingyaochuAmaanBilwar
authored andcommitted
python: Upgrade pet to improve toolchain discovery in WSL (zed-industries#51749)
This PR updates the pet dependency to incorporate performance improvements from upstream. Related Upstream Changes: - Issue: microsoft/python-environment-tools#369 - PR: microsoft/python-environment-tools#370 Updating pet reduces toolchain discovery time in WSL environments, specifically when Conda is installed on the host Windows system. In my testing, the time from clicking the toolchain button to the list appearing was reduced by approximately 2 seconds. While this is a notable improvement, discovery in WSL remains slightly slower than in native development or remote Linux environments, where toolchains are typically loaded near-instantaneously. Before you mark this PR as ready for review, make sure that you have: - [x] Added a solid test coverage and/or screenshots from doing manual testing (no need) - [x] Done a self-review taking into account security and performance aspects - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - Improved python toolchain discovery under WSL environment
1 parent f3ac380 commit 417cd74

3 files changed

Lines changed: 56 additions & 32 deletions

File tree

Cargo.lock

Lines changed: 48 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -636,13 +636,13 @@ parse_int = "0.9"
636636
pciid-parser = "0.8.0"
637637
pathdiff = "0.2"
638638
percent-encoding = "2.3.2"
639-
pet = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "d5b5bb0c4558a51d8cc76b514bc870fd1c042f16" }
640-
pet-conda = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "d5b5bb0c4558a51d8cc76b514bc870fd1c042f16" }
641-
pet-core = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "d5b5bb0c4558a51d8cc76b514bc870fd1c042f16" }
642-
pet-fs = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "d5b5bb0c4558a51d8cc76b514bc870fd1c042f16" }
643-
pet-poetry = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "d5b5bb0c4558a51d8cc76b514bc870fd1c042f16" }
644-
pet-reporter = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "d5b5bb0c4558a51d8cc76b514bc870fd1c042f16" }
645-
pet-virtualenv = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "d5b5bb0c4558a51d8cc76b514bc870fd1c042f16" }
639+
pet = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "9e61a22af989fe54937bf07c9f9cff1bc53d9056" }
640+
pet-conda = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "9e61a22af989fe54937bf07c9f9cff1bc53d9056" }
641+
pet-core = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "9e61a22af989fe54937bf07c9f9cff1bc53d9056" }
642+
pet-fs = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "9e61a22af989fe54937bf07c9f9cff1bc53d9056" }
643+
pet-poetry = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "9e61a22af989fe54937bf07c9f9cff1bc53d9056" }
644+
pet-reporter = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "9e61a22af989fe54937bf07c9f9cff1bc53d9056" }
645+
pet-virtualenv = { git = "https://github.com/microsoft/python-environment-tools.git", rev = "9e61a22af989fe54937bf07c9f9cff1bc53d9056" }
646646
portable-pty = "0.9.0"
647647
postage = { version = "0.5", features = ["futures-traits"] }
648648
pretty_assertions = { version = "1.3.0", features = ["unstable"] }

crates/languages/src/python.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,7 @@ fn python_env_kind_display(k: &PythonEnvironmentKind) -> &'static str {
11011101
PythonEnvironmentKind::Venv => "venv",
11021102
PythonEnvironmentKind::VirtualEnv => "virtualenv",
11031103
PythonEnvironmentKind::VirtualEnvWrapper => "virtualenvwrapper",
1104+
PythonEnvironmentKind::WinPython => "WinPython",
11041105
PythonEnvironmentKind::WindowsStore => "global (Windows Store)",
11051106
PythonEnvironmentKind::WindowsRegistry => "global (Windows Registry)",
11061107
PythonEnvironmentKind::Uv => "uv",

0 commit comments

Comments
 (0)