Skip to content

autonotebook: re-enable VSCode#1309

Merged
casperdcl merged 1 commit intotqdm:develfrom
aldanor:patch-1
Apr 3, 2022
Merged

autonotebook: re-enable VSCode#1309
casperdcl merged 1 commit intotqdm:develfrom
aldanor:patch-1

Conversation

@aldanor
Copy link
Copy Markdown
Contributor

@aldanor aldanor commented Mar 16, 2022

There's no reason to block autonotebook in vscode anymore since vscode-jupyter supports ipywidgets just fine (for almost a year now?).

Closes #1213

@aldanor aldanor requested a review from casperdcl as a code owner March 16, 2022 22:55
@aldanor
Copy link
Copy Markdown
Contributor Author

aldanor commented Mar 16, 2022

@casperdcl this is a trivial fix but would sure be a quality-of-life update for us vscode users ^

@casperdcl casperdcl self-assigned this Mar 26, 2022
@casperdcl casperdcl added to-merge ↰ Imminent c1-quick 🕐 Complexity low labels Mar 26, 2022
Copy link
Copy Markdown
Member

@casperdcl casperdcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gordonwatts @aldanor sorry for the delay

Comment thread tqdm/autonotebook.py
Comment on lines -17 to -18
if 'VSCODE_PID' in os.environ: # pragma: no cover
raise ImportError("vscode")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know which vscode version exactly this PR applies to? Is there a safer fix like:

Suggested change
if 'VSCODE_PID' in os.environ: # pragma: no cover
raise ImportError("vscode")
if os.environ.get('some_vscode_version_variable) <= '1337': # pragma: no cover
raise ImportError("vscode")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid I do not know what version it applies to. Nor do I have any experience in knowing how to get the VS code version from the env!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok will include as-is, thanks!

We'll see if anyone complains/suggests a fix later :)

@casperdcl casperdcl changed the base branch from master to devel April 3, 2022 21:56
@casperdcl casperdcl changed the title Allow vscode in autonotebook autonotebook: re-enable VSCode Apr 3, 2022
@casperdcl casperdcl merged commit 9f0ffe6 into tqdm:devel Apr 3, 2022
@casperdcl casperdcl mentioned this pull request Apr 3, 2022
@aldanor aldanor deleted the patch-1 branch July 7, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c1-quick 🕐 Complexity low to-merge ↰ Imminent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code now support ipywidgets

3 participants