cpython/Lib/logging
Arturo Escaip 8ad052464a
bpo-40756: Default second argument of LoggerAdapter.__init__ to None (GH-20362)
The 'extra' argument is not always used by custom logger adapters. For
example:

```python
class IndentAdapter(logging.LoggerAdapter):
    def process(self, msg, kwargs):
        indent = kwargs.pop(indent, 1)
        return ' ' * indent + msg, kwargs
```

It is cleaner and friendlier to default the 'extra' argument to None
instead of either forcing the subclasses of LoggerAdapter to pass a None
value directly or to override the constructor.

This change is backward compatible because existing calls to
`LoggerAdapter.__init__` are already passing a value for the second
argument.

Automerge-Triggered-By: @vsajip
2020-05-26 07:55:21 -07:00
..
__init__.py bpo-40756: Default second argument of LoggerAdapter.__init__ to None (GH-20362) 2020-05-26 07:55:21 -07:00
config.py bpo-39142: Avoid converting namedtuple instances to ConvertingTuple. (GH-17773) 2020-01-01 19:32:11 +00:00
handlers.py bpo-39826: add getConnection() hook to logging HTTPHandler (GH-18745) 2020-03-04 10:49:51 +00:00