Skip to content

--dev option not exporting dev dependencies #318

@fbdb

Description

@fbdb

The deprecated --dev option does not work as intended: when running with --dev, the dev dependencies are not being exported.

Running poetry export with or without the --dev option won't make a difference:

poetry export --dev --format=requirements.txt --output=requirements-dev.txt
poetry export --format=requirements.txt --output=requirements.txt
diff requirements.txt  # no output

Steps to reproduce:

  1. Create a pyproject.toml file with dev dependencies
  2. Run poetry export --dev --format --requirements.txt --output=requirements-dev.txt
  3. Notice that the output file does not include any dev dependencies

Example pyproject.toml

[project]
name = "poetry-demo"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = [
]


[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.4"

[tool.poetry.requires-plugins]
poetry-plugin-export = ">=1.9"


I know that the dev dependencies can be easily exported with the --with=dev option, however the --dev, although deprecated, should still work.


Poetry version: 2.0.1
poetry-plugin-export version: 1.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions