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

[Docs] Improve documentation about migration from distutils #3171

Merged
merged 4 commits into from Mar 13, 2022

Conversation

abravalheri
Copy link
Contributor

Summary of changes

  • State that the local copy of distutils is active by default
  • Recommend logging instead of distutils.log
  • Link PEP 632 migration advice.

Closes

Pull Request Checklist

@abravalheri abravalheri merged commit a2e8ef9 into pypa:main Mar 13, 2022
@abravalheri abravalheri deleted the improve-distutils-legacy-doc branch March 13, 2022 21:19
@matteius
Copy link
Member

@abravalheri Hi again, now I am investigating build CI failures in requirementslib. It seems at some point before I was working on the project the build started failing with:

/home/matteius/requirementslib/.nox/coverage/lib/python3.9/site-packages/_distutils_hack/init.py:17: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the distutils module in sys.modules. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.

I was scratching my head for a while until I found this PR with the updated documentation, and I tried setting export SETUPTOOLS_USE_DISTUTILS=stdlib and it was like magic causing the builld to run again and see what the actual test failures are. I am wondering now what the work around would be like to use the new default behavior, if you have ideas? Also, I see where distutils is going away at some-point, so does that mean usage such as from setuptools.dist import Distribution, distutils is going to further break soon? Thanks for your insights!

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.

None yet

2 participants