Skip to content

feature: Manage package versions from sidebar - #1511

Merged
Eduardo Villalpando Mello (edvilme) merged 44 commits into
mainfrom
vscode-python-environments-package-versions
Jun 19, 2026
Merged

feature: Manage package versions from sidebar#1511
Eduardo Villalpando Mello (edvilme) merged 44 commits into
mainfrom
vscode-python-environments-package-versions

Conversation

@edvilme

@edvilme Eduardo Villalpando Mello (edvilme) commented May 8, 2026

Copy link
Copy Markdown
Contributor
image

Feature: Manage package versions from sidebar

This pull request adds a new "Manage Package Version" command to the Python Envs extension, allowing users to update the version of an installed package via the UI.

1. Select "Manage Package Version" in packages view.

  • Click on the new gear button next to each package to manage versions.
image image

2a. Select the desired version

For package managers that support it (conda, uv, pip >= 21.2.0), the extension fetches all available versions from the index and displays them in a picker.
image

2b. Type the desired version

If the package versions cannot be fetched, the extension prompts the user to type in the desired version
image

User is warned if input is not a correct version number.

image

Fixes #1368
Fixes #512

@edvilme
Eduardo Villalpando Mello (edvilme) marked this pull request as draft May 8, 2026 03:19
@edvilme

Copy link
Copy Markdown
Contributor Author

The end goal is to have a version picker list all the available versions package in the feed (may or may not be PyPI) which requires further design discusisons.

@edvilme Eduardo Villalpando Mello (edvilme) added the feature-request Request for new features or functionality label May 8, 2026
Comment thread src/managers/builtin/pipManager.ts Outdated

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 7 comments.

Files not reviewed (1)
  • api/package-lock.json: Language not supported

Comment thread src/api.ts Outdated
Comment thread src/api.ts Outdated
Comment thread src/features/envCommands.ts Outdated
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
Comment thread package.json
Comment thread api/src/main.ts
Comment thread api/src/main.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

super excited! just a few nits

Comment thread api/src/main.ts Outdated
Comment thread src/features/envCommands.ts Outdated
Comment thread src/managers/builtin/pipPackageManager.ts
Comment thread src/managers/builtin/pipPackageManager.ts Outdated

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • api/package-lock.json: Language not supported

Comment thread src/managers/builtin/pipPackageManager.ts
Comment thread src/features/envCommands.ts Outdated
Comment thread src/managers/builtin/pipManager.ts Outdated

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 15 out of 17 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • api/package-lock.json: Language not supported

Comment thread src/managers/conda/condaPackageManager.ts Outdated
Comment thread src/managers/builtin/pipManager.ts Outdated
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
@edvilme Eduardo Villalpando Mello (edvilme) changed the title feature: Manage package versions from sidebar [Draft] feature: Manage package versions from sidebar Jun 2, 2026
@edvilme
Eduardo Villalpando Mello (edvilme) force-pushed the vscode-python-environments-package-versions branch from 823a724 to 2bafb18 Compare June 2, 2026 20:45
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
…ssCaptureAll

- Remove fetchPackages method from PackageManager interface in src/api.ts,
  api/src/main.ts, and examples/sample1/src/api.ts
- Remove fetchPackages implementation from internal.api.ts
- Remove runProcessCaptureAll function and ProcessResult interface from helpers.ts
- Remove pip <= 20.3.4 fallback code path that used runProcessCaptureAll
- Clean up unused import in pipPackageManager.ts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Warn users that changing the version of a transitive dependency may cause
unexpected behavior in packages that depend on it, following the same
pattern used in handlePackageUninstall.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme Eduardo Villalpando Mello (edvilme) changed the title [Draft] feature: Manage package versions from sidebar feature: Manage package versions from sidebar Jun 16, 2026
Remove setPackages from PackageManager interface in src/api.ts,
api/src/main.ts, and examples/sample1/src/api.ts, and its wrapper
implementation in internal.api.ts. No managers implemented this method.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The function was only used by the pip <= 20.3.4 fallback code path
which was previously removed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 14 out of 17 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • api/package-lock.json: Generated file

Comment thread api/src/main.ts Outdated
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
- Guard against undefined from parse(environment.version) by extracting
  base_version into a variable and returning early if null, instead of
  using non-null assertion (!)
- Fix published API package: rename getAvailableVersions to
  getPackageAvailableVersions with correct parameter order
  (environment, packageName) to match internal PackageManager interface

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread src/api.ts
Comment thread vscode-profile-2026-06-11-14-40-56.cpuprofile Outdated
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
@edvilme
Eduardo Villalpando Mello (edvilme) merged commit f701500 into main Jun 19, 2026
84 checks passed
@edvilme
Eduardo Villalpando Mello (edvilme) deleted the vscode-python-environments-package-versions branch June 19, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-request Request for new features or functionality

Projects

None yet

3 participants