Skip to content

Update PythonExecutionService to support "conda run". #7696

Description

This will involve the following:

  • change PythonExecutionService.pythonPath (a string) to PythonExecutionService.pyArgv (an array of strings)
  • update PythonExecutionService.create() to pass an array of strings to PythonExecutionService()
  • update PythonExecutionService.createActivatedEnvironment() to pass an array of strings to PythonExecutionService()
  • verify that the usage in the various places works properly for conda and non-conda:
    • formatting
      • src/client/formatters/baseFormatter.ts (via PythonToolExecutionService)
    • linting
      • src/client/linters/errorHandlers/notInstalled.ts
      • src/client/linters/baseLinter.ts (via PythonToolExecutionService)
    • testing
      • src/client/testing/common/services/discovery.ts
      • src/client/testing/common/runner.ts
      • src/client/testing/common/runner.ts (via PythonToolExecutionService)
    • installers
      • src/client/common/installer/pipInstaller.ts
      • src/client/common/installer/productInstaller.ts
    • debugger
      • src/client/debugger/extension/adapter/factory.ts
    • interpreter discovery
      • src/client/interpreter/locators/services/workspaceVirtualEnvWatcherService.ts
      • src/client/interpreter/configuration/pythonPathUpdaterService.ts
      • src/client/interpreter/helpers.ts
      • src/client/interpreter/interpreterService.ts
      • src/client/interpreter/locators/services/windowsStoreInterpreter.ts
    • import sorting
      • src/client/providers/importSortProvider.ts
    • jedi
      • src/client/providers/jediProxy.ts
    • refactoring
      • src/client/refactor/proxy.ts

Activity

  1. kimadeline commented on Oct 23, 2019

    @kimadeline

    Make sure conda run works with both named environment and non-named environment (where we have to use the path)

  2. kimadeline commented on Nov 25, 2019

    @kimadeline

    To validate:

    • workspace with a named conda environment (conda create --name yourenv or conda create -n yourenv)
      • extension loads
      • extension selects the workspace correctly
      • formatting should be executed using conda run
      • linting should be executed using conda run
      • run in terminal should be executed using conda run
      • test discovery using pytest should be executed using conda run
    • workspace with a prefixed conda environment (conda create --prefix path/to/env)
      • extension loads
      • extension selects the workspace correctly
      • formatting should be executed using conda run
      • linting should be executed using conda run
      • run in terminal should be executed using conda run
      • test discovery using pytest should be executed using conda run
  3. karrtikr commented on Nov 25, 2019

    @karrtikr

    validated

  4. karrtikr commented on Nov 25, 2019

    @karrtikr

    Found an unrelated issue while validating it. #8783

  5. locked as resolved and limited conversation to collaborators on Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-environmentsFeatures relating to handling interpreter environmentsdebtCode quality issues

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions