Skip to content

Fall back when Python environments API is incomplete - #81

Draft
sama Pyb (Pybsama) wants to merge 1 commit into
microsoft:mainfrom
Pybsama:codex/fallback-incomplete-python-environments-api
Draft

Fall back when Python environments API is incomplete#81
sama Pyb (Pybsama) wants to merge 1 commit into
microsoft:mainfrom
Pybsama:codex/fallback-incomplete-python-environments-api

Conversation

@Pybsama

Copy link
Copy Markdown

Summary

  • validate the preferred Python Environments API's required runtime capabilities before wrapping or caching it
  • fall back to the legacy Python Extension API when the preferred API returns undefined or incomplete exports
  • keep onDidChangePackages optional and provide a no-op disposable when that non-critical event is unavailable

Context

When the Python Environments integration is disabled, the installed extension can return undefined exports without throwing. The shared provider previously cached that result and later failed while subscribing to environment/package events instead of trying its existing legacy fallback.

This change belongs in the shared package consumed by Pylint and the other VS Code Python tool extensions. It does not bump the package version or update downstream submodules; the existing release workflow owns those steps after merge.

Addresses microsoft/vscode-pylint#856.

Testing

  • TypeScript test suite: 134 passing
  • TypeScript build
  • ESLint
  • Python test suite: 333 passing on Python 3.10
  • Python flake8, Black, and isort checks
  • version consistency validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant