`--dev` option not exporting dev dependencies

オープン
#318 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
cli

調査の方向性

まず、提供された pyproject.toml と poetry export コマンドを使って問題を再現し、その後、非推奨の --dev オプションがどのように処理されるかを追跡します。--dev を対象とするリグレッションテストを追加し、生成された requirements-dev.txt に開発依存関係が含まれ、通常のエクスポートには含まれないことを確認します。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
336
フォーク
59
平均マージ
10分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python-poetry/poetry-plugin-export のほかの issue

python-poetry/poetry-plugin-export の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。