Skip to content

Commit 84b1ff6

Browse files
brettcannonmiss-islington
authored andcommitted
bpo-38899: virtual environment activation for fish should use source (GH-17359)
The previously documented use of `.` is considered deprecated (https://fishshell.com/docs/current/commands.html#source). https://bugs.python.org/issue38899 Automerge-Triggered-By: @brettcannon
1 parent d68b592 commit 84b1ff6

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Doc/using/venv-create.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ directory containing the virtual environment):
104104
+=============+=================+=========================================+
105105
| POSIX | bash/zsh | $ source <venv>/bin/activate |
106106
+-------------+-----------------+-----------------------------------------+
107-
| | fish | $ . <venv>/bin/activate.fish |
107+
| | fish | $ source <venv>/bin/activate.fish |
108108
+-------------+-----------------+-----------------------------------------+
109109
| | csh/tcsh | $ source <venv>/bin/activate.csh |
110110
+-------------+-----------------+-----------------------------------------+

Lib/venv/scripts/posix/activate.fish

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# This file must be used with ". bin/activate.fish" *from fish* (http://fishshell.org);
2-
# you cannot run it directly.
1+
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
2+
# (http://fishshell.org); you cannot run it directly.
33

44
function deactivate -d "Exit virtualenv and return to normal shell environment"
55
# reset old environment variables
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Update documentation to state that to activate virtual environments under
2+
fish one should use `source`, not `.` as documented at
3+
https://fishshell.com/docs/current/commands.html#source.

0 commit comments

Comments
 (0)