Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Optimize logging imports by using lazy loading for traceback
  • Loading branch information
IvyXu420 committed May 19, 2026
commit 66e631b6e1fbc2296161e7cea2515fe41aa0cb5b
3 changes: 2 additions & 1 deletion Lib/logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
To use, simply 'import logging' and log away!
"""

import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
import sys, os, time, io, re, warnings, weakref, collections.abc
lazy import traceback

from types import GenericAlias
from string import Template
Expand Down
2 changes: 1 addition & 1 deletion Lib/logging/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import re
import struct
import threading
import traceback
lazy import traceback

from socketserver import ThreadingTCPServer, StreamRequestHandler

Expand Down
Loading