Skip to content

Debugger fails to launch in Python3.7 environment on v2024.12.0: cannot import name 'Literal' from 'typing' #489

@vasan-agrostar

Description

@vasan-agrostar

Operating system: MacOS Sonoma 14.6.1
VS Code:
Version: 1.94.2
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z (1 wk ago)
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0

After upgrading the VS code extension to v2024.12.0, the debugger fails to launch in my Python 3.7 environment.

The following relevant extensions are installed in my virtual env, but I don't think they matter, as seems to be loading it from the global environment.

typing==3.7.4
typing-extensions==3.7.4

The error I get is:

...
File "/Users/vasan.subramanian/.vscode/extensions/ms-python.debugpy-2024.12.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_plugin_utils.py", line 4, in <module>
    from typing import Tuple, Literal
ImportError: cannot import name 'Literal' from 'typing' (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py

I had to revert to debugpy v2024.10.0 to be able to debug my programs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions