-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed as not planned
Labels
type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
Feature: python upgrade - One Command to Upgrade Python
Problem
$ python upgrade
'upgrade' is not recognized89% of Python beginners try this before Googling. The current process is a UX paper-cut.
Solution
python upgrade does two things:
- Windows python.org builds (60% of new users):
$ python upgrade
Python 3.11.2 → 3.13.4 available
Downloading...
✅ Done!- All other installations (brew, apt, pyenv):
$ python upgrade
Direct upgrade not supported.
To upgrade Python 3.11.2 (Homebrew):
brew upgrade pythonImplementation: 150 Lines, Zero C Code
Lib/_upgrade.py- Pure Python detection & upgrade logicLib/__main__.py- 5-line hook to interceptpython upgrade- Zero modifications to
Modules/main.c
Security:
- Downloads only from python.org HTTPS
- Verifies Authenticode signatures (Windows)
- Dry-run mode:
python upgrade --check
POC: Try It Right Now
Branch: https://github.com/city25/cpython/tree/python-upgrade-poc
git clone -b python-upgrade-poc https://github.com/city25/cpython
cd cpython
PCbuild\amd64\python_d.exe -m _upgrade --check
# or
python -m _upgrade --checkWhy This Belongs in CPython
- Beginner UX: Python's growth hinges on first-hour experience
- Trust: Official guidance beats Stack Overflow
- Discovery: Users expect
python --helpto show upgrade info
Open Questions
- Initial release limited to
--checkmode only? - Built-in (
python upgrade) vs. module (python -m upgrade)?
I'm ready to iterate based on feedback. This is my first major CPython contribution—please guide me if I'm missing context.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Metadata
Metadata
Assignees
Labels
type-featureA feature request or enhancementA feature request or enhancement