Skip to content

Use packaging.version for comparing versions #10197

@cbrnr

Description

@cbrnr

Because distutils.Version is deprecated, we have our own _compare_version function (https://github.com/mne-tools/mne-python/blob/main/mne/fixes.py#L32-L55). However, I was wondering (1) why this is in fixes and (2) why we do not use packaging.version.Version instead (which according to the DeprecationWarning is the recommended replacement). I'm happy to implement the changes (and probably move it back to utils?) if you think it makes sense. @hoechenberger WDYT?

Edit: Then we could also remove the corresponding warning filter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions