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

Drop LegacySpecifier and LegacyVersion #407

Merged
merged 7 commits into from Jul 8, 2022

Commits on Jul 8, 2022

  1. Reorder Specifier regex groups to check wildcard matches early

    This ensures that an `re.match` or `re.search` does not exclude the
    wildcard in cases where it would otherwise match. Without this
    reordering, a regex match of a wildcard specifier would only match the
    version sections before it since both parts of the prior part of the
    unnamed group are optional, allowing the group to match an empty string
    even though it is optional as a whole.
    
    This does not affect `Specifier` since the regex used by it gets a `$`
    added to it, forcing the regular expression engine to backtrack in such
    cases. It does, however, affect `Requirement` since it is currently
    allowing these values through since they match the regex for
    `LegacySpecifier`.
    pradyunsg committed Jul 8, 2022
    Copy the full SHA
    addd5c5 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    ed45c8c View commit details
    Browse the repository at this point in the history
  3. Remove LegacySpecifier class

    This class has been deprecated for multiple releases now.
    pradyunsg committed Jul 8, 2022
    Copy the full SHA
    2151dc0 View commit details
    Browse the repository at this point in the history
  4. Remove LegacyVersion class

    This class has been deprecated for multiple releases now.
    pradyunsg committed Jul 8, 2022
    Copy the full SHA
    2a16754 View commit details
    Browse the repository at this point in the history
  5. Merge _IndividualSpecifier and Specifier

    This also eliminates the `_IndividualSpecifier.prereleases`, which is
    no longer used.
    pradyunsg committed Jul 8, 2022
    Copy the full SHA
    134b659 View commit details
    Browse the repository at this point in the history
  6. Drop _require_version_compare

    This enforced that a `LegacyVersion` could not match a `Specifier`.
    Since `LegacyVersion` is no longer a thing, this check is no longer
    necessary.
    pradyunsg committed Jul 8, 2022
    Copy the full SHA
    c63e26c View commit details
    Browse the repository at this point in the history
  7. Factor out _coerce_version and use it to simplify a loop

    This makes the loop easier to understand.
    pradyunsg committed Jul 8, 2022
    Copy the full SHA
    5943a38 View commit details
    Browse the repository at this point in the history