Skip to content

Too long equal-star Python version marker is considered false #14270

@konstin

Description

@konstin

The following test case with a nonsensical marker currently fails in uv-pep508, as the marker is normalized to false, even though there is a possible match:

    #[test]
    fn maker_normalization_c() {
        let left_tree = MarkerTree::from_str("python_version == '3.10.0.*'").unwrap();
        let left = left_tree.try_to_string().unwrap();
        let right = "python_full_version >= '3.10' and python_full_version < '3.11";
        assert_eq!(left, right, "{left} != {right}");
    }

The marker is nonsensical as it's equivalent to the simpler and correctly working python_version == '3.10'.

Metadata

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