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

Lazily import `traceback` in `logging` · Issue #150072 · python/cpython · GitHub

/ cpython Public

Lazily import traceback in logging #150072

Description

Feature or enhancement

Proposal:

Currently, Lib/logging/__init__.py and Lib/logging/config.py eagerly import traceback, 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

Before 41ms After 28ms(~31% faster)

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytopic-lazy-importstype-featureA feature request or enhancement

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL