diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 403dc81b13e..6d27301a705 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1751,7 +1751,7 @@ class LoggerAdapter(object): information in logging output. """ - def __init__(self, logger, extra): + def __init__(self, logger, extra=None): """ Initialize the adapter with a logger and a dict-like object which provides contextual information. This constructor signature allows diff --git a/Misc/NEWS.d/next/Library/2020-05-24-11-06-37.bpo-40756.7ZH83z.rst b/Misc/NEWS.d/next/Library/2020-05-24-11-06-37.bpo-40756.7ZH83z.rst new file mode 100644 index 00000000000..a970f5be156 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-05-24-11-06-37.bpo-40756.7ZH83z.rst @@ -0,0 +1,2 @@ +The second argument (extra) of ``LoggerAdapter.__init__`` now defaults to +None.