python-poetry / python-poetry/poetry-plugin-export

`--dev` option not exporting dev dependencies

Open
#318 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
335
Forks
57
Avg merge
1h 23m
Merged PRs (30d)
3

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided pyproject.toml and the poetry export commands, then trace how the deprecated --dev option is handled. Add a regression test covering --dev and verify that the generated requirements-dev.txt includes the dev dependency while the regular export does not.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.