Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add upgrade-shared command #1316

Merged
merged 21 commits into from
Apr 28, 2024
Merged

feat: add upgrade-shared command #1316

merged 21 commits into from
Apr 28, 2024

Conversation

mayeut
Copy link
Member

@mayeut mayeut commented Apr 1, 2024

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

Summary of changes

Add upgrade-shared command

This allows to create/upgrade shared libraries as a standalone command.

It might be useful to initialize shared libraries with a pinned version of pip in order to create e.g. reproducible docker images using a constraint file.

It also allows for different --pip-args that one would get with the install command.

Test plan

Tested in tests/test_upgrade_shared.py

@chrysle
Copy link
Contributor

chrysle commented Apr 1, 2024

Thank you for doing this! Could you extend our documentation at how-pipx-works.md, stating clearly how the shared libs can be upgraded?

@mayeut
Copy link
Member Author

mayeut commented Apr 6, 2024

@chrysle, I'm not sure what to add to how-pipx-works.md. I added an example though.

@chrysle
Copy link
Contributor

chrysle commented Apr 8, 2024

I'm not sure what to add to how-pipx-works.md.

I thought of adding something like "This [shared lib] can later on be managed with the upgrade-shared command" at the bullet point introducing the shared libs concept. Might be unnecessary.

I added an example though.

Looks good, thanks! We somehow ignored it for a while, but there is a certain scripts/gen_doc_pages.py script that takes care of filling the template for our command line documentation (https://pipx.pypa.io/stable/docs/). Could you amend that? And, please split the commit updating the test packages into another PR, since it feels unrelated.

This allows to create/upgrade shared libraries as a standalone command.

It might be useful to initialize shared libraries with a pinned version of pip in order to create e.g. reproducible docker images using a constraint file.
@mayeut
Copy link
Member Author

mayeut commented Apr 13, 2024

Could you amend that?

Done

And, please split the commit updating the test packages into another PR, since it feels unrelated.

It's related but I limited the update to what's necessary only (pip).

@mayeut mayeut marked this pull request as ready for review April 13, 2024 06:45
changelog.d/1316.feature.md Show resolved Hide resolved
docs/examples.md Show resolved Hide resolved
docs/examples.md Outdated Show resolved Hide resolved
src/pipx/commands/upgrade.py Outdated Show resolved Hide resolved
tests/test_upgrade_shared.py Outdated Show resolved Hide resolved
tests/test_upgrade_shared.py Show resolved Hide resolved
tests/test_upgrade_shared.py Outdated Show resolved Hide resolved
tests/test_upgrade_shared.py Outdated Show resolved Hide resolved
tests/test_upgrade_shared.py Outdated Show resolved Hide resolved
@mayeut mayeut requested a review from chrysle April 21, 2024 08:58
@chrysle
Copy link
Contributor

chrysle commented Apr 22, 2024

I'm completely baffled by this. It can't be that quoted dependency specifiers containing spaces are disrespected on Windows only?

chrysle
chrysle previously approved these changes Apr 26, 2024
@mayeut
Copy link
Member Author

mayeut commented Apr 27, 2024

just fixed conflicts with the main branch

@chrysle chrysle enabled auto-merge (squash) April 28, 2024 06:42
@chrysle chrysle merged commit 7cce169 into pypa:main Apr 28, 2024
14 checks passed
@chrysle
Copy link
Contributor

chrysle commented Apr 28, 2024

Thanks, @mayeut!

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.

2 participants