radio-astro-tools / spectral-cube

Library for reading and analyzing astrophysical spectral data cubes
http://spectral-cube.rtfd.org
BSD 3-Clause "New" or "Revised" License
96 stars 63 forks source link

Replace distutils.LooseVersion with packaging.version #901

Closed olebole closed 7 months ago

olebole commented 7 months ago

In Python 3.12, distutils does no longer exist. In spectral-cube it is used only for version comparison. This PR replaces it with packaging.version.parse resp. packaging.version.Version. On places where LooseVersion is unused, the import is just removed.

This should make the package compatible to Python 3.12; at least the tests that we run during the Debian build pass.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c548cf3) 79.95% compared to head (1fab31a) 79.94%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #901 +/- ## ========================================== - Coverage 79.95% 79.94% -0.02% ========================================== Files 24 24 Lines 6016 6013 -3 ========================================== - Hits 4810 4807 -3 Misses 1206 1206 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.