Skip to content

Can't add both wemake-python-styleguide and flake8 in a project #1307

Closed
@vadim-su

Description

  • 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

Separate installation
pdm add -d pytest wemake-python-styleguide autopep8 --dry       
Adding packages to dev dev-dependencies: pytest, wemake-python-styleguide, autopep8
🔒 Lock successful
Packages to add:
  - astor 0.8.1
  - attrs 22.1.0
  - autopep8 1.6.0
  - bandit 1.7.4
  - darglint 1.8.1
  - docutils 0.19
  - eradicate 2.1.0
  - flake8 4.0.1
  - flake8-bandit 3.0.0
  - flake8-broken-line 0.4.0
  - flake8-bugbear 22.7.1
  - flake8-commas 2.1.0
  - flake8-comprehensions 3.10.0
  - flake8-debugger 4.1.2
  - flake8-docstrings 1.6.0
  - flake8-eradicate 1.2.1
  - flake8-isort 4.2.0
  - flake8-polyfill 1.0.2
  - flake8-quotes 3.3.1
  - flake8-rst-docstrings 0.2.7
  - flake8-string-format 0.3.0
  - gitdb 4.0.9
  - gitpython 3.1.27
  - iniconfig 1.1.1
  - isort 5.10.1
  - mccabe 0.6.1
  - packaging 21.3
  - pbr 5.9.0
  - pep8-naming 0.12.1
  - pluggy 1.0.0
  - py 1.11.0
  - pycodestyle 2.8.0
  - pydocstyle 6.1.1
  - pyflakes 2.4.0
  - pygments 2.12.0
  - pyparsing 3.0.9
  - pytest 7.1.2
  - pyyaml 6.0
  - restructuredtext-lint 1.4.0
  - setuptools 63.4.2
  - smmap 5.0.0
  - snowballstemmer 2.2.0
  - stevedore 4.0.0
  - toml 0.10.2
  - tomli 2.0.1
  - typing-extensions 4.3.0
  - wemake-python-styleguide 0.16.1
pdm add -d pytest flake8 autopep8 --dry  
Adding packages to dev dev-dependencies: pytest, flake8, autopep8
🔒 Lock successful
Packages to add:
  - attrs 22.1.0
  - autopep8 1.6.0
  - flake8 5.0.4
  - iniconfig 1.1.1
  - mccabe 0.7.0
  - packaging 21.3
  - pluggy 1.0.0
  - py 1.11.0
  - pycodestyle 2.9.1
  - pyflakes 2.5.0
  - pyparsing 3.0.9
  - pytest 7.1.2
  - toml 0.10.2
  - tomli 2.0.1
