InconsistentCandidate: Pre-Release not allow
@Anurag-S1ngh is already working on this.
Since Oct 25, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the reported command with the supplied pyproject.toml and exported requirements.txt, then inspect python_inspector/resolve_cli.py and python_inspector/api.py around dependency resolution. Check how resolvelib handles the pre-release candidate and conditional requirement; done means the example resolves without InconsistentCandidate while preserving the stated version constraints.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- Python
- Stars
- 23
- Forks
- 29
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aboutcode-org/python-inspector
-
`packages` is empty when using a non-pypi.org simple index (e.g. Sonatype Nexus)Possibly taken @avika269 claimed this 6 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 62/100
aboutcode-org/python-inspector#268 · 2 comments ·
-
Python Inspector version 0.15.0 contains the wrong version stringMay be free again @Anurag-S1ngh claimed this 18 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
aboutcode-org/python-inspector#253 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
aboutcode-org/python-inspector#246 · 2 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aboutcode-org/python-inspector#242 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
aboutcode-org/python-inspector#241 · 3 comments ·
All issues in aboutcode-org/python-inspector
Similar issues
-
opensubtitlescom: provider rejects pt-PT even though its own converter maps itPossibly taken @paulo-0308 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Diaoul/subliminal#1405 ·
-
Internal ErrorOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
frappe/frappe_docker#2071 ·
Maintainers usually reply within 1 day
-
bug python
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
traceloop/openllmetry#4717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
The-Pocket/PocketFlow#161 ·
-
comp/desktop P2 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#157702 ·
Maintainers usually reply within 1 day