-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Error in venv/scripts/common/activate
when $OSTYPE is not set
#112252
Labels
3.12
bugs and security fixes
3.13
bugs and security fixes
topic-venv
Related to the venv module
type-bug
An unexpected behavior, bug, or error
Comments
Eclips4
added
topic-venv
Related to the venv module
3.12
bugs and security fixes
3.13
bugs and security fixes
labels
Nov 19, 2023
vsajip
pushed a commit
that referenced
this issue
Nov 21, 2023
fornwall
added a commit
to fornwall/advent-of-code
that referenced
this issue
Dec 11, 2023
serhiy-storchaka
pushed a commit
that referenced
this issue
Dec 25, 2023
aisk
pushed a commit
to aisk/cpython
that referenced
this issue
Feb 11, 2024
Glyphack
pushed a commit
to Glyphack/cpython
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.12
bugs and security fixes
3.13
bugs and security fixes
topic-venv
Related to the venv module
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
When trying to use
. .venv/bin/activate
to activate a virtualenv from within aJustfile
the script exits with an error"sh: 42: .venv/bin/activate: OSTYPE: parameter not set"
.Failing Test on 3.12.0: https://github.com/jamesturk/venv-just-experiment/actions/runs/6917021149/job/18817722528
Successful on 3.11.6: https://github.com/jamesturk/venv-just-experiment/actions/runs/6917021149/job/18817722369
This only started happening on Python 3.12, and I confirmed is still happening on the main branch.
It seems a change to
Lib/venv/scripts/common/activate
is at issue here. I'll submit a matching PR.Due to the use of the variable without a default (unlike other variables in this script), running
activate
inside of a script withset -u/set -o nounset
will fail.CPython versions tested on:
3.12, CPython main branch
Operating systems tested on:
Linux, macOS
Linked PRs
The text was updated successfully, but these errors were encountered: