René's URL Explorer Experiment


Title: gh-137855: Lazy import `inspect` module in dataclasses by danielhollas · Pull Request #144387 · python/cpython · GitHub

Open Graph Title: gh-137855: Lazy import `inspect` module in dataclasses by danielhollas · Pull Request #144387 · python/cpython

X Title: gh-137855: Lazy import `inspect` module in dataclasses by danielhollas · Pull Request #144387 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: inspect module is slow to import (see #117865) and is dragging down dataclasses with it. There are currently only two uses of inspect in dataclasses, but they are a bit tricky to inline since they ...

X Description: inspect module is slow to import (see #117865) and is dragging down dataclasses with it. There are currently only two uses of inspect in dataclasses, but they are a bit tricky to inline since they ...

Opengraph URL: https://github.com/python/cpython/pull/144387

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:22b6375b-ee26-4a8c-e22c-dc8d75493417
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id94CC:29AEE8:3810522:4AA1078:6B02137E
html-safe-nonce346847a702c6120aa5bff7bca526dcd05d2aac1326667122822b9c03ec5b0a5f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NENDOjI5QUVFODozODEwNTIyOjRBQTEwNzg6NkIwMjEzN0UiLCJ2aXNpdG9yX2lkIjoiNzA0NzA3NzE3MDIwNzkyMTAyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac60a3fa46b6cd3d3aef72beba438fa82d0d428821ec459bcf1192df9d823f8b30
hovercard-subject-tagpull_request:3234947531
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/144387/commits
twitter:imagehttps://opengraph.githubassets.com/7cb89c3cee758eb687346f5fc5729c389b15c6c227612339e44618c857d2074a/python/cpython/pull/144387
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7cb89c3cee758eb687346f5fc5729c389b15c6c227612339e44618c857d2074a/python/cpython/pull/144387
og:image:altinspect module is slow to import (see #117865) and is dragging down dataclasses with it. There are currently only two uses of inspect in dataclasses, but they are a bit tricky to inline since they ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanielhollas
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-cache
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/cpython/pull/144387/commits#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F144387%2Fcommits
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F144387%2Fcommits
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/144387/commits
Reloadhttps://github.com/python/cpython/pull/144387/commits
Reloadhttps://github.com/python/cpython/pull/144387/commits
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
JelleZijlstrahttps://github.com/JelleZijlstra
python:mainhttps://github.com/python/cpython/tree/main
danielhollas:dataclass-lazy-inspecthttps://github.com/danielhollas/cpython/tree/dataclass-lazy-inspect
Conversationhttps://github.com/python/cpython/pull/144387
Commits20 (20)https://github.com/python/cpython/pull/144387/commits
Checkshttps://github.com/python/cpython/pull/144387/checks
Files changedhttps://github.com/python/cpython/pull/144387/files
gh-137855: Lazy import inspect module in dataclasseshttps://github.com/python/cpython/pull/144387/commits#top
JelleZijlstrahttps://github.com/JelleZijlstra
python:mainhttps://github.com/python/cpython/tree/main
danielhollas:dataclass-lazy-inspecthttps://github.com/danielhollas/cpython/tree/dataclass-lazy-inspect
Lazy import `inspect` in dataclasses modulehttps://github.com/python/cpython/pull/144387/commits/4210688d516aff9286f3fa8735e968be26075377
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
4210688https://github.com/python/cpython/pull/144387/commits/4210688d516aff9286f3fa8735e968be26075377
https://github.com/python/cpython/tree/4210688d516aff9286f3fa8735e968be26075377
Simplify vendored unwrap functionhttps://github.com/python/cpython/pull/144387/commits/b1578d5bcb8ecaa02de3e4eb659e48f6093a611a
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
b1578d5https://github.com/python/cpython/pull/144387/commits/b1578d5bcb8ecaa02de3e4eb659e48f6093a611a
https://github.com/python/cpython/tree/b1578d5bcb8ecaa02de3e4eb659e48f6093a611a
Unvendor unwrap, call it only when neededhttps://github.com/python/cpython/pull/144387/commits/43e263378b550b79897dcc2c0ee5b39aeb85ce72
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
43e2633https://github.com/python/cpython/pull/144387/commits/43e263378b550b79897dcc2c0ee5b39aeb85ce72
https://github.com/python/cpython/tree/43e263378b550b79897dcc2c0ee5b39aeb85ce72
Use PEP810!https://github.com/python/cpython/pull/144387/commits/6bc61998db92425f3a7a4e1b14bccabbecbf46df
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
6bc6199https://github.com/python/cpython/pull/144387/commits/6bc61998db92425f3a7a4e1b14bccabbecbf46df
https://github.com/python/cpython/tree/6bc61998db92425f3a7a4e1b14bccabbecbf46df
Merge branch 'main' into dataclass-lazy-inspecthttps://github.com/python/cpython/pull/144387/commits/3901a4c60de59f9aef98dd689f95b14a000178f5
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
3901a4chttps://github.com/python/cpython/pull/144387/commits/3901a4c60de59f9aef98dd689f95b14a000178f5
https://github.com/python/cpython/tree/3901a4c60de59f9aef98dd689f95b14a000178f5
Add blurbhttps://github.com/python/cpython/pull/144387/commits/9910cfd935f4c1aaf23cced3a136a2085c5ea3ff
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
9910cfdhttps://github.com/python/cpython/pull/144387/commits/9910cfd935f4c1aaf23cced3a136a2085c5ea3ff
https://github.com/python/cpython/tree/9910cfd935f4c1aaf23cced3a136a2085c5ea3ff
Add regression testhttps://github.com/python/cpython/pull/144387/commits/0d5efb7c75baf4080b5667aa3a551af304cf3ca8
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
0d5efb7https://github.com/python/cpython/pull/144387/commits/0d5efb7c75baf4080b5667aa3a551af304cf3ca8
https://github.com/python/cpython/tree/0d5efb7c75baf4080b5667aa3a551af304cf3ca8
Remove unrelated changehttps://github.com/python/cpython/pull/144387/commits/ff59bd3ef63a78cfdc26390c3d6a25d55dccce86
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
ff59bd3https://github.com/python/cpython/pull/144387/commits/ff59bd3ef63a78cfdc26390c3d6a25d55dccce86
https://github.com/python/cpython/tree/ff59bd3ef63a78cfdc26390c3d6a25d55dccce86
move lazy importhttps://github.com/python/cpython/pull/144387/commits/6f0db7602bb49b991a633b49a712cd109de15ad2
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
6f0db76https://github.com/python/cpython/pull/144387/commits/6f0db7602bb49b991a633b49a712cd109de15ad2
https://github.com/python/cpython/tree/6f0db7602bb49b991a633b49a712cd109de15ad2
Lazy import copy modulehttps://github.com/python/cpython/pull/144387/commits/7c9f75b884aeb3c48a6be7455823b1c8154a2383
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
7c9f75bhttps://github.com/python/cpython/pull/144387/commits/7c9f75b884aeb3c48a6be7455823b1c8154a2383
https://github.com/python/cpython/tree/7c9f75b884aeb3c48a6be7455823b1c8154a2383
Use the same _AutoDocstring instancehttps://github.com/python/cpython/pull/144387/commits/b577f3b8cb6286d5a04ee707122eaaa31978a1ea
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
b577f3bhttps://github.com/python/cpython/pull/144387/commits/b577f3b8cb6286d5a04ee707122eaaa31978a1ea
https://github.com/python/cpython/tree/b577f3b8cb6286d5a04ee707122eaaa31978a1ea
Lazy import re modulehttps://github.com/python/cpython/pull/144387/commits/1703153fe6a7f85e1e674b7e26172aec8947c956
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
1703153https://github.com/python/cpython/pull/144387/commits/1703153fe6a7f85e1e674b7e26172aec8947c956
https://github.com/python/cpython/tree/1703153fe6a7f85e1e674b7e26172aec8947c956
Merge branch 'main' into dataclass-lazy-inspecthttps://github.com/python/cpython/pull/144387/commits/b581777b7b8db3064a051c35a2b1e32d34bf1b16
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
b581777https://github.com/python/cpython/pull/144387/commits/b581777b7b8db3064a051c35a2b1e32d34bf1b16
https://github.com/python/cpython/tree/b581777b7b8db3064a051c35a2b1e32d34bf1b16
Merge branch 'main' into dataclass-lazy-inspecthttps://github.com/python/cpython/pull/144387/commits/820e28cdd8cd992b5dcd857fccc577919528369c
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
820e28chttps://github.com/python/cpython/pull/144387/commits/820e28cdd8cd992b5dcd857fccc577919528369c
https://github.com/python/cpython/tree/820e28cdd8cd992b5dcd857fccc577919528369c
Add test for docstring of recursive dataclasshttps://github.com/python/cpython/pull/144387/commits/f0a4146d21460b015485bcd8a3d45329d427b9e2
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
f0a4146https://github.com/python/cpython/pull/144387/commits/f0a4146d21460b015485bcd8a3d45329d427b9e2
https://github.com/python/cpython/tree/f0a4146d21460b015485bcd8a3d45329d427b9e2
Merge branch 'main' into dataclass-lazy-inspecthttps://github.com/python/cpython/pull/144387/commits/80dca621b78ec6e4e697679ada72c5b3fa18a37b
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
80dca62https://github.com/python/cpython/pull/144387/commits/80dca621b78ec6e4e697679ada72c5b3fa18a37b
https://github.com/python/cpython/tree/80dca621b78ec6e4e697679ada72c5b3fa18a37b
Merge branch 'main' into dataclass-lazy-inspecthttps://github.com/python/cpython/pull/144387/commits/152ae7969be500d3bc6b6590a7b2ad091db59a67
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
152ae79https://github.com/python/cpython/pull/144387/commits/152ae7969be500d3bc6b6590a7b2ad091db59a67
https://github.com/python/cpython/tree/152ae7969be500d3bc6b6590a7b2ad091db59a67
Update Lib/dataclasses.pyhttps://github.com/python/cpython/pull/144387/commits/65d92cc12c153e856a72895a7a74a45907e1cef0
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
hugovkhttps://github.com/python/cpython/commits?author=hugovk
65d92cchttps://github.com/python/cpython/pull/144387/commits/65d92cc12c153e856a72895a7a74a45907e1cef0
https://github.com/python/cpython/tree/65d92cc12c153e856a72895a7a74a45907e1cef0
Merge branch 'main' into dataclass-lazy-inspecthttps://github.com/python/cpython/pull/144387/commits/029999412262d8dfb409d4a498b540ee8600c744
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
0299994https://github.com/python/cpython/pull/144387/commits/029999412262d8dfb409d4a498b540ee8600c744
https://github.com/python/cpython/tree/029999412262d8dfb409d4a498b540ee8600c744
Ensure inspect is not imported in test__colorize.pyhttps://github.com/python/cpython/pull/144387/commits/ea805a199afb4d9d4faad516edbe1069ae7ffa9f
https://github.com/danielhollas
danielhollashttps://github.com/python/cpython/commits?author=danielhollas
ea805a1https://github.com/python/cpython/pull/144387/commits/ea805a199afb4d9d4faad516edbe1069ae7ffa9f
https://github.com/python/cpython/tree/ea805a199afb4d9d4faad516edbe1069ae7ffa9f
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.