classification
Title: Some files from distutils module are importing all exceptions unnecessarily
Type: Stage: resolved
Components: Library (Lib) Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Leonardofreua, eric.araujo
Priority: normal Keywords:

Created on 2021-07-13 19:35 by Leonardofreua, last changed 2021-07-16 20:24 by Leonardofreua. This issue is now closed.

Messages (3)
msg397441 - (view) Author: Leonardo Freua (Leonardofreua) * Date: 2021-07-13 19:35
Some files from the distutils module are importing all the exceptions from the errors.py file unnecessarily, when in fact only a few of the Exception classes are used.

Could I open a PR by fixing the files that are making these unnecessary imports? Or is this problem in the same category as f-String refactorings?
msg397648 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2021-07-16 18:38
distutils is a special case in the standard library: complicated code with even private helpers used by code in the wild, so we are extra careful when changing things in there.  But I should say it used to be special, and we used to be careful: setuptools copied the whole of distutils into their repo to make it easier to change things, and there’s a PEP to remove distutils from the standard library.  Thanks for checking first!
msg397661 - (view) Author: Leonardo Freua (Leonardofreua) * Date: 2021-07-16 20:24
Hi Éric, thanks for the info.

I'm still learning about all the processes and how things work around here in order to avoid opening issues that no longer make sense.

Thanks you again.
History
Date User Action Args
2021-07-16 20:24:11Leonardofreuasetmessages: + msg397661
2021-07-16 18:38:24eric.araujosetstatus: open -> closed

type: enhancement ->
versions: - Python 3.9, Python 3.10, Python 3.11
nosy: + eric.araujo

messages: + msg397648
resolution: not a bug
stage: resolved
2021-07-13 19:35:40Leonardofreuacreate