Call for attention: pip’s migration path from distutils to sysconfig is narrowing

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.

4 Likes

I’ve desk-checked the change and approved (with one comment) but I’d prefer it if another core dev reviewed it as well. I haven’t looked at the comments from the distro maintainers on the bpo issue. If any of them significantly affect the decision about merging, someone else will need to get involved, as I don’t know enough about how the distros do things.

To get more visibility you will need to post to python-dev about this (this group is only followed by folks wanting to change the workflow).

1 Like

Thanks for the suggestion! I have cross-posted this to python-dev.

1 Like