Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Sep 28, 2024

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.

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.
@JelleZijlstra
Copy link
Member Author

cc @serhiy-storchaka

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We should rather focus on making import types faster.

@JelleZijlstra JelleZijlstra merged commit 95581b3 into python:main Sep 29, 2024
37 checks passed
@JelleZijlstra JelleZijlstra deleted the functotypes branch September 29, 2024 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants