From 84b1ff65609c5910b4f838adbe1ead83baae7dbf Mon Sep 17 00:00:00 2001 From: Brett Cannon <54418+brettcannon@users.noreply.github.com> Date: Fri, 22 Nov 2019 23:32:27 -0800 Subject: 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 --- Doc/using/venv-create.inc | 2 +- Lib/venv/scripts/posix/activate.fish | 4 ++-- .../next/Documentation/2019-11-22-15-57-29.bpo-38899.4aYPW2.rst | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Documentation/2019-11-22-15-57-29.bpo-38899.4aYPW2.rst diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc index cf5af43..6c6617d 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 /bin/activate | +-------------+-----------------+-----------------------------------------+ -| | fish | $ . /bin/activate.fish | +| | fish | $ source /bin/activate.fish | +-------------+-----------------+-----------------------------------------+ | | csh/tcsh | $ source /bin/activate.csh | +-------------+-----------------+-----------------------------------------+ diff --git a/Lib/venv/scripts/posix/activate.fish b/Lib/venv/scripts/posix/activate.fish index 777d51c..d213b90 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 /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 0000000..4ee178b --- /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. -- cgit v0.12