Skip to content

gh-154399: Fix venv activate.csh in a non-interactive shell#154400

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:venv-csh-prompt-guard
Jul 22, 2026
Merged

gh-154399: Fix venv activate.csh in a non-interactive shell#154400
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:venv-csh-prompt-guard

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 21, 2026

Copy link
Copy Markdown
Member

activate.csh saved the prompt unconditionally, but prompt only exists in interactive shells, and csh fails on an undefined variable.

With csh the error is fatal, with tcsh it silently aborts sourcing, so the pydoc alias and rehash at the end of the script are skipped.

activate.csh saved the prompt unconditionally, but the prompt variable
only exists in interactive shells, and csh fails on an undefined
variable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 21, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 4448705 into python:main Jul 22, 2026
58 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@serhiy-storchaka
serhiy-storchaka deleted the venv-csh-prompt-guard branch July 22, 2026 04:05
@bedevere-app

bedevere-app Bot commented Jul 22, 2026

Copy link
Copy Markdown

GH-154408 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 22, 2026
@bedevere-app

bedevere-app Bot commented Jul 22, 2026

Copy link
Copy Markdown

GH-154409 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 22, 2026
@bedevere-app

bedevere-app Bot commented Jul 22, 2026

Copy link
Copy Markdown

GH-154410 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 22, 2026
serhiy-storchaka added a commit that referenced this pull request Jul 22, 2026
…H-154400) (GH-154410)

activate.csh saved the prompt unconditionally, but the prompt variable
only exists in interactive shells, and csh fails on an undefined
variable.
(cherry picked from commit 4448705)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 22, 2026
…H-154400) (GH-154408)

activate.csh saved the prompt unconditionally, but the prompt variable
only exists in interactive shells, and csh fails on an undefined
variable.
(cherry picked from commit 4448705)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant