-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Issue Kind
Change in current behaviour
Description
Issue 2425 makes a request to allow adding markers to packages with add. In the issue, a contributor claimed that this functionality was added in version 1.2, but that doesn't seem to be the case. I commented asking for clarification, as did others, but nothing was ever resolved. The issue has been closed, so I am opening this one to replace it and either get clarification on what I'm doing wrong (in case this functionality does exist and I've overlooked it) or to get the functionality added.
Problem: This does not work
$ poetry add -G dev ansible-lint
Because no versions of ansible-lint match >24.2.1,<25.0.0
and ansible-lint (24.2.1) depends on will-not-work-on-windows-try-from-wsl-instead (*), ansible-lint (>=24.2.1,<25.0.0) requires will-not-work-on-windows-try-from-wsl-instead (*).
So, because no versions of will-not-work-on-windows-try-from-wsl-instead match *
and k3s depends on ansible-lint (^24.2.1), version solving failed.What I want:
poetry add ansible-lint --markers 'platform_system != "Windows"'or something equivalent.
Impact
You cannot install or update ansible-lint (possibly other things, but this is the one I know about) from poetry on the cli.
Workarounds
You can add the package to the pyproject.toml file manually with the markers, but then you have to update the lock manually and install the package.
You can install a really old version before the fake Windows dependency was added.
Neither of these are ideal.