Conflicts with python versions on patch level
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
Research direction
Reproduce with a requirements.txt containing anyio==3.6.1 and dataclasses==0.8, then run python-inspector -r requirements.txt --json-pdt - -o linux -p 36. Start from python_inspector/resolve_cli.py and python_inspector/api.py, which appear in the stack trace. Done means the CLI can handle the needed Python patch-level constraint or otherwise documents/handles this case without the shown ResolutionImpossible.
Written by the indexing model from the issue text.
Description
We have a requirements.txt file that cannot be analyzed by Python Inspector due to conflicting dependencies. It boils down to the following two dependencies:
anyio==3.6.1
dataclasses==0.8
When running the command python-inspector -r requirements.txt --json-pdt - -o linux -p 36 it reports
raise ResolutionImpossible(e.criterion.information)
resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=<Requirement('anyio==3.6.1')>, parent=None)]
When choosing a different Python version, e.g. 37 the problem is caused by the dataclasses library (see full stack trace below).
From what I found out, there seem to be only specific Python versions for which this constellation can work: dataclasses requires Python >=3.6, <3.7; anyio requires Python >=3.6.2. It is, however, not possible to define the Python version for Python Inspector on that level of detail. I assume that the 36 option will select a 3.6.0 version? So, should the corresponding option be extended to support an exact version number? Or is there another way how to solve this issue?
Here is the full stack trace:
Traceback (most recent call last):
File "/home/heo1wa3/.local/lib/python3.8/site-packages/resolvelib/resolvers.py", line 372, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/home/heo1wa3/.local/lib/python3.8/site-packages/resolvelib/resolvers.py", line 173, in _add_to_criteria
raise RequirementsConflicted(criterion)
resolvelib.resolvers.RequirementsConflicted: Requirements conflict: <Requirement('dataclasses==0.8')>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/heo1wa3/.local/lib/python3.8/site-packages/python_inspector/resolve_cli.py", line 246, in resolve_dependencies
resolution_result: Dict = resolver_api(
File "/home/heo1wa3/.local/lib/python3.8/site-packages/python_inspector/api.py", line 257, in resolve_dependencies
resolution, purls = resolve(
File "/home/heo1wa3/.local/lib/python3.8/site-packages/python_inspector/api.py", line 316, in resolve
resolved_dependencies, packages = get_resolved_dependencies(
File "/home/heo1wa3/.local/lib/python3.8/site-packages/python_inspector/api.py", line 354, in get_resolved_dependencies
resolver_results = resolver.resolve(requirements=requirements, max_rounds=max_rounds)
File "/home/heo1wa3/.local/lib/python3.8/site-packages/resolvelib/resolvers.py", line 521, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/home/heo1wa3/.local/lib/python3.8/site-packages/resolvelib/resolvers.py", line 374, in resolve
raise ResolutionImpossible(e.criterion.information)
resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=<Requirement('dataclasses==0.8')>, parent=None)]
- 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 ·
-
InconsistentCandidate: Pre-Release not allowMay be free again @Anurag-S1ngh claimed this 25 days ago, and no pull request is open. Openbug design nice-to-have
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aboutcode-org/python-inspector#257 · 1 comment ·
-
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 ·
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