pythonTerminalEnvVarActivation should reproduce python-dotenv comments behaviour #23012
Labels
feature-request
Request for new features or functionality
triage-needed
Needs assignment to the proper sub-team
Hey, one thing I've noticed is that inline comments, by which i mean something like:
aren't supported by pythonTerminalEnvVarActivation. That's understandable as I'm not sure it's generally supported by the dotenv format, however the
python-dotenv
library does support these types of comments.For me this was really confusing as I automatically got opted into the the experiment without my knowledge when changing to a new machine and then suddenly my tests were no longer working and it wasn't clear why.
Suddenly, my env values were being piped through with the comments attached even though on a different machine with the same version of
python-dotenv
(1.0.0) they were coming through as expected. The reason was of course that the values were now coming from vscode when the terminal session was started, and python-dotenv doesn't override pre-existing env var values by default.I think this could also catch other people out so thought it was worth floating the idea that these types of comments are supported.
Version info:
vscode-python: v2024.3.10611008 (pre-release)
Version: 1.87.0 (Universal)
Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2
Date: 2024-02-27T23:42:56.944Z (2 days ago)
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.3.0
The text was updated successfully, but these errors were encountered: