Skip to content

poery lock --no-update drops required locked packages #5434

@radoering

Description

@radoering
  • 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: any
  • Poetry version: 1.2.0b1
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

Given the following pyproject.toml from #5141

[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = ["Glenn Matthews <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.6"
celery = [
    {version = "~5.1.0", python = "<3.7"},
    {version = "~5.2.0", python = ">=3.7"},
]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

when running poetry lock and afterwards poetry lock --no-update, some required packages are dropped from the lock file.
For example click-didyoumean 0.0.3 is dropped although required for python 3.6.0, because the other entry for click-didyoumean (0.3.0) requires python_version >=3.6.2.

This issue also impacts exporting a requirements.txt via poetry-plugin-export.

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