https://github.com/python/cpython/commit/476b649728201e78c38cc165c2fba841e392cf82
commit: 476b649728201e78c38cc165c2fba841e392cf82
branch: main
author: LuNoX <[email protected]>
committer: vsajip <[email protected]>
date: 2026-06-22T05:21:00+01:00
summary:

gh-151042: venv: Pass VIRTUAL_ENV through cygpath inside fish on Windows 
(GH-151043)

files:
A Misc/NEWS.d/next/Library/2026-06-07-13-47-05.gh-issue-151042.NMdzF2.rst
M Lib/venv/scripts/common/activate.fish

diff --git a/Lib/venv/scripts/common/activate.fish 
b/Lib/venv/scripts/common/activate.fish
index 284a7469c99b576..e8225f6db5b5657 100644
--- a/Lib/venv/scripts/common/activate.fish
+++ b/Lib/venv/scripts/common/activate.fish
@@ -34,6 +34,9 @@ end
 deactivate nondestructive
 
 set -gx VIRTUAL_ENV __VENV_DIR__
+if string match -qr 'CYGWIN|MSYS|MINGW' (uname)
+    set -gx VIRTUAL_ENV (cygpath -u $VIRTUAL_ENV)
+end
 
 set -gx _OLD_VIRTUAL_PATH $PATH
 set -gx PATH "$VIRTUAL_ENV/"__VENV_BIN_NAME__ $PATH
diff --git 
a/Misc/NEWS.d/next/Library/2026-06-07-13-47-05.gh-issue-151042.NMdzF2.rst 
b/Misc/NEWS.d/next/Library/2026-06-07-13-47-05.gh-issue-151042.NMdzF2.rst
new file mode 100644
index 000000000000000..a24a15c0cc267f5
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2026-06-07-13-47-05.gh-issue-151042.NMdzF2.rst
@@ -0,0 +1 @@
+Fixed venv exporting mixed path styles to PATH on Windows inside fish (via 
Cygwin, MinGW or MSYS2)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to