FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

functools: Give up on lazy-importing types by JelleZijlstra · Pull Request #124736 · python/cpython · GitHub

Repository navigation

functools: Give up on lazy-importing types - #124736

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
JelleZijlstra:functotypes
Sep 29, 2024
Merged

JelleZijlstra merged 1 commit into
python:mainfrom
JelleZijlstra:functotypes

Conversation

JelleZijlstra commented Sep 28, 2024 •
edited
Loading

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member Author

cc @serhiy-storchaka

serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

JelleZijlstra merged commit 95581b3 into python:main Sep 29, 2024
JelleZijlstra deleted the functotypes branch September 29, 2024 13:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL