Skip to content

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

Closed as not planned

Description

@jaklan
  • 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

Activity

  1. added
    kind/bugSomething isn't working as expected
    status/triageThis issue needs to be triaged
    on Dec 11, 2021
  2. blthayer commented on Mar 16, 2022

    @blthayer

    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
  3. huonw commented on Mar 21, 2022

    @huonw

    This seems to be the same as #3085.

  4. neersighted commented on Nov 8, 2022

    @neersighted
    Member

    Resolved in #6843, duplicate #3085.

  5. added and removed
    kind/bugSomething isn't working as expected
    on Nov 8, 2022
  6. github-actions commented on Mar 1, 2024

    @github-actions

    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.

  7. locked as resolved and limited conversation to collaborators on Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions