@@ -68,11 +68,12 @@ def __init__(
6868 stream : typing .Optional [typing .IO ] = None ,
6969 no_color : bool = False ,
7070 force_color : bool = False ,
71+ defaults : typing .Optional [typing .Mapping [str , typing .Any ]] = None ,
7172 ) -> None :
7273 """
7374 Set the format and colors the ColoredFormatter will use.
7475
75- The ``fmt``, ``datefmt`` and ``style `` args are passed on to the
76+ The ``fmt``, ``datefmt``, ``style``, and ``default `` args are passed on to the
7677 ``logging.Formatter`` constructor.
7778
7879 The ``secondary_log_colors`` argument can be used to create additional
@@ -105,7 +106,9 @@ def __init__(
105106 # Select a default format if `fmt` is not provided.
106107 fmt = default_formats [style ] if fmt is None else fmt
107108
108- if sys .version_info >= (3 , 8 ):
109+ if sys .version_info >= (3 , 10 ):
110+ super ().__init__ (fmt , datefmt , style , validate , defaults = defaults )
111+ elif sys .version_info >= (3 , 8 ):
109112 super ().__init__ (fmt , datefmt , style , validate )
110113 else :
111114 super ().__init__ (fmt , datefmt , style )
0 commit comments