Skip to content
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

pythonTerminalEnvVarActivation should reproduce python-dotenv comments behaviour #23012

Closed
zachary-povey opened this issue Mar 1, 2024 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team

Comments

@zachary-povey
Copy link

Hey, one thing I've noticed is that inline comments, by which i mean something like:

key=value # this is an inline comment

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

@zachary-povey zachary-povey added the feature-request Request for new features or functionality label Mar 1, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 1, 2024
@karrtikr
Copy link

karrtikr commented Mar 4, 2024

Closing in favor of #18307.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants