-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
venv bug: Function “_old_fish_prompt” does not exist when activating venv in child process #93858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please do, and thanks for the report. |
…tances (pythonGH-93931) (cherry picked from commit 1172172) Co-authored-by: Thomas B. Brunner <[email protected]>
…tances (pythonGH-93931) (cherry picked from commit 1172172) Co-authored-by: Thomas B. Brunner <[email protected]>
…stances (GH-93931) (GH-98402) Co-authored-by: Thomas B. Brunner <[email protected]>
…stances (GH-93931) (GH-98403) Co-authored-by: Thomas B. Brunner <[email protected]>
still seeing this in 2024 on
|
@banteg Which Python version are you using? Which system? Also, are you using venv or virtualenv to create your environment? |
can't replicate anymore, sorry for bothering |
I've have similar problem and my workaround is, deactivate > fish > source "desired/venv".
|
Bug report
Looked for similar issues and could not find any.
Steps to reproduce bug:
Should output:
functions: Function “_old_fish_prompt” does not exist
Cause
I think I've identified the reason for the bug:
activate.fish
are exported to child processes (script usesset -gx
to set the variables)._old_fish_prompt
is not exported to child processes.So, when we run fish from another fish session (such as in tmux), the variables set in
activate.fish
are present in the child process, but the functions are not.Fix
I've written a fix for this, which is to test if the
_old_fish_prompt
function exists before attempting to delete it. I can make a PR with this fix.Also, the implementation from virtualenv does not suffer from this bug. They check if the function exists before deleting it.
Your environment
Ubuntu 22.04 amd64
Python 3.10.4
Python and venv packages installed from apt
The text was updated successfully, but these errors were encountered: