Skip to content

Cannot add pytest-asyncio as dependency when using poetry #1168

@ashinkajay

Description

@ashinkajay

When pytest-asyncio is added as a dependency under pyproject.toml. The lock generation continues infinitely.

Steps to reproduce the issue:

Use below pyproject.toml

[tool.poetry]
name = "test_package"
version = "0.1.0"
description = ""
authors = [""]

[tool.poetry.dependencies]
python = "~3.10.16"

[tool.poetry.dev-dependencies]
pytest-asyncio = "*"

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

Generate lock with command: poetry lock -vvv

Output:

...
   1: selecting backports.asyncio.runner (1.2.0)
   1: selecting backports.asyncio.runner (1.2.0)
   1: selecting backports.asyncio.runner (1.2.0)
   1: selecting backports.asyncio.runner (1.2.0)
...

The lock generation happens infinitely printing: 1: selecting backports.asyncio.runner (1.2.0)

Suspected cause:

The issue might have started after adding this line in pyproject.toml
"backports-asyncio-runner>=1.1,<2; python_version<'3.11'",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions