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

Eliminate use of distutils.version.StrictVersion, use LooseVersion instead #4476

Merged
merged 6 commits into from
Mar 13, 2024

Commits on Mar 6, 2024

  1. Eliminate use of distutils.version.StrictVersion

    distutils was removed in Python 3.12. The only reason EasyBuild uses
    StrictVersion is that it orders beta/rc versions before the released
    version, unlike LooseVersion. E.g. 5.0.0-beta < 5.0.0 (but > for
    LooseVersion).
    
    So a new method
    `is_earlier_or_prerelease(self, other, markers)`
    was added to LooseVersion to handle that particular case.
    
    Addresses part of easybuilders#3963
    bartoldeman committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    e9cec34 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7d97620 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    03c0b3d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    303f453 View commit details
    Browse the repository at this point in the history
  5. Use is_prerelase instead of is_earlier_or_prerelease.

    In the end this is clearer because we also need to test against a
    maximum version (but it is allowed to be a prerelease of that
    maximum version, as per StrictVersion semantics!)
    bartoldeman committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    8f22651 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Apply suggestions from code review

    Flip order of `is_prerelease` and version check for clarity.
    
    Co-authored-by: Kenneth Hoste <kenneth.hoste@ugent.be>
    bartoldeman and boegel committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    a6fda46 View commit details
    Browse the repository at this point in the history