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

Cannot resolve simple dependency #264

Closed
1 task done
yajo opened this issue Feb 14, 2021 · 0 comments
Closed
1 task done

Cannot resolve simple dependency #264

yajo opened this issue Feb 14, 2021 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@yajo
Copy link

yajo commented Feb 14, 2021

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

➤ cat pyproject.toml 
[project]
name = ""
version = ""
description = ""
authors = [
    {name = "Jairo Llopis", email = "xxx"},
]
dependencies = [
    
    
]
dev-dependencies = []
requires-python = ">=3.6"
dynamic = ["classifiers"]
license = {text = "MIT"}

[project.urls]
homepage = ""

[tool]
[tool.pdm]

[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"

➤ pdm add git+https://github.com/pawamoy/pytkdocs.git@master#egg=pytkdocs -v
Adding packages to default dependencies: pytkdocs
======== Start resolving requirements ========
        git+https://github.com/pawamoy/pytkdocs.git@master#egg=pytkdocs
        Adding requirement git+https://github.com/pawamoy/pytkdocs.git@master#egg=pytkdocs
Preparing isolated env for PEP 517 build...
Collecting poetry-core
  Using cached poetry_core-1.0.2-py2.py3-none-any.whl (424 kB)
Installing collected packages: poetry-core
Successfully installed poetry-core-1.0.2
        Adding requirement dataclasses<0.9,>=0.7; python_version == "3.6"(from pytkdocs 0.10.1)
🔒 Lock failed
Unable to find a resolution that satisfies the following requirements:
  dataclasses<0.9,>=0.7; python_version == "3.6" (from <Candidate pytkdocs 0.10.1>)
Please make sure the package names are correct. If so, you can either loosen the version constraints of these dependencies, or set a narrower `requires-python` range in the pyproject.toml.
Traceback (most recent call last):
  File "/var/home/yajo/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 73, in __call__
    return self.main(*args, **kwargs)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 112, in main
    raise err.with_traceback(traceback)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 108, in main
    f(options.project, options)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/commands/add.py", line 35, in handle
    actions.do_add(
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/actions.py", line 169, in do_add
    resolved = do_lock(project, strategy, tracked_names, reqs)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/actions.py", line 69, in do_lock
    mapping, dependencies, summaries = resolve(
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/resolver/core.py", line 138, in resolve
    result = resolver.resolve(requirements, max_rounds)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/resolvelib/resolvers.py", line 453, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/resolvelib/resolvers.py", line 357, in resolve
    raise ResolutionImpossible(causes)
resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=<NamedRequirement dataclasses<0.9,>=0.7; python_version == "3.6">, parent=<Candidate pytkdocs 0.10.1>)]

Actual behavior

pdm cannot resolve this simple dependency requirement: https://github.com/mkdocstrings/pytkdocs/blob/4052eabdd45a7f4fe8c3fc8591bb23e1763a5a0f/pyproject.toml#L24

Expected behavior

It is perfectly resolvable.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
➤ pdm info && pdm info --env
PDM version:        1.3.0                   
Python Interpreter: /usr/bin/python3 (3.9.1)
Project Root:       /tmp/tmp.mdlDrk53Gi     
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.1",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.10.12-200.fc33.x86_64",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Mon Feb 1 02:40:52 UTC 2021",
  "python_full_version": "3.9.1",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.9",
  "sys_platform": "linux"
}
@yajo yajo added the 🐛 bug Something isn't working label Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant