[issue45972] typing.NamedTuple with default arguments without type annotations is falsy

2021-12-03 Thread Erik Montnemery
New submission from Erik Montnemery : typing.NamedTuple behaves in surprising ways when it has default arguments which lack type annotations: >>> from typing import NamedTuple >>> class MyTuple(NamedTuple): ... a = 1000 ... >>> tmp = MyTuple() >>> tm

[issue45972] typing.NamedTuple with default arguments without type annotations is falsy

2021-12-03 Thread Erik Montnemery
Erik Montnemery added the comment: I think elaborating in the documentation that only annotated attributes make it to the underlying namedtuple() would be helpful, it's not obvious that they are instead just class attributes. -- ___ Python

[issue45972] typing.NamedTuple with default arguments without type annotations is falsy

2021-12-03 Thread Erik Montnemery
Erik Montnemery added the comment: Maybe something like this: diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 735d477db4..8de913d8db 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1291,7 +1291,8 @@ These are not used in annotations. They are building

[issue31084] QueueHandler not formatting messages

2022-02-15 Thread Erik Montnemery
Change by Erik Montnemery : -- nosy: +emontnemery nosy_count: 2.0 -> 3.0 pull_requests: +29505 pull_request: https://github.com/python/cpython/pull/31355 ___ Python tracker <https://bugs.python.org/issu

[issue46755] QueueHandler logs stack_info twice

2022-02-15 Thread Erik Montnemery
New submission from Erik Montnemery : logging.handlers.QueueHandler logs stack twice when stack_info=True: >>> import logging >>> from logging.handlers import QueueHandler, QueueListener >>> from queue import Queue >>> q = Queue() >>>

[issue46755] QueueHandler logs stack_info twice

2022-02-15 Thread Erik Montnemery
Change by Erik Montnemery : -- keywords: +patch nosy: +emontnemery nosy_count: 1.0 -> 2.0 pull_requests: +29504 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31355 ___ Python tracker <https://bugs.p