Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstraJelleZijlstra 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
MemberAuthor

cc @serhiy-storchaka

Copy link
Member

@serhiy-storchakaserhiy-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.

@JelleZijlstraJelleZijlstra merged commit 95581b3 into python:mainSep 29, 2024
@JelleZijlstraJelleZijlstra deleted the functotypes branch September 29, 2024 13:31
Sign up for freeto 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

@JelleZijlstra@serhiy-storchaka@AlexWaygood