Switch to directly invoke python-environments-ext api by eleanorjboyd · Pull Request #849 · microsoft/vscode-python-debugger
src/extension/envExtApi.ts
Added comprehensive API type definitions for the new Python Environments extension (1289 lines)
src/extension/common/python.ts
Refactored to support dual API paths with conditional logic based on useEnvExtension()
src/extension/common/legacyPython.ts
Extracted legacy Python extension API implementation from python.ts
src/extension/common/utilities.ts
Added useEnvExtension() function to determine which API to use at runtime
src/extension/debugger/adapter/factory.ts
Updated to use new PythonEnvironment type and added version parsing logic
src/extension/debugger/configuration/resolvers/base.ts
Enhanced to resolve interpreter from program file when appropriate
src/extension/debugger/configuration/debugConfigurationService.ts
Added interpreter resolution after variable substitution
src/extension/common/application/commands/reportIssueCommand.ts
Updated to handle both environment API return types
src/test/unittest/common/pythonTrue.unit.test.ts
New test suite for new environment extension path
src/test/unittest/common/pythonFalse.unit.test.ts
New test suite for legacy extension path
src/test/unittest/common/helpers.ts
Added buildPythonEnvironment() test helper function
src/test/unittest/adapter/factory.unit.test.ts
Updated tests to use new PythonEnvironment type
src/test/unittest/configuration/resolvers/launch.unit.test.ts
Updated to handle both API return types
src/test/unittest/common/application/commands/reportIssueCommand.unit.test.ts
Updated mock interpreter structure