question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

flake8-black, pipenv, black dependency hell

See original GitHub issue

Some slight problems with the 0.1.1 release when using with pipenv. Because black does not yet have a “stable” release (unbelievably, its been coming “in a few weeks” for about 18 months now!), every single release of black must be installed with --pre flag with pipenv, unless an exact version match is specified.

However, with the 0.1.1 release of flake8-black, we’ve got two specifiers for black specified - “==19.3b0” from the project, and “>=19.3b0” from flake8-black. This makes pipenv look for the latest released version of black to install… except there is no latest release that is not a pre-release!

This is then double complicated by pipenv. There is no “–pre” flag for pipenv that applies just to a single package, so now in order to get a lock, we must allow all pre-release packages to be considered by pipenv. This is not ideal!

[pipenv.exceptions.ResolutionFailure]:       pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches black==19.3b0,>=19.3b0
[pipenv.exceptions.ResolutionFailure]:       Skipped pre-versions: 18.3a0, 18.3a0, 18.3a0, 18.3a0, 18.3a1, 18.3a1, 18.3a1, 18.3a1, 18.3a2, 18.3a2, 18.3a2, 18.3a2, 18.3a3, 18.3a3, 18.3a3, 18.3a3, 18.3a4, 18.3a4, 18.3a4, 18.3a4, 18.4a0, 18.4a0, 18.4a0, 18.4a0, 18.4a1, 18.4a1, 18.4a1, 18.4a1, 18.4a2, 18.4a2, 18.4a2, 18.4a2, 18.4a3, 18.4a3, 18.4a3, 18.4a3, 18.4a4, 18.4a4, 18.4a4, 18.4a4, 18.5b0, 18.5b0, 18.5b0, 18.5b0, 18.5b1, 18.5b1, 18.5b1, 18.5b1, 18.6b0, 18.6b0, 18.6b0, 18.6b0, 18.6b1, 18.6b1, 18.6b1, 18.6b1, 18.6b2, 18.6b2, 18.6b2, 18.6b2, 18.6b3, 18.6b3, 18.6b3, 18.6b3, 18.6b4, 18.6b4, 18.6b4, 18.6b4, 18.9b0, 18.9b0, 18.9b0, 18.9b0, 19.3b0, 19.3b0, 19.3b0, 19.3b0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
atwoodjwcommented, Oct 10, 2019

Use: pipenv install --pre

1reaction
peterjccommented, Sep 3, 2019

Where you said:

This makes pipenv look for the latest released version of black to install… except there is no latest release that is not a pre-release!

This comment seems directly relevant, https://github.com/pypa/pipenv/issues/1760#issuecomment-527366599

Just noting that pipenv isn’t currently abiding by one of the usability recommendations that was included in the PEP 440 specification. Specifically: “By default, dependency resolutions tools SHOULD … accept remotely available pre-releases for version specifiers where there is no final or post release that satisfies the version specifier”

This does to me seem like a problem in pipenv.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use black, flake8, and isort to format Python codes
With black you can format Python code from 2.7 all the way to 3.8 (as of version 20.8b1), which makes for a great...
Read more >
My Python Project Setup - SRCco.de
I used Pipenv before and converted the Pipfiles with dephell to ... There are still some dark corners with black+Flake8: black sometimes ...
Read more >
Why is python depency management such a mess? - Reddit
I'm trying to do some machine learning. Tensorflow version X isn't compatible with python version Y or Numpy version Z. This example from ......
Read more >
Configuring Visual Studio Code and Python (2020) - farr.ai
Poetry; Visual Studio/Jupyter Lab; Black; mypy; flake8; pytest ... Poetry is a dependency and package manager, and a virtual environment ...
Read more >
Python Best Practices for a New Project in 2021 | Hacker News
and might also not vendor dependencies, on the assumption that external ... pre-commit, Pylint rather than Flake8, Black, mypy (with a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found