python-poetry / python-poetry/poetry
Wildcard version constraint not functioning as expected
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- Poetry version: 1.6.1
- Python version:3.11.3
- OS version and name: macOS 12.6.8
- pyproject.toml: pyproject.toml
- I am on the latest stable Poetry version, installed using a recommended method.
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption) and have included the output below.
Issue
I'm just getting started with poetry, but I think I'm misunderstanding how the wildcard version constraints are implemented.
I'm specifying a python version as python = "3.8.*" in the toml file, before I start using poetry to add packages
such as poetry add psychopy, but get the following error
The current project's Python requirement (==3.8.*) is not compatible with some of the required packages Python requirement:
- psychopy requires Python <3.11,>=3.8, so it will not be satisfied for Python >=3.8.dev0,<3.8
I was able to solve this by using python = "~3.8" or python = ">=3.8, <3.9" explicitly, but according to the wildcard documentation (linked above), 3.8.* and ~3.8 should have been equivalent
Contributor guide
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.
Research direction
Start with the linked pyproject.toml and the wildcard requirements documentation, then reproduce the issue using Poetry 1.6.1, Python 3.11.3, and poetry add psychopy. Compare how 3.8.* is interpreted with ~3.8 and >=3.8, <3.9; done means the wildcard constraint behaves as documented and the reproduction no longer reports the incompatible range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100