Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect resolution using build-system requires rather than dependencies, or unclear conflicting dependencies #9659

Closed
daquintero opened this issue Aug 30, 2024 · 3 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@daquintero
Copy link

Description

Hello, I have thoroughly checked the documentation and attempted to find similar issues.

We're getting a really weird dependency resolution error in flexcompute/tidy3d#1913.

I have broken this down into a simple example which I include below, to show both the not-very-helpful error and the failed depedency resolution despite the correct matching specified dependencies.

I can see one of our dependencies is specified as follows:
https://github.com/heitzmann/gdstk/blob/v0.9.53/pyproject.toml

dependencies = [
    "numpy; platform_system=='Darwin'",
    "oldest-supported-numpy; platform_system!='Darwin'",
    "typing_extensions; python_version < '3.11'"
]

which I would think would enable us to create a poetry.lock file that uses this dependency and numpy="*".

However, as per the example below, the poetry lock resolution is failing as it appears to be an unclear issue.

Unsure it it has to do with a dependency resolution problem based on:

[build-system]
requires = [
    "scikit_build_core",
    "numpy >= 2.0"
]

Possibly it has to do with this in the depedendency resolution?

Source (PyPI): 108 packages found for numpy *
   1: fact: gdstk (0.9.53) depends on numpy (*)
   1: fact: gdstk (0.9.53) depends on oldest-supported-numpy (*)
   1: fact: gdstk (0.9.53) depends on typing_extensions (*)
   1: selecting gdstk (0.9.53)
   1: derived: typing_extensions
   1: derived: oldest-supported-numpy
Source (PyPI): 33 packages found for typing-extensions *
Source (PyPI): 28 packages found for oldest-supported-numpy *
   1: fact: numpy (2.1.0) requires Python >=3.10
   1: derived: not numpy (==2.1.0)
   1: selecting numpy (2.0.2)
   1: selecting typing-extensions (4.12.2)
   1: fact: oldest-supported-numpy (2023.12.21) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.12.21)

Will keep debugging this but opening this issue if it can be clearer why this is failing?

Workarounds

I am trying to find one. Possibly this has to do with requiring a oldest-supported-numpy dependency in gdstk?

Poetry Installation Method

other

Operating System

Ubuntu 22.04

Poetry Version

1.8.3

Poetry Configuration

± |master U:5 ✗| → poetry config --list
cache-dir = "/home/daquintero/.cache/pypoetry"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /home/daquintero/.cache/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = t


### Python Sysconfig

_No response_

### Example pyproject.toml

