summaryrefslogtreecommitdiff
path: root/changelog.d
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-01-06 23:30:19 +0100
committerJason R. Coombs <jaraco@jaraco.com>2022-01-08 11:55:35 -0500
commitcf21303f1ef9b143e76d613b253730c61edd97c2 (patch)
tree249e4769b961cdec92c49f32cc137a361945ba39 /changelog.d
parenta60fc6a3d5713ea96d2b9a28d9ca0c3d47db0295 (diff)
downloadpython-setuptools-git-cf21303f1ef9b143e76d613b253730c61edd97c2.tar.gz
Speedup startup of Python by importing less
``_distutils_hack`` is imported by a ``.pth`` file at every start of a Python interpreter. The import of costly modules like ``re`` and ``contextlib`` almost doubles the initial startup time of an interpreter. - replace ``contextlib`` with simple context manager and try/except - replace ``re`` with simple string match - move import of ``importlib`` into function body - remove ``warnings.filterwarnings()``, which imports ``re``, too. Fixes: #3006 Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'changelog.d')
0 files changed, 0 insertions, 0 deletions