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

typing-extensions shouldn't break black installation on Python 3.8 and 3.9 #2520

Closed
MaybeThisIsRu opened this issue Oct 5, 2021 · 4 comments
Labels
C: dependencies T: bug Something isn't working

Comments

@MaybeThisIsRu
Copy link

MaybeThisIsRu commented Oct 5, 2021

Describe the bug

When pipenv tries to lock dependencies, the following sub-dependency error arises:

✘ Locking Failed! 
[ResolutionFailure]:   File "/home/ru/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 741, in _main
[ResolutionFailure]:       resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
[ResolutionFailure]:   File "/home/ru/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 702, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:   File "/home/ru/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 684, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:   File "/home/ru/.local/lib/python3.9/site-packages/pipenv/utils.py", line 1397, in resolve_deps
[ResolutionFailure]:       results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]:   File "/home/ru/.local/lib/python3.9/site-packages/pipenv/utils.py", line 1110, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/home/ru/.local/lib/python3.9/site-packages/pipenv/utils.py", line 835, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches typing-extensions>=3.10.0.0,~=3.7.4.2 (from black==21.9b0->-r /tmp/pipenvwy0b124trequirements/pipenv-jp_9ytoa-constraints.txt (line 5))
Tried: 3.6.2, 3.6.2, 3.6.2.1, 3.6.2.1, 3.6.5, 3.6.5, 3.6.6, 3.6.6, 3.7.2, 3.7.2, 3.7.4, 3.7.4, 3.7.4.1, 3.7.4.1, 3.7.4.2, 3.7.4.2, 3.7.4.3, 3.7.4.3, 3.10.0.0, 3.10.0.0, 3.10.0.1, 3.10.0.1, 3.10.0.2, 3.10.0.2
There are incompatible versions in the resolved dependencies:
  typing-extensions>=3.10.0.0 (from black==21.9b0->-r /tmp/pipenvwy0b124trequirements/pipenv-jp_9ytoa-constraints.txt (line 5))
  typing-extensions~=3.7.4.2 (from statham-schema==0.13.4->toshling==0.0.4->-r /tmp/pipenvwy0b124trequirements/pipenv-jp_9ytoa-constraints.txt (line 6))

To Reproduce

Ensure you have pipenv.

  • mkdir sample-project && cd sample-project
  • pipenv --python 3.9
  • pipenv install toshling
  • pipenv install --pre --dev black
  • pipenv fails to lock.

Expected behavior

  • pipenv locks successfully.

Environment (please complete the following information):

  • Pop!_OS 20.04 LTS
  • Python 3.9.7
  • black 21.90b
  • asdf v0.8.1-a1ef92a
  • pipenv, version 2021.5.29

Additional context:

Looks like black recently had a PR #2460 for Python 3.10, which removes the earlier work on #1873. This likely leaves Python 3.8 and 3.9 in a pickle.

@MaybeThisIsRu MaybeThisIsRu added the T: bug Something isn't working label Oct 5, 2021
@MaybeThisIsRu
Copy link
Author

Running black==21.7b0 for Python 3.9.7 at the moment, thanks to #2465 (comment). This works fine.

@JelleZijlstra
Copy link
Collaborator

Seems like the issue is that we require 3.10.0.0 and statham-schema requires 3.7.4.2. Could you instead ask the other library to update their dependency?

@ichard26
Copy link
Collaborator

ichard26 commented Oct 5, 2021

FYI unless we want to drop the usage of TypeGuard in the codebase we can't really do anything as typing-extensions 3.10.0.0 is the first version to contain it. PR #2460 isn't related here as typing-extensions was already re-required for 3.8 / 3.9 via the Jupyter PR #2357.

@ichard26
Copy link
Collaborator

Given there hasn't been any further activity asking for us to undo our modern typing-extension requirements I'll be closing this issue as it has nothing actionable as of right now. I'll be happy to reopen if a stronger case is made to why we should remove the pin. Thanks for chiming in @hirusi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: dependencies T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants