-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Lazily import traceback in logging #150072
Copy link
Copy link
Open
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-lazy-importstype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-lazy-importstype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
No status
Feature or enhancement
Proposal:
Currently,
Lib/logging/__init__.pyandLib/logging/config.pyeagerly importtraceback, despite it only being used during exception handling. Making this import lazy avoids unnecessary startup overhead and improves initial loading time.Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
traceback#150073