Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--dev option not exporting dev dependencies #318

Open
fbdb opened this issue Jan 14, 2025 · 0 comments
Open

--dev option not exporting dev dependencies #318

fbdb opened this issue Jan 14, 2025 · 0 comments

Comments

@fbdb
Copy link

fbdb commented Jan 14, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant