Skip to content

Commit d0dce37

Browse files
Updated venv from Python 3.9.6 to Python 3.12
1 parent 79161c8 commit d0dce37

File tree

1,753 files changed

+66
-597353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,753 files changed

+66
-597353
lines changed

.venv/bin/Activate.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ function global:deactivate ([switch]$NonDestructive) {
9696
Remove-Item -Path env:VIRTUAL_ENV
9797
}
9898

99+
# Just remove VIRTUAL_ENV_PROMPT altogether.
100+
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
101+
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
102+
}
103+
99104
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
100105
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
101106
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
@@ -197,7 +202,7 @@ else {
197202
$Prompt = $pyvenvCfg['prompt'];
198203
}
199204
else {
200-
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virutal environment)"
205+
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
201206
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
202207
$Prompt = Split-Path -Path $venvDir -Leaf
203208
}
@@ -228,6 +233,7 @@ if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
228233
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
229234
_OLD_VIRTUAL_PROMPT
230235
}
236+
$env:VIRTUAL_ENV_PROMPT = $Prompt
231237
}
232238

233239
# Clear PYTHONHOME

.venv/bin/activate

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file must be used with "source bin/activate" *from bash*
2-
# you cannot run it directly
2+
# You cannot run it directly
33

44
deactivate () {
55
# reset old environment variables
@@ -14,12 +14,10 @@ deactivate () {
1414
unset _OLD_VIRTUAL_PYTHONHOME
1515
fi
1616

17-
# This should detect bash and zsh, which have a hash command that must
18-
# be called to get it to forget past commands. Without forgetting
19-
# past commands the $PATH changes we made may not be respected
20-
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
21-
hash -r 2> /dev/null
22-
fi
17+
# Call hash to forget past locations. Without forgetting
18+
# past locations the $PATH changes we made may not be respected.
19+
# See "man bash" for more details. hash is usually a builtin of your shell
20+
hash -r 2> /dev/null
2321

2422
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
2523
PS1="${_OLD_VIRTUAL_PS1:-}"
@@ -28,6 +26,7 @@ deactivate () {
2826
fi
2927

3028
unset VIRTUAL_ENV
29+
unset VIRTUAL_ENV_PROMPT
3130
if [ ! "${1:-}" = "nondestructive" ] ; then
3231
# Self destruct!
3332
unset -f deactivate
@@ -37,13 +36,27 @@ deactivate () {
3736
# unset irrelevant variables
3837
deactivate nondestructive
3938

40-
VIRTUAL_ENV="/Users/alexoh/Documents/GitHub/arrastools/.venv"
41-
export VIRTUAL_ENV
39+
# on Windows, a path can contain colons and backslashes and has to be converted:
40+
case "$(uname)" in
41+
CYGWIN*|MSYS*|MINGW*)
42+
# transform D:\path\to\venv to /d/path/to/venv on MSYS and MINGW
43+
# and to /cygdrive/d/path/to/venv on Cygwin
44+
VIRTUAL_ENV=$(cygpath /Users/alexoh/Documents/GitHub/arrastools/.venv)
45+
export VIRTUAL_ENV
46+
;;
47+
*)
48+
# use the path as-is
49+
export VIRTUAL_ENV=/Users/alexoh/Documents/GitHub/arrastools/.venv
50+
;;
51+
esac
4252

4353
_OLD_VIRTUAL_PATH="$PATH"
44-
PATH="$VIRTUAL_ENV/bin:$PATH"
54+
PATH="$VIRTUAL_ENV/"bin":$PATH"
4555
export PATH
4656

57+
VIRTUAL_ENV_PROMPT='(.venv) '
58+
export VIRTUAL_ENV_PROMPT
59+
4760
# unset PYTHONHOME if set
4861
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
4962
# could use `if (set -u; : $PYTHONHOME) ;` in bash
@@ -54,13 +67,10 @@ fi
5467

5568
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
5669
_OLD_VIRTUAL_PS1="${PS1:-}"
57-
PS1="(.venv) ${PS1:-}"
70+
PS1="("'(.venv) '") ${PS1:-}"
5871
export PS1
5972
fi
6073

61-
# This should detect bash and zsh, which have a hash command that must
62-
# be called to get it to forget past commands. Without forgetting
74+
# Call hash to forget past commands. Without forgetting
6375
# past commands the $PATH changes we made may not be respected
64-
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
65-
hash -r 2> /dev/null
66-
fi
76+
hash -r 2> /dev/null

.venv/bin/activate.csh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
# This file must be used with "source bin/activate.csh" *from csh*.
22
# You cannot run it directly.
3+
34
# Created by Davide Di Blasi <[email protected]>.
45
# Ported to Python 3.3 venv by Andrew Svetlov <[email protected]>
56

6-
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate'
7+
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
78

89
# Unset irrelevant variables.
910
deactivate nondestructive
1011

11-
setenv VIRTUAL_ENV "/Users/alexoh/Documents/GitHub/arrastools/.venv"
12+
setenv VIRTUAL_ENV /Users/alexoh/Documents/GitHub/arrastools/.venv
1213

1314
set _OLD_VIRTUAL_PATH="$PATH"
14-
setenv PATH "$VIRTUAL_ENV/bin:$PATH"
15+
setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
1516

1617

1718
set _OLD_VIRTUAL_PROMPT="$prompt"
1819

1920
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
20-
set prompt = "(.venv) $prompt"
21+
set prompt = '(.venv) '"$prompt"
22+
setenv VIRTUAL_ENV_PROMPT '(.venv) '
2123
endif
2224

2325
alias pydoc python -m pydoc

.venv/bin/activate.fish

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
2-
# (https://fishshell.com/); you cannot run it directly.
2+
# (https://fishshell.com/). You cannot run it directly.
33

44
function deactivate -d "Exit virtual environment and return to normal shell environment"
55
# reset old environment variables
@@ -13,13 +13,17 @@ function deactivate -d "Exit virtual environment and return to normal shell env
1313
end
1414

1515
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
16-
functions -e fish_prompt
1716
set -e _OLD_FISH_PROMPT_OVERRIDE
18-
functions -c _old_fish_prompt fish_prompt
19-
functions -e _old_fish_prompt
17+
# prevents error when using nested fish instances (Issue #93858)
18+
if functions -q _old_fish_prompt
19+
functions -e fish_prompt
20+
functions -c _old_fish_prompt fish_prompt
21+
functions -e _old_fish_prompt
22+
end
2023
end
2124

2225
set -e VIRTUAL_ENV
26+
set -e VIRTUAL_ENV_PROMPT
2327
if test "$argv[1]" != "nondestructive"
2428
# Self-destruct!
2529
functions -e deactivate
@@ -29,10 +33,10 @@ end
2933
# Unset irrelevant variables.
3034
deactivate nondestructive
3135

32-
set -gx VIRTUAL_ENV "/Users/alexoh/Documents/GitHub/arrastools/.venv"
36+
set -gx VIRTUAL_ENV /Users/alexoh/Documents/GitHub/arrastools/.venv
3337

3438
set -gx _OLD_VIRTUAL_PATH $PATH
35-
set -gx PATH "$VIRTUAL_ENV/bin" $PATH
39+
set -gx PATH "$VIRTUAL_ENV/"bin $PATH
3640

3741
# Unset PYTHONHOME if set.
3842
if set -q PYTHONHOME
@@ -52,7 +56,7 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
5256
set -l old_status $status
5357

5458
# Output the venv prompt; color taken from the blue of the Python logo.
55-
printf "%s%s%s" (set_color 4B8BBE) "(.venv) " (set_color normal)
59+
printf "%s%s%s" (set_color 4B8BBE) '(.venv) ' (set_color normal)
5660

5761
# Restore the return status of the previous command.
5862
echo "exit $old_status" | .
@@ -61,4 +65,5 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
6165
end
6266

6367
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
68+
set -gx VIRTUAL_ENV_PROMPT '(.venv) '
6469
end

.venv/bin/f2py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python3
1+
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python3.12
22
import sys
33
from numpy.f2py.f2py2e import main
44
if __name__ == '__main__':

.venv/bin/mss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python3
1+
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python3.12
22
import sys
33
from mss.__main__ import main
44
if __name__ == '__main__':

.venv/bin/numpy-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python3
1+
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python3.12
22
import sys
33
from numpy._configtool import main
44
if __name__ == '__main__':

.venv/bin/pip

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python
2-
# -*- coding: utf-8 -*-
3-
import re
1+
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python3.12
42
import sys
53
from pip._internal.cli.main import main
64
if __name__ == '__main__':
7-
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
5+
if sys.argv[0].endswith('.exe'):
6+
sys.argv[0] = sys.argv[0][:-4]
87
sys.exit(main())

.venv/bin/pip3

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python
2-
# -*- coding: utf-8 -*-
3-
import re
1+
#!/Users/alexoh/Documents/GitHub/arrastools/.venv/bin/python3.12
42
import sys
53
from pip._internal.cli.main import main
64
if __name__ == '__main__':
7-
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
5+
if sys.argv[0].endswith('.exe'):
6+
sys.argv[0] = sys.argv[0][:-4]
87
sys.exit(main())

.venv/bin/pip3.9

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)