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:
- Create a
pyproject.toml file with dev dependencies
- Run
poetry export --dev --format --requirements.txt --output=requirements-dev.txt
- 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
The deprecated
--devoption does not work as intended: when running with--dev, the dev dependencies are not being exported.Running poetry export with or without the
--devoption won't make a difference:Steps to reproduce:
pyproject.tomlfile with dev dependenciespoetry export --dev --format --requirements.txt --output=requirements-dev.txtExample pyproject.toml
I know that the dev dependencies can be easily exported with the
--with=devoption, however the--dev, although deprecated, should still work.Poetry version: 2.0.1
poetry-plugin-export version: 1.9.0