Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ def is_python(path) -> bool:
if filename.find(name) != -1:
return True

if path == sys.executable:
return True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning · Non-blocking recommendation

Raw equality accepts only the literal sys.executable spelling, so the same executable invoked through a symlink, relative path, or Windows case variation is still not recognized. Define whether this is intentionally an exact-path contract; if executable identity is intended, use a platform-aware path-equivalence check and cover alternate spellings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning · Non-blocking recommendation

Add a focused regression test that mocks an executable basename without python, jython, or pypy and verifies that is_python() recognizes it through sys.executable. The test should also establish the intended path-equivalence behavior.


return False


Expand Down
Loading