Commit 1b71b71
feat(upgrade-all): skip pip/pipx when uv is managing Python packages
Added detection to avoid redundant pip/pipx upgrades when UV is present,
since UV is designed to replace both tools.
Rationale:
- UV is a modern, faster replacement for pip and pipx
- Running pip/pipx upgrades alongside UV is redundant
- UV handles both package installation (pip) and tool management (pipx)
- Reduces upgrade time and eliminates conflicting package managers
Changes:
Stage 2 (Package Managers):
- pip: Skip with "pip (uv is managing Python packages)"
- pipx: Skip with "pipx (uv is managing Python tools)"
Stage 4 (User Packages):
- pipx packages: Skip with "pipx packages (uv tools handle this)"
Detection logic:
if command -v uv >/dev/null 2>&1; then
log_skip "pip (uv is managing Python packages)"
fi
When UV is NOT present:
- pip/pipx upgrade normally as before
- No behavior change for systems without UV
When UV IS present:
Stage 2:
⏭ pip (uv is managing Python packages)
✓ uv (0.5.11 at /home/user/.local/bin/uv)
⏭ pipx (uv is managing Python tools)
Stage 4:
✓ uv tool: ansible
✓ uv tool: black
...
⏭ pipx packages (uv tools handle this)
Benefits:
- Prevents package manager conflicts
- Reduces upgrade time when UV is present
- Clear messaging about which tool is managing Python packages
- Encourages modern tooling adoption
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>1 parent cceed18 commit 1b71b71
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
201 | 204 | | |
202 | | - | |
| 205 | + | |
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
| |||
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
240 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
241 | 247 | | |
242 | 248 | | |
243 | 249 | | |
| |||
556 | 562 | | |
557 | 563 | | |
558 | 564 | | |
559 | | - | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
560 | 569 | | |
561 | 570 | | |
562 | 571 | | |
| |||
0 commit comments