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

Don't use deprecated distutils module. #122

Merged
merged 2 commits into from
Jun 26, 2023
Merged

Conversation

sebastic
Copy link
Contributor

pygac/reader.py still uses the deprecated distutils which will be removed in Python 3.12.

From What’s New In Python 3.10:

The entire distutils package is deprecated, to be removed in Python 3.12. Its functionality for specifying package builds has already been completely replaced by third-party packages setuptools and packaging, and most other commonly used APIs are available elsewhere in the standard library (such as platform, shutil, subprocess or sysconfig). There are no plans to migrate any other functionality from distutils, and applications that are using other functions should plan to make private copies of the code. Refer to PEP 632 for discussion.

Porting from Distutils suggests using packaging.version instead of distutils.version.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for bringing this up to our attention! These changes look good, we just need to add packaging to the continuous-integration/environment.yaml file. Could you do that?

@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Merging #122 (2e01ce1) into main (748774e) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 2e01ce1 differs from pull request most recent head 4d68750. Consider uploading reports for the commit 4d68750 to get more accurate results

@@           Coverage Diff           @@
##             main     #122   +/-   ##
=======================================
  Coverage   74.39%   74.39%           
=======================================
  Files          32       32           
  Lines        2882     2882           
=======================================
  Hits         2144     2144           
  Misses        738      738           
Impacted Files Coverage Δ
pygac/reader.py 81.77% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sebastic sebastic requested a review from mraspaud February 21, 2023 08:43
Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mraspaud mraspaud merged commit 10a1a87 into pytroll:main Jun 26, 2023
@sebastic sebastic deleted the no-distutils branch June 26, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants