[issue40756] Second argument of LoggerAdapter.__init__ should default to None

2020-08-17 Thread Arturo Escaip


Arturo Escaip  added the comment:

Done.

--

___
Python tracker 
<https://bugs.python.org/issue40756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40756] Second argument of LoggerAdapter.__init__ should default to None

2020-08-17 Thread Arturo Escaip


Change by Arturo Escaip :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue40756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40756] Second argument of LoggerAdapter.__init__ should default to None

2020-05-24 Thread Arturo Escaip


Change by Arturo Escaip :


--
keywords: +patch
pull_requests: +19626
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20362

___
Python tracker 
<https://bugs.python.org/issue40756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40756] Second argument of LoggerAdapter.__init__ should default to None

2020-05-24 Thread Arturo Escaip


New submission from Arturo Escaip :

The 'extra' argument is not always used by custom logger adapters. There
example:

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.

--
components: Library (Lib)
messages: 369815
nosy: arturoescaip
priority: normal
severity: normal
status: open
title: Second argument of LoggerAdapter.__init__ should default to None
type: enhancement

___
Python tracker 
<https://bugs.python.org/issue40756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com