Skip to content

Make choice on case sensitivity for arbitrary equality (===) #974

@notatallshaw

Description

@notatallshaw

As part of implementing #943 in #954 it is unclear to me if arbitrary equality should be case sensitive or not.

There are two relevant parts of the spec:

Firstly, under normalization on case sensitivity:

All ascii letters should be interpreted case insensitively within a version and the normal form is lowercase. This allows versions such as 1.1RC1 which would be normalized to 1.1rc1.

Secondly, the first line of arbitrary equality:

Arbitrary equality comparisons are simple string equality operations which do not take into account any of the semantic information such as zero padding or local versions.

This line leaves me with two questions:

  • Is case sensitivity (and for that matter other normalization rules) "semantic information"?
  • And does "simple string equality operations" mean just ==, or can it mean .lower() == .lower()?

Currently arbitrary equality is case insensitive, but there are no tests to verify this, I will make two PRs, one that simply adds tests, and the other that changes the behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions