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

Dummy dependency problem during install of ansible-lint #1575

Closed
1 task done
la-magra opened this issue Dec 17, 2022 · 4 comments · Fixed by j178/pdm#1
Closed
1 task done

Dummy dependency problem during install of ansible-lint #1575

la-magra opened this issue Dec 17, 2022 · 4 comments · Fixed by j178/pdm#1
Labels
🐛 bug Something isn't working

Comments

@la-magra
Copy link

la-magra commented Dec 17, 2022

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

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

Context

This is a follow up to the following issues:

ansible/ansible-lint#2712 the thing that started it all

But most recent release v6.10.0 ansible/ansible-lint#2807 drops setup.cfg (finally...), but the problem remains.

ansible/ansible-lint#2816 the "pip works, we don't care about anything else".

python-poetry/poetry#7112 (comment) the poetry workaround

In short, ansible-lint decided to use a dummy/fake package (will-not-work-on-windows-try-from-wsl-instead; platform_system == "Windows") to stop installation on that unsupported platform.

edit. Feels related to #1535

Steps to reproduce

$ pdm --version
PDM, version 2.3.3

$ pdm init
...

$ pdm add -d 'ansible-lint'
Adding packages to dev dev-dependencies: ansible-lint
See /tmp/pdm-lock-7z2owtju.log for detailed debug log.
[CandidateNotFound]: Unable to find candidates for will-not-work-on-windows-try-from-wsl-instead. There may exist some issues with the package name or network condition.
Add '-v' to see the detailed traceback

Also trying the poetry workaround by adding the platform_system

#pyproject.toml
...
[tool.pdm]
[tool.pdm.dev-dependencies]
dev = [
    "ansible-lint<7.0.0,>=6.0.0; platform_system != \"Windows\"",
]
...

then running pdm install yields the same results.

Actual behavior

Package ansible-lint does not install.

Expected behavior

It unfortunately should, even with their horrendous dependency...

Environment Information

$ pdm info && pdm info --env
PDM version:
  2.3.3
Python Interpreter:
  /home/****/ansible-lint-test/.venv/bin/python (3.11)
Project Root:
  /home/****/ansible-lint-test
Project Packages:
  None
{
  "implementation_name": "cpython",
  "implementation_version": "3.11.1",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "6.0.12-arch1-1",
  "platform_system": "Linux",
  "platform_version": "#1 SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:38 +0000",
  "python_full_version": "3.11.1",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "linux"
}
@la-magra la-magra added the 🐛 bug Something isn't working label Dec 17, 2022
@frostming
Copy link
Collaborator

Add the following to pyproject.toml:

[tool.pdm.resolution.overrides]
will-not-work-on-windows-try-from-wsl-instead = "0.1.0"

@la-magra
Copy link
Author

Wonderful, thank you.

@mledoze
Copy link

mledoze commented Jan 13, 2023

Thanks for the fix.

Unfortunately this does not work with Python 3.9 although ansible-lint requires Python >=3.8. It's because the dummy dependency will-not-work-on-windows-try-from-wsl-instead requires Python >=3.11. It does not make sense to me because this package has no code.

@la-magra
Copy link
Author

la-magra commented Jan 17, 2023

Confirmed...

$ pdm update
�� Lock failed
Unable to find a resolution because the following dependencies don't work on all Python versions defined by the project's `requires-python`: >=3.9.
  python>=3.11,<4.0 (from <Candidate will-not-work-on-windows-try-from-wsl-instead@0.1.0 from https://pypi.org/simple/will-not-work-on-windows-try-from-wsl-instead/>)
To fix this, you can change the value of `requires-python` in pyproject.toml.

For some damned reason https://pypi.org/project/will-not-work-on-windows-try-from-wsl-instead/ is a yanked release AND defined a requires: Python >=3.11, <4.0

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

Successfully merging a pull request may close this issue.

3 participants