[issue45594] Feature Request: add EHOSTUNREACH subclass to ConnectionError

2021-10-24 Thread Nathan Collins
Nathan Collins added the comment: Apparently the existing ConnectionError and its subclasses were added as part of PEP 3151, tracked here: https://bugs.python.org/issue12555 . -- ___ Python tracker <https://bugs.python.org/issue45

[issue45594] Feature Request: add EHOSTUNREACH subclass to ConnectionError

2021-10-24 Thread Nathan Collins
New submission from Nathan Collins : WHAT It would be nice if there was a special-case subclass of the standard library OSError/ConnectionError class for C EHOSTUNREACH (a.k.a. "no route to host") errors. Currently there are special-case subclasses of ConnectionError for several o

[issue44805] asyncio.StreamReader.read hangs for reused socket file descriptors when asyncio.StreamWriter.close() is not called

2021-10-24 Thread Nathan Collins
Nathan Collins added the comment: Just wanted to clarify: my previous "where everything works" comment is not saying this bug doesn't exist, I just mean I missed one case in my analysis of the bug. The bug is very much there, and easy to reproduce using the example prog

[issue44805] asyncio.StreamReader.read hangs for reused socket file descriptors when asyncio.StreamWriter.close() is not called

2021-08-02 Thread Nathan Collins
Nathan Collins added the comment: Oh, and I can't count: there are 16 = 4x4 possible combinations of socket closure modes for the client and server. The one I missed was Client='', Server=SA, where everything works because the client doesn't reuse file descriptors and t

[issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT

2021-08-02 Thread Nathan Collins
Nathan Collins added the comment: I created a new issue for my bug here: https://bugs.python.org/issue44805 -- ___ Python tracker <https://bugs.python.org/issue43

[issue44805] asyncio.StreamReader.read hangs for reused socket file descriptors when asyncio.StreamWriter.close() is not called

2021-08-02 Thread Nathan Collins
Change by Nathan Collins : Added file: https://bugs.python.org/file50199/client.py ___ Python tracker <https://bugs.python.org/issue44805> ___ ___ Python-bugs-list mailin

[issue44805] asyncio.StreamReader.read hangs for reused socket file descriptors when asyncio.StreamWriter.close() is not called

2021-08-02 Thread Nathan Collins
New submission from Nathan Collins : Problem === When using asyncio streams via (r,w) = asyncio.open_connection(sock=socket) with a already connected socket `socket`, if you call `socket.close()` but not `w.close()` when you're done, then when the OS later reuses the file descr

[issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT

2021-08-01 Thread Nathan Collins
Nathan Collins added the comment: What was the resolution for this issue? I'm experiencing asyncio.StreamReader.readline() hanging forever on a socket in CLOSE_WAIT state. -- nosy: +NathanCollins ___ Python tracker <https://bugs.py

[issue2238] TypeError instead of SyntaxError for syntactically invalid gen exp

2008-03-04 Thread Nathan Collins
New submission from Nathan Collins: I have a file f1.py $ cat f1.py import os (lambda **x:x)(**dict(y,y for y in ())) and when I run it $ python f1.py Traceback (most recent call last): File "f1.py", line 1, in import os TypeError: 'int' object is not itera