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

Poetry cant resolve with git dependency #991

Closed
mozartilize opened this issue Mar 27, 2019 · 4 comments · Fixed by #1458
Closed

Poetry cant resolve with git dependency #991

mozartilize opened this issue Mar 27, 2019 · 4 comments · Fixed by #1458
Assignees
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected

Comments

@mozartilize
Copy link

I have werkzeug installed with git version and then add flask-jwt-extended shows error though werkzeug is 1.0.0.dev0

$ poetry --version
Poetry 0.12.11
$ cat pyproject.toml
[tool.poetry]
name = "test-poetry-git-deps"
version = "0.1.0"
description = ""
authors = []

[tool.poetry.dependencies]
python = "^3.6"
werkzeug = {git = "https://github.com/pallets/werkzeug.git"}

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
$ cat poetry.lock
[[package]]
category = "main"
description = "The comprehensive WSGI web application library."
name = "Werkzeug"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "1.0.0.dev0"

[package.source]
reference = "86f7bdf6d7c005d3ab8be50226fe42edc1ce4f7c"
type = "git"
url = "https://github.com/pallets/werkzeug.git"
[metadata]
content-hash = "7d88d5e01ecd59f104fee20ece9f80aa3b98bc2a281afc0975c36010d6af2648"
python-versions = "^3.6"

[metadata.hashes]
Werkzeug = []
$ poetry add flask-jwt-extended
Using version ^3.18 for flask-jwt-extended

Updating dependencies
Resolving dependencies... (6.9s)
                                                                                                                               
[SolverProblemError]                                                                                            
Because no versions of flask-jwt-extended match >3.18,<4.0                                                                   
 and flask-jwt-extended (3.18.0) depends on Werkzeug (>=0.14), flask-jwt-extended (>=3.18,<4.0) requires Werkzeug (>=0.14).  
So, because no versions of werkzeug match >=0.14                                                                             
 and test-poetry-git-deps depends on flask-jwt-extended (^3.18), version solving failed.                                     
                                                                                                                               
add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...
$ poetry show                                                                                                                                                                                                                                   
Werkzeug 1.0.0.dev0 86f7bdf The comprehensive WSGI web application library.
@drunkwcodes
Copy link

Did you know #736?

@mozartilize
Copy link
Author

@drunkwcodes i dont think it's the same problem

@techdragon
Copy link

techdragon commented Apr 23, 2019

I also have this problem. In my case its django from the git branch (the stable/2.2.x branch), and the majority of packages that are dependent on django, will produce a complaint that they cant find a dependency, which will look something like this.

[SolverProblemError]
Because no versions of django-dirtyfields match >=1.3,<1.3.1 || >1.3.1,<2.0
 and django-dirtyfields (1.3.1) depends on Django (>=1.8), django-dirtyfields (>=1.3,<2.0) requires Django (>=1.8).
So, because no versions of django match >=1.8 

The version of django changes depending on what the package is looking for, so the overall problem seems to be that poetry is not using the git version of a package (in my case django, in the OP, case werkzeug) to satisfy requirements in subsequent dependency resolution runs.

EDIT: Clarified inadvertent use of dependencies when I meant dependent packages.

Copy link

github-actions bot commented Mar 3, 2024

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 Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/solver Related to the dependency resolver kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants