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

poetry update doesn't respect the change of "develop" attribute #4884

Closed
3 tasks done
jaklan opened this issue Dec 11, 2021 · 4 comments
Closed
3 tasks done

poetry update doesn't respect the change of "develop" attribute #4884

jaklan opened this issue Dec 11, 2021 · 4 comments
Labels
status/duplicate Duplicate issues

Comments

@jaklan
Copy link

jaklan commented Dec 11, 2021

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: macOS Big Sur 11.6
  • Poetry version: 1.1.12

Issue

When I change the develop attribute of a dependency (from false to true or vice versa) and run poetry update, the change is not respected - I get the following message:

No dependencies to install or update

Removing only poetry.lock also doesn't help - I have to uninstall the package. But I can't do it with poetry remove, because... there's no CLI flag for poetry add to specify the proper value of develop attribute when adding it back. I have to modify the file manually after that, but then package... is already installed, so we get stuck in the loop.

The solution is to run pip uninstall some_package, modify manually the pyproject.toml to change the develop value and then run poetry install.

[tool.poetry.dependencies]
python = "^3.8"
"some_package" = {path = "../some_package"}

⬇️

[tool.poetry.dependencies]
python = "^3.8"
"some_package" = {path = "../some_package", develop = true}

I see 2 issues here:

  1. the one from the title
  2. l̶a̶c̶k̶ ̶o̶f̶ ̶̶d̶e̶v̶e̶l̶o̶p̶̶ ̶o̶p̶t̶i̶o̶n̶ ̶f̶o̶r̶ ̶̶p̶o̶e̶t̶r̶y̶ ̶a̶d̶d̶̶ - seems to be resolved in 1.2.0
@jaklan jaklan added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 11, 2021
@blthayer
Copy link

Following on to @jaklan 's workaround (thank you!) for future readers: you may want to preface pip uninstall some_package with poetry run.

To summarize the workaround:

  1. poetry run pip uninstall some_package
  2. Manually modify pyproject.toml
  3. poetry install

@huonw
Copy link

huonw commented Mar 21, 2022

This seems to be the same as #3085.

@neersighted neersighted removed the status/triage This issue needs to be triaged label Nov 8, 2022
@neersighted
Copy link
Member

Resolved in #6843, duplicate #3085.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2022
@neersighted neersighted added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected labels Nov 8, 2022
Copy link

github-actions bot commented Mar 1, 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 Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

4 participants