File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,21 +228,22 @@ Python 3.13 → Python 3.14 Better GC pauses, new heapq functions
228228
229229``` bash
230230# Test with newer version
231- pyenv install 3.12.0
232- pyenv shell 3.12.0
233- python -m pytest # Run tests
231+ uv python install 3.12
232+ uv run --python 3.12 pytest # Run tests
234233
235234# Check for deprecations
236- python -W all your_script.py
235+ uv run --python 3.12 python -W all your_script.py
237236```
238237
239238### Gradual Adoption
240239
241240``` bash
242- # Keep older version
243- pyenv install 3.11.0
244- pyenv local 3.11.0 # Use 3.11 for this project
245- pyenv global 3.12.0 # Use 3.12 everywhere else
241+ # Pin version for this project
242+ echo " 3.11" > .python-version
243+ uv sync # Installs Python 3.11 and dependencies
244+
245+ # Use different version for one-off commands
246+ uv run --python 3.12 python script.py
246247```
247248
248249## Related Documentation
You can’t perform that action at this time.
0 commit comments