Both package installation (WARN! Too many words)
Adding packages to dev dev-dependencies: pytest, wemake-python-styleguide, flake8, autopep8
pdm.termui: ======== Start resolving requirements ========
pdm.termui:   pytest
pdm.termui:   wemake-python-styleguide
pdm.termui:   flake8
pdm.termui:   autopep8
pdm.termui:   python>=3.10
pdm.termui:   Adding requirement pytest
pdm.termui:   Adding requirement wemake-python-styleguide
pdm.termui:   Adding requirement flake8
pdm.termui:   Adding requirement autopep8
pdm.termui:   Adding requirement python>=3.10
pdm.termui: ======== Starting round 0 ========
pdm.termui: Pinning: python None
pdm.termui: ======== Ending round 0 ========
pdm.termui: ======== Starting round 1 ========
pdm.termui:   Adding requirement pycodestyle>=2.8.0(from autopep8 1.6.0)
pdm.termui:   Adding requirement toml(from autopep8 1.6.0)
pdm.termui: Pinning: autopep8 1.6.0
pdm.termui: ======== Ending round 1 ========
pdm.termui: ======== Starting round 2 ========
pdm.termui:   Adding requirement mccabe<0.8.0,>=0.7.0(from flake8 5.0.4)
pdm.termui:   Adding requirement pycodestyle<2.10.0,>=2.9.0(from flake8 5.0.4)
pdm.termui:   Adding requirement pyflakes<2.6.0,>=2.5.0(from flake8 5.0.4)
pdm.termui: Pinning: flake8 5.0.4
pdm.termui: ======== Ending round 2 ========
pdm.termui: ======== Starting round 3 ========
pdm.termui:   Adding requirement attrs>=19.2.0(from pytest 7.1.2)
pdm.termui:   Adding requirement iniconfig(from pytest 7.1.2)
pdm.termui:   Adding requirement packaging(from pytest 7.1.2)
pdm.termui:   Adding requirement pluggy<2.0,>=0.12(from pytest 7.1.2)
pdm.termui:   Adding requirement py>=1.8.2(from pytest 7.1.2)
pdm.termui:   Adding requirement tomli>=1.0.0(from pytest 7.1.2)
pdm.termui:   Adding requirement atomicwrites>=1.0; sys_platform == "win32"(from pytest 7.1.2)
pdm.termui:   Adding requirement colorama; sys_platform == "win32"(from pytest 7.1.2)
pdm.termui: Pinning: pytest 7.1.2
pdm.termui: ======== Ending round 3 ========
...
pdm.termui: ======== Starting round 72 ========
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.8.1)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.8.1)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.8.1)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.8.1)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.8.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.8.0)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.8.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.8.0)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.7.1)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.7.1)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.7.1)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.7.1)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.7.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.7.0)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.7.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.7.0)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.6.3)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.6.3)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.6.3)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.6.3)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.6.2)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.6.2)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.6.2)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.6.2)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.6.1)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.6.1)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.6.1)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.6.1)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.6.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.6.0)
pdm.termui:   Adding requirement astor<0.8.0,>=0.7.1(from wemake-python-styleguide 0.6.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.6.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.5.1)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.5.1)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.5.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.5.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.4.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.4.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.3.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.3.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.2.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.2.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.1.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.1.0)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.0.16)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.0.16)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.0.15)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.0.15)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.0.14)
pdm.termui:   Adding requirement attrs<19.0,>=18.2(from wemake-python-styleguide 0.0.14)
pdm.termui:   Adding requirement flake8<4.0,>=3.5(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-bugbear<19.0,>=18.2(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-builtins<2.0,>=1.4(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-coding<2.0,>=1.3(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-commas<3.0,>=2.0(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-comprehensions<2.0,>=1.4(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-debugger<4.0,>=3.1(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-docstrings<2.0,>=1.3(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-isort<3.0,>=2.5(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-module-name<0.2,>=0.1(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-pep3101<2.0,>=1.2(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-quotes<2.0,>=1.0(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-string-format<0.3,>=0.2(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-super-call<2.0,>=1.0(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement pep8-naming<0.8,>=0.7(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement pycodestyle==2.3.1(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8<4.0,>=3.5(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-bugbear<19.0,>=18.2(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-builtins<2.0,>=1.4(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-coding<2.0,>=1.3(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-commas<3.0,>=2.0(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-comprehensions<2.0,>=1.4(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-debugger<4.0,>=3.1(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-docstrings<2.0,>=1.3(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-isort<3.0,>=2.5(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-module-name<0.2,>=0.1(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-pep3101<2.0,>=1.2(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-quotes<2.0,>=1.0(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-string-format<0.3,>=0.2(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8-super-call<2.0,>=1.0(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement pep8-naming<0.8,>=0.7(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement pycodestyle==2.3.1(from wemake-python-styleguide 0.0.13)
pdm.termui:   Adding requirement flake8<4.0,>=3.5(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-blind-except<0.2,>=0.1(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-bugbear<19.0,>=18.2(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-builtins<2.0,>=1.4(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-coding<2.0,>=1.3(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-commas<3.0,>=2.0(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-comprehensions<2.0,>=1.4(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-debugger<4.0,>=3.1(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-docstrings<2.0,>=1.3(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-isort<3.0,>=2.5(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-module-name<0.2,>=0.1(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-pep3101<2.0,>=1.2(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-quotes<2.0,>=1.0(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-string-format<0.3,>=0.2(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-super-call<2.0,>=1.0(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement pep8-naming<0.8,>=0.7(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement pycodestyle==2.3.1(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8<4.0,>=3.5(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-blind-except<0.2,>=0.1(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-bugbear<19.0,>=18.2(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-builtins<2.0,>=1.4(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-coding<2.0,>=1.3(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-commas<3.0,>=2.0(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-comprehensions<2.0,>=1.4(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-debugger<4.0,>=3.1(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-docstrings<2.0,>=1.3(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-isort<3.0,>=2.5(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-module-name<0.2,>=0.1(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-pep3101<2.0,>=1.2(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-quotes<2.0,>=1.0(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-string-format<0.3,>=0.2(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement flake8-super-call<2.0,>=1.0(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement pep8-naming<0.8,>=0.7(from wemake-python-styleguide 0.0.12)
pdm.termui:   Adding requirement pycodestyle==2.3.1(from wemake-python-styleguide 0.0.12)
unearth: Downloading <Link https://files.pythonhosted.org/packages/57/4e/016cd22b35095b5a4ecf12414550714c7170e683442ef0bd75ea2fe726f2/wemake_python_styleguide-0.0.1-py2.py3-none-any.whl (from None)> to /tmp/pdm-build-s81kt2ax/wemake_python_styleguide-0.0.1-py2.py3-none-any.whl
pdm.termui:   Adding requirement flake8(from wemake-python-styleguide 0.0.1)
pdm.termui: Pinning: wemake-python-styleguide 0.0.1
pdm.termui: ======== Ending round 72 ========
pdm.termui: ======== Starting round 73 ========
pdm.termui: Pinning: pyflakes 2.5.0
pdm.termui: ======== Ending round 73 ========
pdm.termui: ======== Starting round 74 ========
pdm.termui: Pinning: pycodestyle 2.9.1
pdm.termui: ======== Ending round 74 ========
pdm.termui: ======== Starting round 75 ========
pdm.termui: Pinning: mccabe 0.7.0
pdm.termui: ======== Ending round 75 ========
pdm.termui: ======== Starting round 76 ========
pdm.termui: Pinning: pluggy 1.0.0
pdm.termui: ======== Ending round 76 ========
pdm.termui: ======== Starting round 77 ========
pdm.termui: Pinning: atomicwrites 1.4.1
pdm.termui: ======== Ending round 77 ========
pdm.termui: ======== Starting round 78 ========
pdm.termui: Pinning: attrs 22.1.0
pdm.termui: ======== Ending round 78 ========
pdm.termui: ======== Starting round 79 ========
pdm.termui: Pinning: py 1.11.0
pdm.termui: ======== Ending round 79 ========
pdm.termui: ======== Starting round 80 ========
pdm.termui: Pinning: tomli 2.0.1
pdm.termui: ======== Ending round 80 ========
pdm.termui: ======== Starting round 81 ========
pdm.termui: Pinning: colorama 0.4.5
pdm.termui: ======== Ending round 81 ========
pdm.termui: ======== Starting round 82 ========
pdm.termui: Pinning: iniconfig 1.1.1
pdm.termui: ======== Ending round 82 ========
pdm.termui: ======== Starting round 83 ========
pdm.termui:   Adding requirement pyparsing!=3.0.5,>=2.0.2(from packaging 21.3)
pdm.termui: Pinning: packaging 21.3
pdm.termui: ======== Ending round 83 ========
pdm.termui: ======== Starting round 84 ========
pdm.termui: Pinning: toml 0.10.2
pdm.termui: ======== Ending round 84 ========
pdm.termui: ======== Starting round 85 ========
pdm.termui: Pinning: pyparsing 3.0.9
pdm.termui: ======== Ending round 85 ========
pdm.termui: ======== Starting round 86 ========
pdm.termui: ======== Resolution Result ========
pdm.termui: Stable pins:
pdm.termui:                     python None
pdm.termui:                   autopep8 1.6.0
pdm.termui:                     flake8 5.0.4
pdm.termui:                     pytest 7.1.2
pdm.termui:   wemake-python-styleguide 0.0.1
pdm.termui:                   pyflakes 2.5.0
pdm.termui:                pycodestyle 2.9.1
pdm.termui:                     mccabe 0.7.0
pdm.termui:                     pluggy 1.0.0
pdm.termui:               atomicwrites 1.4.1
pdm.termui:                      attrs 22.1.0
pdm.termui:                         py 1.11.0
pdm.termui:                      tomli 2.0.1
pdm.termui:                   colorama 0.4.5
pdm.termui:                  iniconfig 1.1.1
pdm.termui:                  packaging 21.3
pdm.termui:                       toml 0.10.2
pdm.termui:                  pyparsing 3.0.9
🔒 Lock successful
Traceback (most recent call last):
  File "/home/vscode/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/core.py", line 254, in main
    return Core().main(args)
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/core.py", line 187, in main
    raise cast(Exception, err).with_traceback(traceback)
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/core.py", line 182, in main
    f(options.project, options)
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/cli/commands/add.py", line 58, in handle
    actions.do_add(
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/cli/actions.py", line 290, in do_add
    do_sync(
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/cli/actions.py", line 203, in do_sync
    candidates = resolve_candidates_from_lockfile(project, requirements)
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/cli/actions.py", line 146, in resolve_candidates_from_lockfile
    mapping, *_ = resolve(
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/resolver/core.py", line 30, in resolve
    result = resolver.resolve(requirements, max_rounds)
  File "/home/vscode/.local/lib/python3.10/site-packages/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/vscode/.local/lib/python3.10/site-packages/resolvelib/resolvers.py", line 385, in resolve
    raise ResolutionImpossible(self.state.backtrack_causes)
resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=NamedRequirement(name='mccabe', marker=None, extras=set(), specifier=<SpecifierSet('<0.7.0,>=0.6.0')>, editable=False, prerelease=False), parent=<Candidate flake8 5.0.4 from unknown>)]

pdm.log

Actual behavior

pdm add -d pytest wemake-python-styleguide flake8 autopep8
...
Traceback (most recent call last):
  File "/home/vscode/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/core.py", line 254, in main
    return Core().main(args)
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/core.py", line 187, in main
    raise cast(Exception, err).with_traceback(traceback)
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/core.py", line 182, in main
    f(options.project, options)
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/cli/commands/add.py", line 58, in handle
    actions.do_add(
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/cli/actions.py", line 290, in do_add
    do_sync(
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/cli/actions.py", line 203, in do_sync
    candidates = resolve_candidates_from_lockfile(project, requirements)
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/cli/actions.py", line 146, in resolve_candidates_from_lockfile
    mapping, *_ = resolve(
  File "/home/vscode/.local/lib/python3.10/site-packages/pdm/resolver/core.py", line 30, in resolve
    result = resolver.resolve(requirements, max_rounds)
  File "/home/vscode/.local/lib/python3.10/site-packages/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/vscode/.local/lib/python3.10/site-packages/resolvelib/resolvers.py", line 385, in resolve
    raise ResolutionImpossible(self.state.backtrack_causes)
resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=NamedRequirement(name='mccabe', marker=None, extras=set(), specifier=<SpecifierSet('<0.7.0,>=0.6.0')>, editable=False, prerelease=False), parent=<Candidate flake8 5.0.4 from unknown>)]

Expected behavior

pdm add -d pytest wemake-python-styleguide flake8 autopep8 resolve deps correct.

Environment Information

pdm info && pdm info --env

PDM version:
  2.1.1
Python Interpreter:
  /workspaces/test_project/.venv/bin/python (3.10)
Project Root:
  /workspaces/test_project
Project Packages:
  None
{
  "implementation_name": "cpython",
  "implementation_version": "3.10.4",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.18.16-zen1-1-zen",
  "platform_system": "Linux",
  "platform_version": "#1 ZEN SMP PREEMPT_DYNAMIC Wed, 03 Aug 2022 11:25:10 +0000",
  "python_full_version": "3.10.4",
  "platform_python_implementation": "CPython",
  "python_version": "3.10",
  "sys_platform": "linux"
}

Temporary solution:

Execute commands one by one

pdm add -d pytest wemake-python-styleguide autopep8
pdm add -d flake8

The commands works correctly

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions