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

Replace deprecated distutils.version.StrictVersion. #433

Merged
merged 1 commit into from
Oct 5, 2022

Commits on Sep 30, 2022

  1. Replace deprecated distutils.version.StrictVersion.

    distutils is deprecated as of Python 3.10. We were only using it for
    `StrictVersion`, which parses a version string and lets you order the
    result.
    
    The [official recommendation] from the packaging team is to replace
    `StrictVersion` with a dependency on the `packaging` package, but:
    
    1. The Python version parser was a little different from GPG versioning
       anyway because it's made for Python versions (it had support for
       "prerelease tags").
    2. I wanted to avoid adding dependencies if possible.
    
    [official recommendation]: pypa/packaging#520
    
    This PR adds a new `Version` class in `securesystemslib.gpg.util` and
    uses that instead.
    
    Signed-off-by: Zachary Newman <[email protected]>
    znewman01 committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    7d58b5b View commit details
    Browse the repository at this point in the history