-
-
Notifications
You must be signed in to change notification settings - Fork 530
Fix extracting extras from markers with many extras #2792
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
Conversation
What should be done with requirements like requires = [
Requirement('filelock<4.0.0,>=3.9.0; extra == "extras1" or extra == "extras2"'),
Requirement('sphinx>=3; extra == "extras1" and extra == "extras2"')
]
result = dependencies_with_extras(requires, {"extras1"}, "") What result is expected? |
Maybe its a bug in the poetry build backend, because setuptools makes different METADATA Requires-Dists
|
I'd say only filelock to show up, as sphinx needs both extra enabled.
Worth reporting it to them, but I think is valid to expect if something generates such to behave as my previous paragraph here describes. Can you add a test for it? |
@@ -51,6 +51,15 @@ def test_load_dependency_many_extra(pkg_with_extras: PathDistribution) -> None: | |||
assert str(left) == str(right) | |||
|
|||
|
|||
def test_load_dependency_poetry_many_extra() -> None: | |||
requires = [Requirement('filelock<4.0.0,>=3.9.0; extra == "extras1" or extra == "extras2"')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of naming it poetry let's just say it extra_or
👍 And lets add an extra_and
variant please?
Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's ship as is and do the and
handling as a follow-up.
@gaborbernat How many logic markers should tox handle? One? |
This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [tox](https://togithub.com/tox-dev/tox) ([changelog](https://tox.wiki/en/latest/changelog.html)) | dev | patch | `4.1.1` -> `4.1.2` | `4.2.8` (+9) | --- ### Release Notes <details> <summary>tox-dev/tox</summary> ### [`v4.1.2`](https://togithub.com/tox-dev/tox/releases/tag/4.1.2) [Compare Source](https://togithub.com/tox-dev/tox/compare/4.1.1...4.1.2) #### What's Changed - Fix --skip-missing-interpreters by [@​q0w](https://togithub.com/q0w) in [https://github.com/tox-dev/tox/pull/2793](https://togithub.com/tox-dev/tox/pull/2793) - Show installed packages after setup in CI envs by [@​gaborbernat](https://togithub.com/gaborbernat) in [https://github.com/tox-dev/tox/pull/2794](https://togithub.com/tox-dev/tox/pull/2794) - Fix extracting extras from markers with many extras by [@​q0w](https://togithub.com/q0w) in [https://github.com/tox-dev/tox/pull/2792](https://togithub.com/tox-dev/tox/pull/2792) **Full Changelog**: tox-dev/tox@4.1.1...4.1.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC45OS4yIiwidXBkYXRlZEluVmVyIjoiMzQuOTkuMiJ9--> Co-authored-by: descope[bot] <descope[bot]@users.noreply.github.com>
Thanks for contribution
Please, make sure you address all the checklists (for details on how see
development documentation)!
tox -e fix
)docs/changelog
folder