InconsistentCandidate: Pre-Release not allow
@Anurag-S1ngh がすでに取り組んでいます。
2026年10月25日 から。
評価
調査の方向性
提供された pyproject.toml とエクスポートされた requirements.txt を使って報告されたコマンドを再現し、その後、依存関係の解決に関する python_inspector/resolve_cli.py と python_inspector/api.py を調査してください。resolvelib が pre-release 候補と条件付き要件をどのように処理するかを確認してください。完了条件は、指定されたバージョン制約を維持したまま、例が InconsistentCandidate なしで解決されることです。
索引モデルが issue の本文から書いたものです。
説明
I'm using Open Source Review Toolkit to resolve the dependencies of a poetry.project. Within the pyproject.tom, a pre-release version of a dependency is used: genai_endpoints = { version = "0.2.2rc20251105201257", source = "GENAI" } which is resolved to poetry.lock as
[[package]]
name = "genai-endpoints"
version = "0.2.2rc20251105201257"
description = "Semvox genAI endpoints"
optional = false
python-versions = ">=3.12,<4.0"
groups = ["main", "dev"]
files = [
{file = "genai_endpoints-0.2.2rc20251105201257-py3-none-any.whl", hash = "sha256:23f0d77f01d07c4c08a44045c3d8876affd88e48cf4de6e5953ee3d8a60f931e"},
{file = "genai_endpoints-0.2.2rc20251105201257.tar.gz", hash = "sha256:0f4a6fd239ea18cafe3f9c468f81048adbb710a8e6235f25defe436f590dc1c1"},
]
and with poetry export to requirements.txt: genai-endpoints==0.2.2rc20251105201257 ; python_version == "3.12"
but python-inspector fails with :
Running 'python-inspector --python-version 312 --operating-system linux --json-pdt /tmp/ort-PythonInspector17489324190711353943/python-inspector9615377530813343324.json --analyze-setup-py-insecurely --requirement /tmp/ort-Poetry2549011213989081689/requirements6460697747488281912.txt --prefer-source' in '/tmp/ort-Poetry2549011213989081689' failed with exit code 1:
10:06:45 Traceback (most recent call last):
10:06:45 File "/opt/python/versions/3.13.5/lib/python3.13/site-packages/python_inspector/resolve_cli.py", line 259, in resolve_dependencies
10:06:45 resolution_result: Dict = resolver_api(
10:06:45 ~~~~~~~~~~~~^
10:06:45 requirement_files=requirement_files,
10:06:45 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:06:45 ...<15 lines>...
10:06:45 generic_paths=generic_paths,
10:06:45 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:06:45 )
10:06:45 ^
10:06:45 File "/opt/python/versions/3.13.5/lib/python3.13/site-packages/python_inspector/api.py", line 283, in resolve_dependencies
10:06:45 resolution, purls = resolve(
10:06:45 ~~~~~~~^
10:06:45 direct_dependencies=direct_dependencies,
10:06:45 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:06:45 ...<8 lines>...
10:06:45 printer=printer,
10:06:45 ^^^^^^^^^^^^^^^^
10:06:45 )
10:06:45 [...skipping 2 lines...]
10:06:45 resolved_dependencies, packages = get_resolved_dependencies(
10:06:45 ~~~~~~~~~~~~~~~~~~~~~~~~~^
10:06:45 requirements=requirements,
10:06:45 ^^^^^^^^^^^^^^^^^^^^^^^^^^
10:06:45 ...<8 lines>...
10:06:45 printer=printer,
10:06:45 ^^^^^^^^^^^^^^^^
10:06:45 )
10:06:45 ^
10:06:45 File "/opt/python/versions/3.13.5/lib/python3.13/site-packages/python_inspector/api.py", line 465, in get_resolved_dependencies
10:06:45 resolver_results = resolver.resolve(requirements=requirements, max_rounds=max_rounds)
10:06:45 File "/opt/python/versions/3.13.5/lib/python3.13/site-packages/resolvelib/resolvers/resolution.py", line 601, in resolve
10:06:45 state = resolution.resolve(requirements, max_rounds=max_rounds)
10:06:45 File "/opt/python/versions/3.13.5/lib/python3.13/site-packages/resolvelib/resolvers/resolution.py", line 513, in resolve
10:06:45 failure_criterion = self._attempt_to_pin_criterion(name)
10:06:45 File "/opt/python/versions/3.13.5/lib/python3.13/site-packages/resolvelib/resolvers/resolution.py", line 235, in _attempt_to_pin_criterion
10:06:45 raise InconsistentCandidate(candidate, criterion)
10:06:45 resolvelib.resolvers.exceptions.InconsistentCandidate: Provided candidate Candidate(name='genai-endpoints', version=<Version('0.2.2rc20251105201257')>, extras=set()) does not satisfy <Requirement('genai-endpoints==0.2.2rc20251105201257; python_version == "3.12"')>, <Requirement('genai-endpoints<0.3.0,>=0.2.1')>
10:06:45
IS there any way to either allow-prereleases or pin a version to conditions?
- 主要言語
- Python
- スター
- 23
- フォーク
- 29
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aboutcode-org/python-inspector のほかの issue
-
難易度 3/5 半日 初心者へのやさしさ 62/100
aboutcode-org/python-inspector#268 · コメント 1 件 ·
-
Add support for pylock.toml対応中かも @Anurag-S1ngh が 4 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
aboutcode-org/python-inspector#259 · コメント 1 件 ·
-
Feature request: Mask repository credentials in --verbose output対応中かも @Rajeshwari2857 が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
aboutcode-org/python-inspector#254 · コメント 4 件 · リアクション 4 件 ·
-
Python Inspector version 0.15.0 contains the wrong version string対応中かも @Anurag-S1ngh が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
aboutcode-org/python-inspector#253 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
aboutcode-org/python-inspector#246 · コメント 2 件 · リアクション 2 件 ·
aboutcode-org/python-inspector の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Graphify-Labs/graphify#4860 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
:bug: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
scikit-image/scikit-image#8377 ·
メンテナーはふだん 1 日以内に返信
-
Ingredient import validation accepts negative nutrient values and NaN対応中かも @LukeSekai が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
wger-project/wger#2564 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/ponymail-foal#351 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 4 日以内に返信