python-poetry / python-poetry/poetry
Poetry removes numpy for some versions of python and pandas
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name:
System
Platform: darwin
OS: posix
Python: /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10
- Poetry version: Poetry version 1.1.12
Issue
pyproject.toml:
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = [""]
[tool.poetry.dependencies]
python = "^3.9"
pandas = "^1.3.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
If I run poetry update with the pyproject.toml shown above, the correct dependencies are installed. If I change the Python version to python = "~3.9" and run poetry update again, poetry shows:
Updating dependencies
Resolving dependencies... (0.1s)
Writing lock file
Package operations: 0 installs, 0 updates, 1 removal
• Removing numpy (1.22.1)
This seems wrong, since pandas won't run without numpy. What's going on here?
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
Reproduce the report with the supplied pyproject.toml, first using python = "^3.9" and then python = "~3.9", and run poetry update. Trace the dependency-resolution path responsible for removing numpy even though pandas is installed; done means the resolver handles this constraint consistently and the scenario has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100