Skip to content

Installed package detection in requirement.txt #21289

Closed
@karthiknadig

Description

@karthiknadig

Refs: #21140

Complexity: 2

Create Issue


Requirements

  1. Python 3.7 or greater
  2. Latest python extension pre-release.

Verification steps:

  1. Ensure you have python and python extension installed.
  2. Make sure python extension is activated (open python file)
  3. Create requirements.txt with following content:
flake8
flake8-docstrings; os_name != 'nt'
httpx

Things to check:

  1. For os specific case you should see the create env button only if the dependency that applies to your os (as in the constraint passes). More environment markers here (https://peps.python.org/pep-0508/#environment-markers)
  2. If there are no dependencies or if all packages are installed then Create Environment button should go away.
  3. You should be able to see some hint squiggle for cases where the package is missing.

Note: we don't trigger on file system events to detect package installs at this point. So you will need to close and reopen the file for this.
Note 2: We don't validate versions at this point. We only detect if a package is installed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions