ioces / toshling

a Python client library for the Toshl API
MIT License
4 stars 1 forks source link

Cannot use black and toshling together #7

Closed MaybeThisIsRu closed 2 years ago

MaybeThisIsRu commented 2 years ago

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))

Environment

MaybeThisIsRu commented 2 years ago

Looks like black recently had a PR https://github.com/psf/black/pull/2460 for Python 3.10, which removes the earlier work on https://github.com/psf/black/pull/1873. This likely leaves Python 3.8 and 3.9 in a pickle.

MaybeThisIsRu commented 2 years ago

Ah, this should likely have been opened on black...