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

union of multi-markers is broken #5593

Closed
dimbleby opened this issue May 11, 2022 · 4 comments · Fixed by python-poetry/poetry-core#352
Closed

union of multi-markers is broken #5593

dimbleby opened this issue May 11, 2022 · 4 comments · Fixed by python-poetry/poetry-core#352
Labels
kind/bug Something isn't working as expected

Comments

@dimbleby
Copy link
Contributor

def test_union_broken() -> None:
    m1 = parse_marker('python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32"')
    m2 = parse_marker('python_version >= "3.8" and python_version < "4.0"')

    union = m1.union(m2)
    assert str(union) == 'python_version >= "3.8" and python_version < "4.0"'

fails: the actual outcome is the same as the first marker.

@dimbleby dimbleby added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 11, 2022
@dimbleby
Copy link
Contributor Author

@radoering this sort of thing is right up your alley, if you're interested...

@dimbleby
Copy link
Contributor Author

broken at python-poetry/poetry-core#308, prior to which the output was ugly but correct:

python_version >= "3.8" and python_version < "4.0" and sys_platform == "win32" or python_version >= "3.8" and python_version < "4.0"

@abn abn mentioned this issue May 11, 2022
@radoering
Copy link
Member

@dimbleby Thanks for providing the test case. Seems like an easy fix.

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
3 participants