Skip to content

fix: replace deprecated distutils.sysconfig with sysconfig#4640

Open
harshadkhetpal wants to merge 2 commits intozenml-io:mainfrom
harshadkhetpal:fix/replace-deprecated-distutils-2026-03-21
Open

fix: replace deprecated distutils.sysconfig with sysconfig#4640
harshadkhetpal wants to merge 2 commits intozenml-io:mainfrom
harshadkhetpal:fix/replace-deprecated-distutils-2026-03-21

Conversation

@harshadkhetpal
Copy link
Copy Markdown

Summary

Replace deprecated distutils.sysconfig.get_python_lib with the stdlib sysconfig.get_path function.

The distutils module was deprecated in Python 3.10 (PEP 632) and removed in Python 3.12. This change uses the sysconfig module (available since Python 3.2) as the recommended replacement.

Changes

  • Replace from distutils.sysconfig import get_python_lib with import sysconfig
  • Replace get_python_lib(standard_lib=True) with sysconfig.get_path('stdlib')

Both calls return the standard library root directory path, so behavior is preserved.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bcdurak
Copy link
Copy Markdown
Contributor

bcdurak commented Mar 24, 2026

@harshadkhetpal thank you for your contribution. Could you sign the CLA and choose develop as the target branch instead of main?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

⚠️ This PR has been inactive for 2 weeks and has been marked as stale.
Timeline:

  • Week 2 (now): First reminder - PR marked as stale
  • Week 4: PR will be automatically closed if no activity
    Please update this PR or leave a comment to keep it active. Any activity will reset the timer and remove the stale label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants