Skip to content

1.0b4 performs unnecessary installs of packages found in a custom repository #1562

@dimbleby

Description

@dimbleby
  • 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).

Issue

If I use a custom repository, as in:

[[tool.poetry.source]]
name = "custom"
url = "https://example.com/api/pypi/pypi-virtual/simple"

then any packages installed from that repository are redundantly re-installed at poetry update.

I believe the reason is that:

  • the desired package source type is marked as 'legacy' in poetry.lock:
[package.source]
reference = "custom"
type = "legacy"
url = "https://example.com/api/pypi/pypi-virtual/simple"
  • but the found package source type is left empty, here
  • so this code decides that an update is needed

cf this comment. On the plus side, I think that bf2d515 has probably fixed #1240; but it has introduced at least this case where we make unnecessary updates (and maybe others too?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions