python-poetry / python-poetry/poetry

Bug or messaging problem?

Open
#2,328 7 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/solver
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Issue

I'm not sure if this is a bug or a problem with the messaging in Poetry, but it's something I see a lot, and it's rather hard to search for in the issues so sorry if it's a dupe. Here's the problem...

I have a pyproject.toml that includes this in dev dev dependencies...

[tool.poetry.dev-dependencies]
faker = "*"
mixer = "*"

I discover that mixer is pretty much abandoned and has a bug that breaks my tests, but all my tests depend on it, so I fork the repo and try to switch to installing from my fork by editing the pyproject.toml

[tool.poetry.dev-dependencies]
faker = "*"
mixer = {path = "src/mixer/"}

I then run poetry install and I get this output...

[SolverProblemError]
Because no versions of mixer match !=6.1.3
 and mixer (6.1.3) depends on Faker (0.9.1), every version of mixer requires Faker (0.9.1).
So, because no versions of faker match 0.9.1
 and myproject depends on mixer (*), version solving failed.

This is telling me that there is no version 0.9.1 of faker. So, I check the faker release history and there it is, 0.9.1

Then I remember how often Poetry does this to me, and instead of editing the pyproject.toml I run poetry add faker="0.9.1" and get this output...

Updating dependencies
Resolving dependencies... (4.7s)

Writing lock file


Package operations: 0 installs, 3 updates, 1 removal

  - Updating text-unidecode (1.3 -> 1.2)
  - Updating faker (4.0.3 -> 0.9.1)
  - Updating mixer (5.5.7 -> 6.1.3 src/mixer)
  - Removing fake-factory (0.5.7)

So, if Faker 0.9.1 definitely exists, and poetry is perfectly able to resolve the dependencies, why does it tell me that it can't in the first message?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the dependency-resolution messages using the pyproject.toml examples and the poetry install and poetry add commands shown. Trace how the local mixer path dependency and Faker constraints are reported, then compare both outputs. Done means the reported conflict accurately explains why resolution fails or distinguishes the messaging problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.