[Python-checkins] bpo-38899: virtual environment activation for fish should use `source` (GH-17359)

Miss Islington (bot) webhook-mailer at python.org
Sat Nov 23 02:32:39 EST 2019


https://github.com/python/cpython/commit/84b1ff65609c5910b4f838adbe1ead83baae7dbf
commit: 84b1ff65609c5910b4f838adbe1ead83baae7dbf
branch: master
author: Brett Cannon <54418+brettcannon at users.noreply.github.com>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2019-11-22T23:32:27-08:00
summary:

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

files:
A Misc/NEWS.d/next/Documentation/2019-11-22-15-57-29.bpo-38899.4aYPW2.rst
M Doc/using/venv-create.inc
M Lib/venv/scripts/posix/activate.fish

diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc
index cf5af437d6aee..6c6617dc158f7 100644
--- a/Doc/using/venv-create.inc
+++ b/Doc/using/venv-create.inc
@@ -104,7 +104,7 @@ directory containing the virtual environment):
 +=============+=================+=========================================+
 | POSIX       | bash/zsh        | $ source <venv>/bin/activate            |
 +-------------+-----------------+-----------------------------------------+
-|             | fish            | $ . <venv>/bin/activate.fish            |
+|             | fish            | $ source <venv>/bin/activate.fish       |
 +-------------+-----------------+-----------------------------------------+
 |             | csh/tcsh        | $ source <venv>/bin/activate.csh        |
 +-------------+-----------------+-----------------------------------------+
diff --git a/Lib/venv/scripts/posix/activate.fish b/Lib/venv/scripts/posix/activate.fish
index 777d51cb69b0c..d213b9060a687 100644
--- a/Lib/venv/scripts/posix/activate.fish
+++ b/Lib/venv/scripts/posix/activate.fish
@@ -1,5 +1,5 @@
-# This file must be used with ". bin/activate.fish" *from fish* (http://fishshell.org);
-# you cannot run it directly.
+# This file must be used with "source <venv>/bin/activate.fish" *from fish*
+# (http://fishshell.org); you cannot run it directly.
 
 function deactivate  -d "Exit virtualenv and return to normal shell environment"
     # reset old environment variables
diff --git a/Misc/NEWS.d/next/Documentation/2019-11-22-15-57-29.bpo-38899.4aYPW2.rst b/Misc/NEWS.d/next/Documentation/2019-11-22-15-57-29.bpo-38899.4aYPW2.rst
new file mode 100644
index 0000000000000..4ee178bfb1b3a
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2019-11-22-15-57-29.bpo-38899.4aYPW2.rst
@@ -0,0 +1,3 @@
+Update documentation to state that to activate virtual environments under
+fish one should use `source`, not `.` as documented at
+https://fishshell.com/docs/current/commands.html#source.



More information about the Python-checkins mailing list