pytest-tui icon indicating copy to clipboard operation
pytest-tui copied to clipboard

DEPRECATION warning when installing from repo using `pip install -e .`

Open jeffwright13 opened this issue 3 years ago • 1 comments


DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621

jeffwright13 avatar Sep 19 '22 02:09 jeffwright13

Quoting @uranusjr from https://github.com/orgs/Homebrew/discussions/1405:

I am one of the maintainers of pip, the Python package installer. We are recently informed that Homebrew is currently using distutils.cfg to configure package installation schemes, and we believe it is best for Homebrew to remove the usage.

Python is currently deprecating distutils, and will remove the module entirely in 3.10 (PEP 632). As a part of the transition, pip is moving all its current distutils usages to the sysconfig module instead, and a user recently reported pip would no longer work correctly with Homebrew-compiled Python after the transision. This is due to Homebrew’s usage of distutils.cfg, which is no longer supported in sysconfig.

The distutils.cfg file (and its various variants) has long been disfavoured by Python core maintainers, and the recommendation, if redistributors wish to provide custom install schemes, has been to directly patch distutils and sysconfig instead. This is the current approach taken by all Linux distributions that we have contact with, and the community is working toward providing better support to the patching process (b.p.o-43976). I’m recommending Homebrew to also migrate away from the distutils.cfg usage, since it is going to break while the community continuously migrate away from distutils, and stop working entirely when Python 3.12 lands, and join the conversation with other Python redistributors to improve sysconfig to support Homebrew’s needs.

jeffwright13 avatar Sep 19 '22 02:09 jeffwright13