Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Conversation

stefanor
Copy link

@stefanor stefanor commented Nov 5, 2022

setuptools 60 uses its own bunlded version of distutils, by default. It injects this into sys.modules, at import time. So we need to make sure that it is imported, before anything else imports distutils, to ensure everything is using the same distutils version.

In this case, let's just remove distutils entirely.

This is to prepare for Python 3.12, which will drop distutils.

setuptools 60 uses its own bunlded version of distutils, by default.
It injects this into sys.modules, at import time. So we need to make
sure that it is imported, before anything else imports distutils, to
ensure everything is using the same distutils version.

This is to prepare for Python 3.12, which will drop distutils.
@stefanor stefanor changed the title Import setuptools before distutils Import setup from setuptools Nov 13, 2022
@stefanor
Copy link
Author

stefanor commented Dec 1, 2022

FWIW, the underlying bug I was describing is https://bugs.debian.org/1025216 but this change is still a worthwhile cleanup, I think.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant