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

remove usage is unclear #9041

Closed
cgalo5758 opened this issue Feb 26, 2024 · 5 comments
Closed

remove usage is unclear #9041

cgalo5758 opened this issue Feb 26, 2024 · 5 comments
Labels
area/docs Documentation issues/improvements

Comments

@cgalo5758
Copy link

cgalo5758 commented Feb 26, 2024

Issue Kind

Unclear documentation

Existing Link

https://python-poetry.org/docs/cli/#remove

Description

It is not entirely clear what remove does and it would be helpful to be more explicit about the action that remove performs. From the current documentation, while it does mention that "The remove command removes a package from the current list of installed packages." It should explicitly add that it doesn't actually uninstall packages.

I imagine this would prevent some confusion around issues such as #648 and #468.

Additionally, I am not noticing any difference between the actions performed using remove with or without --lock. They update both pyproject.toml and poetry.lock. If there are side effects of remove, it'd also be nice to know what those are (Like why does remove update and resolve dependencies? Why does "Package operations" without --lock say "0 removals" despite the packages being removed?)

@cgalo5758 cgalo5758 added area/docs Documentation issues/improvements status/triage This issue needs to be triaged labels Feb 26, 2024
@dimbleby
Copy link
Contributor

It should explicitly add that it doesn't actually uninstall packages

But it does. I don't know whether this makes you more right or more wrong!

Anyway, if you want docs improvements the way to do it is to submit a pull request with the change you want to see. It doesn't have to be perfect first time, folk will review before merging.

@cgalo5758
Copy link
Author

But it does.

Oh yeah. you are right... I just tried it. Okay, I still think this documentation on remove should be edited. My assumption, based on it as it currently is, is that it only removes them from poetry.lock and pyproject.toml.

I can open up a pull request and:

  • write in that it does uninstall packages.
  • removes them from poetry.lock and pyproject.toml.

What I am still not sure about is why using the "--lock" flag edits both poetry.lock and pyproject.toml (it literally says "Do not perform operations (only update the lockfile)"). Is this a bug that I should open another issue for or is the documentation not clear?

Also, what are the "operations" that the documentation refers to?

@dimbleby
Copy link
Contributor

'--lock` does make it "not actually uninstall packages" ie it just updates the lock file

@abn
Copy link
Member

abn commented Mar 5, 2024

Also, what are the "operations" that the documentation refers to?

In this context, an operation is an action poetry takes for the project - install, uninstall, skip (no action). Feel free to raise a documentation change when you are ready. Specifics can be discussed there.

Closing this for now as I believe your questions have been answered. Feel free to start a discussion on GitHub and/or on Discord to discuss further or if you need help around how to make the changes.

@abn abn closed this as completed Mar 5, 2024
@abn abn removed the status/triage This issue needs to be triaged label Mar 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

No branches or pull requests

3 participants