Skip to content

python.terminal.activateEnvironment activates venv for non-python terminal #194244

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

Closed
david-waterworth opened this issue Sep 26, 2023 · 2 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@david-waterworth
Copy link

Type: Bug

VS Code visually makes a distinction between a Python and bash terminal (i.e. the former is shown as [>] Python, the later as bash with a cube icon).

But the behaviour appears to have changed and there's no longer any difference between them - the setting python.terminal.activateEnvironment=true results in vscode sourcing the default venv when I'm trying to create a bash terminal, and python.terminal.activateEnvironment=false prevents it sourcing the venv for a python terminal.

This appears to have changed recently, I could always create a python terminal that sourced the default venv and a bash terminal that did not. Now there's no choice - all terminals now behave the same, i.e. they either source a venv or not. It seems pointless to show different icons for two terminals that are both activated venvs (or not)

This is incredible annoying, I now have to fall back to manually managing venvs if I need to run scripts outside a sourced venv since I can no longer rely on a bash terminal being different to a Python terminal.

VS Code version: Code 1.82.2 (abd2f3d, 2023-09-14T05:51:20.981Z)
OS version: Linux x64 5.15.0-84-generic
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 x 3700)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 1, 1
Memory (System) 31.25GB (1.95GB free)
Process Argv --unity-launch --crash-reporter-id fe534736-e0aa-4f9a-9d8a-1ef5598d80d0
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Extensions (36)
Extension Author (truncated) Version
ruff cha 2023.38.0
doxdocgen csc 1.4.0
githistory don 0.6.20
gitlens eam 14.3.0
prettier-vscode esb 10.1.0
codespaces Git 1.15.4
copilot-chat Git 0.7.1
copilot-labs Git 0.15.1019
todo-tree Gru 0.0.226
language-cython guy 0.0.7
mypy mat 0.2.3
rainbow-csv mec 3.7.1
graphql mqu 0.1.2
pylint ms- 2023.6.0
python ms- 2023.16.0
vscode-pylance ms- 2023.9.20
jupyter ms- 2023.8.1002501831
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.8
vscode-jupyter-slideshow ms- 0.1.5
remote-containers ms- 0.309.0
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.81.4
remote-repositories ms- 0.38.1
remote-server ms- 1.4.3
test-adapter-converter ms- 0.1.8
gremlins nho 0.26.0
vscode-yaml red 1.14.0
rust-analyzer rus 0.3.1673
even-better-toml tam 0.19.2
grm-syntax the 1.0.0
sort-lines Tyr 1.10.2
vscode-lldb vad 1.10.0
vscode-icons vsc 12.5.0
local-history xyz 1.8.1

(2 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30792227
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
3biah626:30602489
89544117:30613380
showlangstatbar:30737416
0bi6i642:30841073
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
copilotsettingc:30839828
synctok:30821570
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30821571
pythonmhint1:30842940
dsvsc015:30845448

@gjsjohnmurray
Copy link
Contributor

/extPython

Please see microsoft/vscode-python#20562

@vscodenpa
Copy link

It looks like this is caused by the Python extension. Please file the issue to the Python extension repository. Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our issue reporting guidelines for more information.

Happy Coding!

@vscodenpa vscodenpa added the *caused-by-extension Issue identified to be caused by an extension label Sep 27, 2023
@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

4 participants