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

Version specification for black makes poetry fail #52

Closed
wasdee opened this issue Aug 13, 2020 · 3 comments
Closed

Version specification for black makes poetry fail #52

wasdee opened this issue Aug 13, 2020 · 3 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@wasdee
Copy link

wasdee commented Aug 13, 2020

It seems like poetry doesn't understand * version.

 poetry add --dev darker
Using version ^1.0.0 for darker

Updating dependencies
Resolving dependencies...

[SolverProblemError]
Because no versions of darker match >1.0.0,<2.0.0
 and darker (1.0.0) depends on black (*), darker (>=1.0.0,<2.0.0) requires black (*).
So, because no versions of black match *
 and gebwai-backend depends on darker (^1.0.0), version solving failed.
@akaihola
Copy link
Owner

akaihola commented Aug 13, 2020

Hi @CircleOnCircles,

Thanks for the report!

I looked but didn't yet find out where the * asterisk comes from.

In darker 1.0.0 setup.cfg we have:

install_requires =
    black
    typing-extensions ; python_version < "3.8"

Looking inside darker-1.0.0-py3-none-any.whl on PyPI, we have:

$ unzip -p darker-1.0.0-py3-none-any.whl darker-1.0.0.dist-info/METADATA|grep Requires-Dist
Requires-Dist: black
Requires-Dist: typing-extensions ; python_version < "3.8"
Requires-Dist: isort (>=5.0.1) ; extra == 'isort'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-black ; extra == 'test'
Requires-Dist: pytest-isort (>=1.1.0) ; extra == 'test'
Requires-Dist: pytest-mypy ; extra == 'test'

and in darker-1.0.0.tar.gz:

$ tar xOf darker-1.0.0.tar.gz darker-1.0.0/setup.cfg | grep -A3 install_requires
install_requires = 
	black
	typing-extensions ; python_version < "3.8"
python_requires = >=3.6

$ tar xOf darker-1.0.0.tar.gz darker-1.0.0/src/darker.egg-info/requires.txt                    
black

[:python_version < "3.8"]
typing-extensions

[isort]
isort>=5.0.1

[test]
pytest
pytest-black
pytest-isort>=1.1.0
pytest-mypy

@akaihola akaihola added help wanted Extra attention is needed question Further information is requested labels Aug 13, 2020
@akaihola
Copy link
Owner

So @CircleOnCircles is this a Poetry bug (python-poetry/poetry#2687?) or can we do something in Darker to fix this problem?

@wasdee
Copy link
Author

wasdee commented Aug 19, 2020

Yes, I guess.
At first, I thought we might be able to do a hotfix like specify the version. I had tried to explore the source code related to version dep. I came to the same conclusion as you.

@wasdee wasdee closed this as completed Aug 19, 2020
@akaihola akaihola changed the title version specification for black makes poetry fails Version specification for black makes poetry fail Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants