[issue1572968] release GIL while doing I/O operations in the mmap module

2019-05-30 Thread Nic Watson
Nic Watson added the comment: I'll add one more system I/O call that's not GIL-wrapped in the mmap module that can take some time: mmap itself. mmap on Linux with MAP_POPULATE (0x8000) as the flags can take quite a bit of time. That's the flag that prefaults the memory range

[issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing

2019-04-15 Thread Nic Watson
Change by Nic Watson : -- nosy: +jnwatson ___ Python tracker <https://bugs.python.org/issue29930> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35945] Cannot distinguish between subtask cancellation and running task cancellation

2019-02-19 Thread Nic Watson
Nic Watson added the comment: Excellent answer by twisteroid Ambassador. Resolved -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35945] Cannot distinguish between subtask cancellation and running task cancellation

2019-02-08 Thread Nic Watson
New submission from Nic Watson : Goal: to distinguish inside a CancelledError exception handler whether the current running task is being cancelled, or another task that the current task is pending on was cancelled. Example: import asyncio async def task2func(): await asyncio.sleep(2

[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-10-19 Thread Nic Watson
Change by Nic Watson : -- nosy: +jnwatson ___ Python tracker <https://bugs.python.org/issue30945> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34680] asyncio event_loop close fails off main thread if signal handler registered

2018-09-14 Thread Nic Watson
New submission from Nic Watson : If a signal handler callback is registered on an event loop, and the event loop has close() called on it, the close will fail. Exception: Exception in thread Thread-1: Traceback (most recent call last): File "/home/nic/.pyenv/versions/3.7.0/lib/pyth

[issue34679] asyncio.add_signal_handler call fails if not on main thread

2018-09-14 Thread Nic Watson
New submission from Nic Watson : Summary: essentially asyncio.add_signal_handler doesn't work when called off the main thread. One might consider this a documentation failure. (Note: there's also a bigger issue with cleanup, which I'll submit separately) Exception in thread Thread-1

[issue34349] asyncio.wait should accept generator of tasks as first argument

2018-08-06 Thread Nic Watson
New submission from Nic Watson : Currently, passing a generator of coroutines or futures as the first parameter of asyncio.wait raises a TypeError. This is in conflict with the documentation calling the first parameter a "sequence". Line in question. https://github.com/python/cp

[issue29729] UUID bytes constructor has too-tight an assertion

2017-03-05 Thread Nic Watson
New submission from Nic Watson: The assertion: File "/usr/lib/python3.6/uuid.py", line 150, in __init__ assert isinstance(bytes, bytes_), repr(bytes) is too specific (and IMHO, unpythonic). One may want to pass a bytearray or a memoryview. See int.from_bytes for an example