A while ago, I proposed pip’s migration plan from distutils to sysconfig, in preparation of distuitls’s deprecation and planned removal in Python 3.12. When working on the implementation, however, I realised sysconfig currently lacks important abstractions that pip needs to correctly interface with downstream Python redistributors and alternative Python implementations. I raised the issue in b.p.o.43312 and provided a pull request, but failed to progress things forward.
With only one alpha window left, time is running out for the change to make it into 3.10. If this has to wait for 3.11, pip will be left with only one year to perform the migration away from distutils and detect possible backward incompatibilities, which, since Python packaging tends to have a very long tail of users on older Python versions, would make the distutils removal extremely disruptive.
I wish this does not sound like I’m pressuring people to accept my patch; that is not my intention at all. I do, however, very strongly feel pip’s inability to remove distutils dependence is not taken seriously enough, and will be very problematic if the status quo continues. Either something is done for sysconfig in Python 3.10, or distutils’s removal must be delayed indefinitely until pip is able to replace its distutils usages with stdlib replacements. Otherwise, 3.12 users will not be able to use pip.