Skip to content

fix(python): use version-specific pip URL for older Python versions#119

Merged
CalvinAllen merged 2 commits intomainfrom
fix/113-pip-older-python
Dec 12, 2025
Merged

fix(python): use version-specific pip URL for older Python versions#119
CalvinAllen merged 2 commits intomainfrom
fix/113-pip-older-python

Conversation

@CalvinAllen
Copy link
Contributor

Summary

  • Adds getPipURL() function to determine the correct get-pip.py URL based on Python version
  • Python 3.8 and below use version-specific URLs (e.g., https://bootstrap.pypa.io/pip/3.8/get-pip.py)
  • Python 3.9+ use the default URL (https://bootstrap.pypa.io/get-pip.py)
  • Fixes fallback instructions to not reference ensurepip (not available in Windows embeddable packages)

Changes

  • src/runtimes/python/provider.go: Added getPipURL() function and updated installPip() and installPipIfNeeded()
  • src/runtimes/python/provider_test.go: Added tests for URL selection logic

New fallback message

→ To install pip manually:
→   1. Download: https://bootstrap.pypa.io/pip/3.8/get-pip.py
→   2. Run: python get-pip.py

Test plan

  • All tests pass (including 8 new tests for getPipURL)
  • Lint passes

Fixes #113

The main get-pip.py no longer supports end-of-life Python versions.
For Python 3.8 and below, use version-specific URLs like:
https://bootstrap.pypa.io/pip/3.8/get-pip.py

Also fixes the fallback instructions to not reference ensurepip, which
is not available in Windows embeddable Python packages.

Fixes #113
@CalvinAllen CalvinAllen merged commit 50cdacd into main Dec 12, 2025
12 checks passed
@CalvinAllen CalvinAllen deleted the fix/113-pip-older-python branch December 12, 2025 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

pip installation fails for older Python versions (3.8, 3.7)

1 participant