```TOML
2024-08-30 22:29:59 ⌚  dxps in ~/flexcompute
± |master U:5 ✗| → cd test_package/

± |master U:5 ✗| → cat pyproject.toml 
[tool.poetry]
name = "example-project"
version = "0.1.0"
description = "A simple project with numpy and gdstk"
authors = ["Your Name <your.email@example.com>"]

[tool.poetry.dependencies]
python = "^3.9"
numpy = "*"
gdstk = "0.9.53"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


± |master U:5 ✗| → poetry lock
Updating dependencies
Resolving dependencies... (0.6s)

Incompatible constraints in requirements of oldest-supported-numpy (2022.11.19):
numpy (==1.22.2) ; platform_machine == "loongarch64" and python_version < "3.11"
numpy (==1.23.3) ; python_version == "3.9" and platform_system == "OS400"
numpy ; python_version >= "3.12" or python_version >= "3.9" and platform_python_implementation == "PyPy"

Poetry Runtime Logs

2024-08-30 22:40:50 ⌚  dxps in ~/flexcompute/test_package
± |master U:5 ✗| → poetry -vvv lock
Using virtualenv: /home/daquintero/.cache/pypoetry/virtualenvs/example-project-_bc60wlj-py3.10
Updating dependencies
Resolving dependencies...
   1: fact: example-project is 0.1.0
   1: derived: example-project
   1: fact: example-project depends on numpy (*)
   1: fact: example-project depends on gdstk (0.9.53)
   1: selecting example-project (0.1.0)
   1: derived: gdstk (==0.9.53)
   1: derived: numpy
Checking if keyring is available
[keyring:keyring.backend] Loading KWallet
[keyring:keyring.backend] Loading SecretService
[keyring:keyring.backend] Loading Windows
[keyring:keyring.backend] Loading chainer
[keyring:keyring.backend] Loading libsecret
[keyring:keyring.backend] Loading macOS
Using keyring backend 'SecretService Keyring'
Creating new session for pypi.org
[urllib3:urllib3.connectionpool] Starting new HTTPS connection (1): pypi.org:443
[urllib3:urllib3.connectionpool] https://pypi.org:443 "GET /simple/gdstk/ HTTP/11" 304 0
[filelock:filelock] Attempting to acquire lock 135626983016528 on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/2/5/3/c/4/253c4bdc73c336d26ad95895ed297706f771bbd009eb5758a44faa94.lock
[filelock:filelock] Lock 135626983016528 acquired on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/2/5/3/c/4/253c4bdc73c336d26ad95895ed297706f771bbd009eb5758a44faa94.lock
[filelock:filelock] Attempting to release lock 135626983016528 on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/2/5/3/c/4/253c4bdc73c336d26ad95895ed297706f771bbd009eb5758a44faa94.lock
[filelock:filelock] Lock 135626983016528 released on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/2/5/3/c/4/253c4bdc73c336d26ad95895ed297706f771bbd009eb5758a44faa94.lock
Source (PyPI): 1 packages found for gdstk 0.9.53
[urllib3:urllib3.connectionpool] https://pypi.org:443 "GET /simple/numpy/ HTTP/11" 304 0
[filelock:filelock] Attempting to acquire lock 135626970830000 on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/c/c/1/3/3/cc133da5701a066bc3777b2575e0daa601596f19871db4608ca98b97.lock
[filelock:filelock] Lock 135626970830000 acquired on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/c/c/1/3/3/cc133da5701a066bc3777b2575e0daa601596f19871db4608ca98b97.lock
[filelock:filelock] Attempting to release lock 135626970830000 on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/c/c/1/3/3/cc133da5701a066bc3777b2575e0daa601596f19871db4608ca98b97.lock
[filelock:filelock] Lock 135626970830000 released on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/c/c/1/3/3/cc133da5701a066bc3777b2575e0daa601596f19871db4608ca98b97.lock
Source (PyPI): 108 packages found for numpy *
   1: fact: gdstk (0.9.53) depends on numpy (*)
   1: fact: gdstk (0.9.53) depends on oldest-supported-numpy (*)
   1: fact: gdstk (0.9.53) depends on typing_extensions (*)
   1: selecting gdstk (0.9.53)
   1: derived: typing_extensions
   1: derived: oldest-supported-numpy
[urllib3:urllib3.connectionpool] https://pypi.org:443 "GET /simple/typing-extensions/ HTTP/11" 304 0
[filelock:filelock] Attempting to acquire lock 135626968833792 on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/e/2/0/7/4/e207426cbcf220918fdf354826064190a066f96cd6ad8830f1f11fdc.lock
[filelock:filelock] Lock 135626968833792 acquired on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/e/2/0/7/4/e207426cbcf220918fdf354826064190a066f96cd6ad8830f1f11fdc.lock
[filelock:filelock] Attempting to release lock 135626968833792 on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/e/2/0/7/4/e207426cbcf220918fdf354826064190a066f96cd6ad8830f1f11fdc.lock
[filelock:filelock] Lock 135626968833792 released on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/e/2/0/7/4/e207426cbcf220918fdf354826064190a066f96cd6ad8830f1f11fdc.lock
Source (PyPI): 33 packages found for typing-extensions *
[urllib3:urllib3.connectionpool] https://pypi.org:443 "GET /simple/oldest-supported-numpy/ HTTP/11" 304 0
[filelock:filelock] Attempting to acquire lock 135626968729056 on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/7/8/a/d/f/78adf127877f1f17ad68e0f9f17358b4afef25e73f0bbc766be240a3.lock
[filelock:filelock] Lock 135626968729056 acquired on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/7/8/a/d/f/78adf127877f1f17ad68e0f9f17358b4afef25e73f0bbc766be240a3.lock
[filelock:filelock] Attempting to release lock 135626968729056 on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/7/8/a/d/f/78adf127877f1f17ad68e0f9f17358b4afef25e73f0bbc766be240a3.lock
[filelock:filelock] Lock 135626968729056 released on /home/daquintero/.cache/pypoetry/cache/repositories/PyPI/_http/7/8/a/d/f/78adf127877f1f17ad68e0f9f17358b4afef25e73f0bbc766be240a3.lock
Source (PyPI): 28 packages found for oldest-supported-numpy *
   1: fact: numpy (2.1.0) requires Python >=3.10
   1: derived: not numpy (==2.1.0)
   1: selecting numpy (2.0.2)
   1: selecting typing-extensions (4.12.2)
   0: Duplicate dependencies for numpy
   0: Different requirements found for numpy (1.22.2) with markers platform_machine == "loongarch64" and python_version >= "3.8" and python_version < "3.11" and platform_python_implementation != "PyPy", numpy (1.21.6) with markers python_version == "3.10" and platform_machine != "loongarch64", numpy (1.23.2) with markers python_version == "3.11", numpy (1.26.2) with markers python_version == "3.12", numpy (1.21.0) with markers python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin" and platform_python_implementation != "PyPy", numpy (1.19.3) with markers python_version == "3.9" and platform_system == "Windows" and platform_python_implementation != "PyPy" and platform_machine != "loongarch64" or python_version == "3.9" and platform_machine not in "arm64|loongarch64" and platform_python_implementation != "PyPy" and platform_system not in "OS400", numpy (1.25.0) with markers python_version == "3.9" and platform_python_implementation == "PyPy", numpy (1.23.3) with markers python_version == "3.9" and platform_system == "OS400" and platform_python_implementation != "PyPy" and platform_machine != "loongarch64", numpy (*) with markers python_version >= "3.13" and numpy (<empty>) with markers python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and python_version != "3.9" and platform_machine != "loongarch64" and python_version < "3.13" or python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and platform_python_implementation == "PyPy" and python_version != "3.9" and python_version < "3.13" or platform_machine == "arm64" and python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and (platform_system != "Darwin" and platform_system != "Windows" and platform_system != "OS400") and platform_python_implementation != "PyPy" and python_version < "3.13" or python_version < "3.8" or python_version > "3.11" and python_version != "3.12" and python_version < "3.13" or platform_python_implementation == "PyPy" and platform_machine == "loongarch64" and python_version != "3.11" and python_version != "3.12" and python_version != "3.9" and python_version < "3.13".
   1: Version solving took 0.718 seconds.
   1: Tried 1 solutions.
   0: Retrying dependency resolution with the following overrides ({Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.22.2)>}}).
   1: fact: example-project is 0.1.0
   1: derived: example-project
   1: fact: example-project depends on numpy (*)
   1: fact: example-project depends on gdstk (0.9.53)
   1: selecting example-project (0.1.0)
   1: derived: gdstk (==0.9.53)
   1: derived: numpy
Source (PyPI): 1 packages found for gdstk 0.9.53
Source (PyPI): 108 packages found for numpy *
   1: fact: gdstk (0.9.53) depends on numpy (*)
   1: fact: gdstk (0.9.53) depends on oldest-supported-numpy (*)
   1: fact: gdstk (0.9.53) depends on typing_extensions (*)
   1: selecting gdstk (0.9.53)
   1: derived: typing_extensions
   1: derived: oldest-supported-numpy
Source (PyPI): 33 packages found for typing-extensions *
Source (PyPI): 28 packages found for oldest-supported-numpy *
   1: fact: numpy (2.1.0) requires Python >=3.10
   1: derived: not numpy (==2.1.0)
   1: selecting numpy (2.0.2)
   1: selecting typing-extensions (4.12.2)
   1: fact: oldest-supported-numpy (2023.12.21) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.12.21)
   0: Duplicate dependencies for numpy
   0: Different requirements found for numpy (1.22.2) with markers platform_machine == "loongarch64" and python_version >= "3.8" and python_version < "3.11" and platform_python_implementation != "PyPy", numpy (1.21.6) with markers python_version == "3.10" and platform_machine != "loongarch64", numpy (1.23.2) with markers python_version == "3.11", numpy (1.26.2) with markers python_version == "3.12", numpy (1.21.0) with markers python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin" and platform_python_implementation != "PyPy", numpy (1.19.3) with markers python_version == "3.9" and platform_system == "Windows" and platform_python_implementation != "PyPy" and platform_machine != "loongarch64" or python_version == "3.9" and platform_machine not in "arm64|loongarch64" and platform_python_implementation != "PyPy" and platform_system not in "OS400", numpy (1.25.0) with markers python_version == "3.9" and platform_python_implementation == "PyPy", numpy (1.23.3) with markers python_version == "3.9" and platform_system == "OS400" and platform_python_implementation != "PyPy" and platform_machine != "loongarch64", numpy (*) with markers python_version >= "3.13" and numpy (<empty>) with markers python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and python_version != "3.9" and platform_machine != "loongarch64" and python_version < "3.13" or python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and platform_python_implementation == "PyPy" and python_version != "3.9" and python_version < "3.13" or platform_machine == "arm64" and python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and (platform_system != "Darwin" and platform_system != "Windows" and platform_system != "OS400") and platform_python_implementation != "PyPy" and python_version < "3.13" or python_version < "3.8" or python_version > "3.11" and python_version != "3.12" and python_version < "3.13" or platform_python_implementation == "PyPy" and platform_machine == "loongarch64" and python_version != "3.11" and python_version != "3.12" and python_version != "3.9" and python_version < "3.13".
   1: Version solving took 0.042 seconds.
   1: Tried 1 solutions.
   0: Retrying dependency resolution with the following overrides ({Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.12.12'): {'numpy': <Dependency numpy (==1.22.2)>}}).
   1: fact: example-project is 0.1.0
   1: derived: example-project
   1: fact: example-project depends on numpy (*)
   1: fact: example-project depends on gdstk (0.9.53)
   1: selecting example-project (0.1.0)
   1: derived: gdstk (==0.9.53)
   1: derived: numpy
Source (PyPI): 1 packages found for gdstk 0.9.53
Source (PyPI): 108 packages found for numpy *
   1: fact: gdstk (0.9.53) depends on numpy (*)
   1: fact: gdstk (0.9.53) depends on oldest-supported-numpy (*)
   1: fact: gdstk (0.9.53) depends on typing_extensions (*)
   1: selecting gdstk (0.9.53)
   1: derived: typing_extensions
   1: derived: oldest-supported-numpy
Source (PyPI): 33 packages found for typing-extensions *
Source (PyPI): 28 packages found for oldest-supported-numpy *
   1: fact: numpy (2.1.0) requires Python >=3.10
   1: derived: not numpy (==2.1.0)
   1: selecting numpy (2.0.2)
   1: selecting typing-extensions (4.12.2)
   1: fact: oldest-supported-numpy (2023.12.21) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.12.21)
   1: fact: oldest-supported-numpy (2023.12.12) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.12.12)
   0: Duplicate dependencies for numpy
   0: Different requirements found for numpy (1.22.2) with markers platform_machine == "loongarch64" and python_version >= "3.8" and python_version < "3.11" and platform_python_implementation != "PyPy", numpy (1.21.6) with markers python_version == "3.10" and platform_machine != "loongarch64", numpy (1.23.2) with markers python_version == "3.11", numpy (1.26.1) with markers python_version == "3.12", numpy (1.21.0) with markers python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin" and platform_python_implementation != "PyPy", numpy (1.19.3) with markers python_version == "3.9" and platform_system == "Windows" and platform_python_implementation != "PyPy" and platform_machine != "loongarch64" or python_version == "3.9" and platform_machine not in "arm64|loongarch64" and platform_python_implementation != "PyPy" and platform_system not in "OS400", numpy (1.25.0) with markers python_version == "3.9" and platform_python_implementation == "PyPy", numpy (1.23.3) with markers python_version == "3.9" and platform_system == "OS400" and platform_python_implementation != "PyPy" and platform_machine != "loongarch64", numpy (*) with markers python_version >= "3.13" and numpy (<empty>) with markers python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and python_version != "3.9" and platform_machine != "loongarch64" and python_version < "3.13" or python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and platform_python_implementation == "PyPy" and python_version != "3.9" and python_version < "3.13" or platform_machine == "arm64" and python_version != "3.10" and python_version != "3.11" and python_version != "3.12" and (platform_system != "Darwin" and platform_system != "Windows" and platform_system != "OS400") and platform_python_implementation != "PyPy" and python_version < "3.13" or python_version < "3.8" or python_version > "3.11" and python_version != "3.12" and python_version < "3.13" or platform_python_implementation == "PyPy" and platform_machine == "loongarch64" and python_version != "3.11" and python_version != "3.12" and python_version != "3.9" and python_version < "3.13".
   1: Version solving took 0.034 seconds.
   1: Tried 1 solutions.
   0: Retrying dependency resolution with the following overrides ({Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.12.12'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.22.2)>}}).
   1: fact: example-project is 0.1.0
   1: derived: example-project
   1: fact: example-project depends on numpy (*)
   1: fact: example-project depends on gdstk (0.9.53)
   1: selecting example-project (0.1.0)
   1: derived: gdstk (==0.9.53)
   1: derived: numpy
Source (PyPI): 1 packages found for gdstk 0.9.53
Source (PyPI): 108 packages found for numpy *
   1: fact: gdstk (0.9.53) depends on numpy (*)
   1: fact: gdstk (0.9.53) depends on oldest-supported-numpy (*)
   1: fact: gdstk (0.9.53) depends on typing_extensions (*)
   1: selecting gdstk (0.9.53)
   1: derived: typing_extensions
   1: derived: oldest-supported-numpy
Source (PyPI): 33 packages found for typing-extensions *
Source (PyPI): 28 packages found for oldest-supported-numpy *
   1: fact: numpy (2.1.0) requires Python >=3.10
   1: derived: not numpy (==2.1.0)
   1: selecting numpy (2.0.2)
   1: selecting typing-extensions (4.12.2)
   1: fact: oldest-supported-numpy (2023.12.21) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.12.21)
   1: fact: oldest-supported-numpy (2023.12.12) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.12.12)
   1: fact: oldest-supported-numpy (2023.10.25) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.10.25)
   0: Duplicate dependencies for numpy
   0: Different requirements found for numpy (1.22.2) with markers platform_machine == "loongarch64" and python_version >= "3.8" and python_version < "3.11", numpy (1.21.6) with markers python_version == "3.10" and platform_machine != "loongarch64", numpy (1.23.2) with markers python_version == "3.11", numpy (1.21.0) with markers python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin", numpy (1.19.3) with markers python_version == "3.9" and platform_system == "Windows" and platform_machine != "loongarch64" or python_version == "3.9" and platform_machine not in "arm64|loongarch64" and platform_system not in "OS400", numpy (1.23.3) with markers python_version == "3.9" and platform_system == "OS400" and platform_machine != "loongarch64", numpy (*) with markers python_version >= "3.12" and numpy (<empty>) with markers python_version != "3.10" and python_version != "3.11" and python_version != "3.9" and platform_machine != "loongarch64" and python_version < "3.12" or platform_machine == "arm64" and python_version != "3.10" and python_version != "3.11" and (platform_system != "Darwin" and platform_system != "Windows" and platform_system != "OS400") and python_version < "3.12" or python_version < "3.8" or python_version > "3.11" and python_version < "3.12".
   1: Version solving took 0.038 seconds.
   1: Tried 1 solutions.
   0: Retrying dependency resolution with the following overrides ({Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.12.12'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.8.3'): {'numpy': <Dependency numpy (==1.22.2)>}}).
   1: fact: example-project is 0.1.0
   1: derived: example-project
   1: fact: example-project depends on numpy (*)
   1: fact: example-project depends on gdstk (0.9.53)
   1: selecting example-project (0.1.0)
   1: derived: gdstk (==0.9.53)
   1: derived: numpy
Source (PyPI): 1 packages found for gdstk 0.9.53
Source (PyPI): 108 packages found for numpy *
   1: fact: gdstk (0.9.53) depends on numpy (*)
   1: fact: gdstk (0.9.53) depends on oldest-supported-numpy (*)
   1: fact: gdstk (0.9.53) depends on typing_extensions (*)
   1: selecting gdstk (0.9.53)
   1: derived: typing_extensions
   1: derived: oldest-supported-numpy
Source (PyPI): 33 packages found for typing-extensions *
Source (PyPI): 28 packages found for oldest-supported-numpy *
   1: fact: numpy (2.1.0) requires Python >=3.10
   1: derived: not numpy (==2.1.0)
   1: selecting numpy (2.0.2)
   1: selecting typing-extensions (4.12.2)
   1: fact: oldest-supported-numpy (2023.12.21) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.12.21)
   1: fact: oldest-supported-numpy (2023.12.12) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.12.12)
   1: fact: oldest-supported-numpy (2023.10.25) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.10.25)
   1: fact: oldest-supported-numpy (2023.8.3) depends on numpy (1.22.2)
   1: derived: not oldest-supported-numpy (==2023.8.3)
   0: Duplicate dependencies for numpy
   1: Version solving took 0.034 seconds.
   1: Tried 1 solutions.

  Stack trace:

  4  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:154 in _solve
      152│ 
      153│         try:
    → 154│             result = resolve_version(self._package, self._provider)
      155│ 
      156│             packages = result.packages

  3  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/__init__.py:18 in resolve_version
       16│     solver = VersionSolver(root, provider)
       17│ 
    →  18│     return solver.solve()
       19│ 

  2  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:175 in solve
      173│             while next is not None:
      174│                 self._propagate(next)
    → 175│                 next = self._choose_package_version()
      176│ 
      177│             return self._result()

  1  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:514 in _choose_package_version
      512│             package = locked
      513│ 
    → 514│         package = self._provider.complete_package(package)
      515│ 
      516│         conflict = False

  OverrideNeeded

  ({Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.22.2)>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.21.6)>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.23.2)>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.26.2)>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.21.0)>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.19.3)>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.25.0)>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.23.3)>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy>}}, {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (<empty>)>}})

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/provider.py:653 in complete_package
      649│                     current_overrides.update({package: package_overrides})
      650│                     overrides.append(current_overrides)
      651│ 
      652│             if overrides:
    → 653│                 raise OverrideNeeded(*overrides)
      654│ 
      655│         # Modifying dependencies as needed
      656│         clean_dependencies = []
      657│         for dep in dependencies:

The following error occurred when trying to handle this error:


  Stack trace:

  4  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:154 in _solve
      152│ 
      153│         try:
    → 154│             result = resolve_version(self._package, self._provider)
      155│ 
      156│             packages = result.packages

  3  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/__init__.py:18 in resolve_version
       16│     solver = VersionSolver(root, provider)
       17│ 
    →  18│     return solver.solve()
       19│ 

  2  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:175 in solve
      173│             while next is not None:
      174│                 self._propagate(next)
    → 175│                 next = self._choose_package_version()
      176│ 
      177│             return self._result()

  1  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:514 in _choose_package_version
      512│             package = locked
      513│ 
    → 514│         package = self._provider.complete_package(package)
      515│ 
      516│         conflict = False

  OverrideNeeded

  {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.12.12'): {'numpy': <Dependency numpy (==1.22.2)>}}

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/provider.py:653 in complete_package
      649│                     current_overrides.update({package: package_overrides})
      650│                     overrides.append(current_overrides)
      651│ 
      652│             if overrides:
    → 653│                 raise OverrideNeeded(*overrides)
      654│ 
      655│         # Modifying dependencies as needed
      656│         clean_dependencies = []
      657│         for dep in dependencies:

The following error occurred when trying to handle this error:


  Stack trace:

  4  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:154 in _solve
      152│ 
      153│         try:
    → 154│             result = resolve_version(self._package, self._provider)
      155│ 
      156│             packages = result.packages

  3  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/__init__.py:18 in resolve_version
       16│     solver = VersionSolver(root, provider)
       17│ 
    →  18│     return solver.solve()
       19│ 

  2  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:175 in solve
      173│             while next is not None:
      174│                 self._propagate(next)
    → 175│                 next = self._choose_package_version()
      176│ 
      177│             return self._result()

  1  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:514 in _choose_package_version
      512│             package = locked
      513│ 
    → 514│         package = self._provider.complete_package(package)
      515│ 
      516│         conflict = False

  OverrideNeeded

  {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.12.12'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.22.2)>}}

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/provider.py:653 in complete_package
      649│                     current_overrides.update({package: package_overrides})
      650│                     overrides.append(current_overrides)
      651│ 
      652│             if overrides:
    → 653│                 raise OverrideNeeded(*overrides)
      654│ 
      655│         # Modifying dependencies as needed
      656│         clean_dependencies = []
      657│         for dep in dependencies:

The following error occurred when trying to handle this error:


  Stack trace:

  4  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:154 in _solve
      152│ 
      153│         try:
    → 154│             result = resolve_version(self._package, self._provider)
      155│ 
      156│             packages = result.packages

  3  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/__init__.py:18 in resolve_version
       16│     solver = VersionSolver(root, provider)
       17│ 
    →  18│     return solver.solve()
       19│ 

  2  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:175 in solve
      173│             while next is not None:
      174│                 self._propagate(next)
    → 175│                 next = self._choose_package_version()
      176│ 
      177│             return self._result()

  1  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:514 in _choose_package_version
      512│             package = locked
      513│ 
    → 514│         package = self._provider.complete_package(package)
      515│ 
      516│         conflict = False

  OverrideNeeded

  {Package('oldest-supported-numpy', '2023.12.21'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.12.12'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.10.25'): {'numpy': <Dependency numpy (==1.22.2)>}, Package('oldest-supported-numpy', '2023.8.3'): {'numpy': <Dependency numpy (==1.22.2)>}}

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/provider.py:653 in complete_package
      649│                     current_overrides.update({package: package_overrides})
      650│                     overrides.append(current_overrides)
      651│ 
      652│             if overrides:
    → 653│                 raise OverrideNeeded(*overrides)
      654│ 
      655│         # Modifying dependencies as needed
      656│         clean_dependencies = []
      657│         for dep in dependencies:

The following error occurred when trying to handle this error:


  Stack trace:

  24  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/cleo/application.py:327 in run
       325│ 
       326│             try:
     → 327│                 exit_code = self._run(io)
       328│             except BrokenPipeError:
       329│                 # If we are piped to another process, it may close early and send a

  23  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/console/application.py:190 in _run
       188│         self._load_plugins(io)
       189│ 
     → 190│         exit_code: int = super()._run(io)
       191│         return exit_code
       192│ 

  22  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/cleo/application.py:431 in _run
       429│             io.input.interactive(interactive)
       430│ 
     → 431│         exit_code = self._run_command(command, io)
       432│         self._running_command = None
       433│ 

  21  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/cleo/application.py:473 in _run_command
       471│ 
       472│         if error is not None:
     → 473│             raise error
       474│ 
       475│         return terminate_event.exit_code

  20  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/cleo/application.py:457 in _run_command
       455│ 
       456│             if command_event.command_should_run():
     → 457│                 exit_code = command.run(io)
       458│             else:
       459│                 exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED

  19  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/cleo/commands/base_command.py:117 in run
       115│         io.input.validate()
       116│ 
     → 117│         return self.execute(io) or 0
       118│ 
       119│     def merge_application_definition(self, merge_args: bool = True) -> None:

  18  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/cleo/commands/command.py:61 in execute
        59│ 
        60│         try:
     →  61│             return self.handle()
        62│         except KeyboardInterrupt:
        63│             return 1

  17  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/console/commands/lock.py:55 in handle
        53│         self.installer.lock(update=not self.option("no-update"))
        54│ 
     →  55│         return self.installer.run()
        56│ 

  16  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/installer.py:104 in run
       102│             self.verbose(True)
       103│ 
     → 104│         return self._do_install()
       105│ 
       106│     def dry_run(self, dry_run: bool = True) -> Installer:

  15  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/installer.py:241 in _do_install
       239│                 source_root=self._env.path.joinpath("src")
       240│             ):
     → 241│                 ops = solver.solve(use_latest=self._whitelist).calculate_operations()
       242│         else:
       243│             self._io.write_line("Installing dependencies from lock file")

  14  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:71 in solve
        69│         with self._progress(), self._provider.use_latest_for(use_latest or []):
        70│             start = time.time()
     →  71│             packages, depths = self._solve()
        72│             end = time.time()
        73│ 

  ...  Previous 2 frames repeated 2 times

   9  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:158 in _solve
       156│             packages = result.packages
       157│         except OverrideNeeded as e:
     → 158│             return self._solve_in_compatibility_mode(e.overrides)
       159│         except SolveFailure as e:
       160│             raise SolverProblemError(e)

   8  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:132 in _solve_in_compatibility_mode
       130│             )
       131│             self._provider.set_overrides(override)
     → 132│             _packages, _depths = self._solve()
       133│             for index, package in enumerate(_packages):
       134│                 if package not in packages:

   7  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:158 in _solve
       156│             packages = result.packages
       157│         except OverrideNeeded as e:
     → 158│             return self._solve_in_compatibility_mode(e.overrides)
       159│         except SolveFailure as e:
       160│             raise SolverProblemError(e)

   6  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:132 in _solve_in_compatibility_mode
       130│             )
       131│             self._provider.set_overrides(override)
     → 132│             _packages, _depths = self._solve()
       133│             for index, package in enumerate(_packages):
       134│                 if package not in packages:

   5  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:154 in _solve
       152│ 
       153│         try:
     → 154│             result = resolve_version(self._package, self._provider)
       155│ 
       156│             packages = result.packages

   4  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/__init__.py:18 in resolve_version
        16│     solver = VersionSolver(root, provider)
        17│ 
     →  18│     return solver.solve()
        19│ 

   3  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:175 in solve
       173│             while next is not None:
       174│                 self._propagate(next)
     → 175│                 next = self._choose_package_version()
       176│ 
       177│             return self._result()

   2  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/mixology/version_solver.py:514 in _choose_package_version
       512│             package = locked
       513│ 
     → 514│         package = self._provider.complete_package(package)
       515│ 
       516│         conflict = False

   1  ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/provider.py:605 in complete_package
       603│             # mutually exclusive.
       604│             active_extras = None if package.is_root() else dependency.extras
     → 605│             deps = self._resolve_overlapping_markers(package, deps, active_extras)
       606│ 
       607│             if len(deps) == 1:

  IncompatibleConstraintsError

  Incompatible constraints in requirements of oldest-supported-numpy (2022.11.19):
  numpy (==1.22.2) ; platform_machine == "loongarch64" and python_version < "3.11"
  numpy (==1.23.3) ; python_version == "3.9" and platform_system == "OS400"
  numpy ; python_version >= "3.12" or python_version >= "3.9" and platform_python_implementation == "PyPy"

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/puzzle/provider.py:925 in _resolve_overlapping_markers
      921│                     specific_source_dependency = dep
      922│                 constraint = constraint.intersect(dep.constraint)
      923│             if constraint.is_empty():
      924│                 # conflict in overlapping area
    → 925│                 raise IncompatibleConstraintsError(package, *used_dependencies)
      926│ 
      927│             if not any(uses):
      928│                 # This is an edge case where the dependency is not required
      929│                 # for the resulting marker. However, we have to consider it anyway

@daquintero daquintero added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 30, 2024
@dimbleby
Copy link
Contributor

Duplicate #8830 please close

@daquintero
Copy link
Author

daquintero commented Aug 30, 2024

Ahh brilliant thanks! Maybe we can improve the error traceback though to make the possible sources clearer.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants