-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Solver breaks with related dependencies that are both conditional #5506
Comments
cc: @radoering |
This is quite similar to the issue described in #4695 however not the same. The issue here is that a restricted dependency actually is kind of a hidden multiple constraint dependency that probably has to be handled as such (but isn't yet). To stay with the concrete example a possible solution might be: If
#4695 would enter the game and ignore combinations that do not make sense. I'll have a look into this if I find some time. Not sure yet how complex such a change will be. |
I implemented the concept mentioned in #5506 (comment) and it seems to resolve this issue. Unfortunately, it's not mergeable due to performance issues. Nevertheless, I created a (draft) PR that someone who's interested can take as a starting point or inspiration. |
@radoering Thanks for sharing! I'd be keen to dig deeper and see what I can do. |
Use short options for `tr` and `cut`, for compatibility with the macOS tools. Installing GDAL with Conda is one of the few cross-platform installation methods available: - GDAL 3.4.1 is not available for installation with brew <https://formulae.brew.sh/formula/gdal>. - Poetry ignores declaration of different versions for macOS and Linux <python-poetry/poetry#5506>.
Use short options for `tr` and `cut`, for compatibility with the macOS tools. Installing GDAL with Conda is one of the few cross-platform installation methods available: - GDAL 3.4.1 is not available for installation with brew <https://formulae.brew.sh/formula/gdal>. - Poetry ignores declaration of different versions for macOS and Linux <python-poetry/poetry#5506>.
Use short options for `tr` and `cut`, for compatibility with the macOS tools. Installing GDAL with Conda is one of the few cross-platform installation methods available: - GDAL 3.4.1 is not available for installation with brew <https://formulae.brew.sh/formula/gdal>. - Poetry ignores declaration of different versions for macOS and Linux <python-poetry/poetry#5506>.
Use short options for `tr` and `cut`, for compatibility with the macOS tools. Installing GDAL with Conda is one of the few cross-platform installation methods available: - GDAL 3.4.1 is not available for installation with brew <https://formulae.brew.sh/formula/gdal>. - Poetry ignores declaration of different versions for macOS and Linux <python-poetry/poetry#5506>. Unfortunately Conda does not yet support Python 3.11 <conda/conda#11170>, so I've dropped that.
Use short options for `tr` and `cut`, for compatibility with the macOS tools. Installing GDAL with Conda is one of the few cross-platform installation methods available: - GDAL 3.4.1 is not available for installation with brew <https://formulae.brew.sh/formula/gdal>. - Poetry ignores declaration of different versions for macOS and Linux <python-poetry/poetry#5506>. Unfortunately Conda does not yet support Python 3.11 <conda/conda#11170>, so I've dropped that.
Use short options for `tr` and `cut`, for compatibility with the macOS tools. Installing GDAL with Conda is one of the few cross-platform installation methods available: - GDAL 3.4.1 is not available for installation with brew <https://formulae.brew.sh/formula/gdal>. - Poetry ignores declaration of different versions for macOS and Linux <python-poetry/poetry#5506>. Unfortunately Conda does not yet support Python 3.11 <conda/conda#11170>, so I've dropped that.
I have worked around this problem by creating a custom PEP503c-ompliant jax repository that can be used in a |
I have a similar issue for markers, for e.g. having 2 packages: package1 and package2 with following [tool.poetry]
name = "package1"
version = "0.1.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.10"
torch = [
{ version="^1.13.0", markers = "sys_platform == 'darwin'", python = "<3.11" },
]
package2 = { path = "../package2" }
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "package2"
version = "0.1.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.10"
torch = [
{ version=">=1.12.0", markers = "sys_platform == 'darwin'", python = "<3.11" },
{ version="1.12.0", markers = "sys_platform == 'linux'", python = "<3.11" },
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" when
Here's a log from running it with Still, when running
|
Just to give some cents to it... I have the same issue, which is somewhat a dealbreaker for my current setup... or can we provide platformspecific
Gets the following error:
Is there a possibility to make a platform dependent dependency section. E.g. something like:
|
I dont' think platform-specific override is a good solution, consider we alreay have I think the "right" solution would be supporting soluting to multiple version of same package |
Hi! Here from #9573. Is this issue being fixed in the foreseeable future? |
Unfortunately, I do not think so. #6969 is the only approach so far. |
Understood. Thanks for the feedback. |
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 (
-vvv
option).OS version and name: macOS Monterey 12.3.1
Poetry version: 1.1.13
Link of a Gist with the contents of your pyproject.toml file: Here
Issue
The solver breaks when faced with dependencies A and B that are both conditional but where A depends on B only sometimes.
Consider these lines from the attached
pyproject.toml
The intent here is "Install dbt==0.19.2 and dbt-bigquery==0.19.2 when
sys_platform
is not'darwin'
; else installdbt-bigquery==^1.0.0
. When trying to install on a machine usingsys_platform == 'darwin'
I get:The same error is reached when those pyproject.toml lines are replaced by
By contrast, note that this pyproject.toml:
resolves.
The text was updated successfully, but these errors were encountered: