Skip to content

Conversation

dukecat0
Copy link
Member

@dukecat0 dukecat0 commented Sep 29, 2025

…inned package

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Summary of changes

pipx reinstall: An exception will now be raised if package is pinned.
Fixes #1611

Test plan

Tested by running

pipx install black
pipx pin black
pipx reinstall black
pipx unpin black
pipx reinstall black

@dukecat0 dukecat0 force-pushed the reinstall-unpin branch 3 times, most recently from d31bf1c to f00699d Compare October 6, 2025 04:31
@dukecat0 dukecat0 requested review from Gitznik and huxuan October 6, 2025 04:32
@Gitznik
Copy link
Contributor

Gitznik commented Oct 7, 2025

The code looks fine to me. I'm not 100% sure we need the --unpin flag though, IMO raising an error should be enough. The user can already achieve this behavior via pipx unpin packagex && pipx reinstall packagex. pipx unpin does not error if the package is not pinned.

@dukecat0
Copy link
Member Author

dukecat0 commented Oct 8, 2025

Sounds reasonable, let's make it simple here. :)

@dukecat0 dukecat0 changed the title feat: add --unpin option to reinstall command to allow reinstalling p… feat(reinstall): An exception will now be raised if package is pinned Oct 8, 2025
@dukecat0 dukecat0 changed the title feat(reinstall): An exception will now be raised if package is pinned pipx reinstall: An exception will now be raised if package is pinned Oct 8, 2025
Copy link
Contributor

@Gitznik Gitznik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👍

@dukecat0 dukecat0 enabled auto-merge (squash) October 10, 2025 06:53
@dukecat0 dukecat0 merged commit 255a83f into pypa:main Oct 10, 2025
11 of 20 checks passed
@dukecat0 dukecat0 deleted the reinstall-unpin branch October 11, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"pipx reinstall" clears pinned state ("pipx pin") for packages/dependencies

2 participants