Skip to content

feature: Manage package versions from sidebar#1511

Open
edvilme wants to merge 44 commits into
mainfrom
vscode-python-environments-package-versions
Open

feature: Manage package versions from sidebar#1511
edvilme wants to merge 44 commits into
mainfrom
vscode-python-environments-package-versions

Conversation

@edvilme

@edvilme 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 edvilme marked this pull request as draft May 8, 2026 03:19
@edvilme

edvilme commented May 8, 2026

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 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.

@edvilme edvilme requested a review from Copilot May 11, 2026 20:57

This comment was marked as resolved.

This comment was marked as resolved.

@edvilme edvilme force-pushed the vscode-python-environments-package-versions branch 2 times, most recently from 05f44f3 to f47f4f3 Compare May 12, 2026 00:07
@edvilme edvilme marked this pull request as ready for review May 12, 2026 16:29
@edvilme edvilme requested a review from Copilot May 12, 2026 16:32

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

@eleanorjboyd eleanorjboyd left a comment

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
@edvilme edvilme force-pushed the vscode-python-environments-package-versions branch from 5bd59f5 to c9e5dea Compare May 20, 2026 17:01
@edvilme edvilme requested a review from Copilot May 20, 2026 22:55

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 edvilme changed the title feature: Manage package versions from sidebar [Draft] feature: Manage package versions from sidebar Jun 2, 2026
@edvilme edvilme force-pushed the vscode-python-environments-package-versions branch from 823a724 to 2bafb18 Compare June 2, 2026 20:45
edvilme and others added 4 commits June 16, 2026 09:49
…mport

- Replace semver.SemVer with Pep440Version in pythonApi.ts to match API interface
- Fix test import path: pipManager -> pipPackageManager
- Remove unused semver dependency

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@edvilme edvilme force-pushed the vscode-python-environments-package-versions branch from 4ab6678 to f1aa37c Compare June 16, 2026 16:50
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
Comment thread src/managers/builtin/pipPackageManager.ts Outdated
edvilme and others added 3 commits June 16, 2026 09:58
…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 edvilme changed the title [Draft] feature: Manage package versions from sidebar feature: Manage package versions from sidebar Jun 16, 2026
edvilme and others added 3 commits June 16, 2026 10:09
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
edvilme and others added 2 commits June 17, 2026 13:35
- 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 edvilme requested a review from eleanorjboyd June 18, 2026 18:58
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