Skip to content

'extra' poetry dependencies are not checked #41

@yrro

Description

@yrro

I just noticed that convert_poetry_to_requirements works by running poetry export --with=dev and feeding the output to safety check.

When a project has 'extra' dependencies, they are not included in the output of poetry export --with-dev.

Here's a demonstration using https://github.com/yrro/hitron-exporter/:

$ poetry export --with=dev | grep '^[^ ]' | wc -l
30

$ poetry export --with=dev -E freeipa-vault -E container | grep '^[^ ]' | wc -l
48

Unfortunately poetry export dosn't have a way to include all extra dependencies; you probably have to parse pyproject.toml and construct the list of extras by looking for this part:

[tool.poetry.extras]
freeipa-vault = ["ipaclient", "ipapython"]
container = ["gunicorn", "setproctitle"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions