[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-05-13 Thread Adam Liddell
Adam Liddell added the comment: Some discussion leading up to that change is here https://github.com/MagicStack/asyncpg/pull/548 and in the issues it links. -- ___ Python tracker

[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2021-05-13 Thread Adam Liddell
Change by Adam Liddell : -- nosy: +aaliddell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44121] Missing implementation for formatHeader and formatFooter methods of the BufferingFormatter class in the logging module.

2021-05-13 Thread Mahmoud Harmouch
Change by Mahmoud Harmouch : -- keywords: +patch pull_requests: +24735 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26095 ___ Python tracker

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-05-13 Thread Denis S. Otkidach
Denis S. Otkidach added the comment: The current solutions doesn't look correct. It swallows cancelling causing task to hang: https://bugs.python.org/issue42130 . Proposed test case calls cancel for inner future and set_result for outer task in the same loop step. The old (prior to this

[issue44121] Missing implementation for formatHeader and formatFooter methods of the BufferingFormatter class in the logging module.

2021-05-13 Thread Mahmoud Harmouch
New submission from Mahmoud Harmouch : While I was browsing in the source code of the logging package, I've encountered missing implementations for formatHeader and formatFooter methods of the BufferingFormatter class(in __init__ file). Therefore, I'm going to implement them and push these

[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread miss-islington
miss-islington added the comment: New changeset 7cbe6ca63495d478a3164d6d26ef36cb611a by Miss Islington (bot) in branch '3.10': bpo-44114: Fix dictkeys_reversed and dictvalues_reversed function signatures (GH-26062)

[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: behavior -> crash versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 ___ Python tracker ___

[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! The signature of dictkeys_reversed was already fixed (for purity reason), but the same bug in dictvalues_reversed and dictitems_reversed was missed. It is nice that such bugs can now be caught by tools. -- nosy: +serhiy.storchaka

[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +24734 pull_request: https://github.com/python/cpython/pull/26094 ___ Python tracker ___

[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +24733 pull_request: https://github.com/python/cpython/pull/26093 ___ Python tracker ___

[issue44114] Incorrect function signatures in dictobject.c

2021-05-13 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +24732 pull_request: https://github.com/python/cpython/pull/26092 ___ Python tracker

[issue44069] pathlib.Path.glob's generator is not a real generator

2021-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The reason is different. The scandir() iterator should be closed before we go recursively deep in the directory tree. Otherwise we can reach the limit of open file descriptors (especially if several glob()s are called in parallel). See issue22167.

[issue512981] readline /dev/tty problem

2021-05-13 Thread Pierre
Pierre added the comment: A workaround consists in replacing fd(0) with /dev/tty without modifying sys.stdin import os stdin = os.dup(0) os.close(0) tty = os.open("/dev/tty", os.O_RDONLY) assert tty == 0 import readline print("input:", input()) print("in:", os.read(stdin, 128))

[issue44115] Improve conversions for fractions

2021-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was proposed before in issue37884. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue44115] Improve conversions for fractions

2021-05-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Note for posterity: I tried out pattern matching here but it was a little tricky and it slowed down the code a bit. At at least it worked. if denominator is None: match numerator: case int(x) if type(numerator) is

[issue44119] Use glob.glob() to implement pathlib.Path.glob()

2021-05-13 Thread Barney Gale
Barney Gale added the comment: Flawed implementation, timings were bogus. Closing in shame. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-13 Thread Hiroaki Mizuguchi
New submission from Hiroaki Mizuguchi : This bug is loading bar.logging.FooBarFormatter is occur "ModuleNotFoundError: No module named 'bar.logging.FooBarFormatter'; 'bar.logging' is not a package" when bar module has 'import logging' directive. logging.config._resolve and

<    1   2