]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
functools: Give up on lazy-importing types (#124736)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Sun, 29 Sep 2024 13:31:06 +0000 (06:31 -0700)
committerGitHub <noreply@github.com>
Sun, 29 Sep 2024 13:31:06 +0000 (06:31 -0700)
commit95581b35517f547b44e42631bd97ab4ba1a5c343
tree3e1eefcce1f6ce9847aee81cd1e914e29e1011ea
parent76fbee642e78eacf3866102f31e0ac969b57f1e6
functools: Give up on lazy-importing types (#124736)

PR #121089 added an eager import for types.MethodType, but
still left the existing hacks for lazily importing from types.

We could also create MethodType internally in functools.py (e.g.,
by using `type(Placeholder.__repr__)`, but it feels not worth it at
this point, so instead I unlazified all the usages of types in the
module.
Lib/functools.py