[issue42513] Socket.recv hangs

2021-01-07 Thread Barney Stratford
Barney Stratford added the comment: Sure. So, I'm using STOMP to connect to a messaging server. STOMP uses heartbeats to detect and close failed connections. The problem was that if the connection fails before the protocol has set up its heartbeats then there's nothing to stop the whole

[issue42513] Socket.recv hangs

2021-01-07 Thread Barney Stratford
Barney Stratford added the comment: Instrumented code shows that the poll is in fact working completely correctly, and I've run into a documented edge-case in an unrelated area. Hence, closing the bug report and cancelling the pull request. -- resolution: -> not a bug stage: pa

[issue42513] Socket.recv hangs

2021-01-07 Thread Barney Stratford
Barney Stratford added the comment: The instrumented code froze today, so I'm finally able to probe the bug. Despite what that website said, it's looking like checking the return fron the poll syscall isn't the problem here. I'm probably going to close this bug report as not a bug, but want

[issue42513] Socket.recv hangs

2020-12-27 Thread Barney Stratford
Barney Stratford added the comment: Still waiting for the instrumented code to hang. It sometimes runs for a month or two before freezing. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42513] Socket.recv hangs

2020-11-30 Thread Barney Stratford
Change by Barney Stratford : -- keywords: +patch pull_requests: +22448 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23567 ___ Python tracker <https://bugs.python.org/issu

[issue42513] Socket.recv hangs

2020-11-30 Thread Barney Stratford
New submission from Barney Stratford : import socket self.__socket = socket.create_connection ([host, port], 1) value = self.__socket.recv (4096) This code sometimes hangs despite having a non-None timeout specified. GDB says: (gdb) bt #0 0x76d33c94 in __GI___poll (fds=0x7ea55148, nfds=1

[issue41149] Threads can fail to start

2020-06-28 Thread Barney Stratford
New submission from Barney Stratford : >>> import threading >>> class foo (object): ... def __bool__ (self): ... return False ... def __call__ (self): ... print ("Running") ... >>> threading.Thread (target = foo ()).start () The ex

[issue35162] Inconsistent behaviour around __new__

2018-11-04 Thread Barney Stratford
New submission from Barney Stratford : >>> class Eggs (object): ... def __init__ (self, number): ... self.__number = number ... def __repr__ (self): ... return "{} eggs".format (self.__number) ... >>> Eggs (4) 4 eggs >>> del Eggs.__new__ Traceback (mo

[issue24727] Expand readline module

2015-07-26 Thread Barney Stratford
Changes by Barney Stratford barney_stratf...@fastmail.fm: -- components: +Extension Modules -Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24727

[issue24727] Expand readline module

2015-07-26 Thread Barney Stratford
New submission from Barney Stratford: I have a use case where a daemon thread needs to write periodic updates to sys.stdout. I'd prefer it not to print in the middle of a command being typed. In order to achieve this, I have added to the readline module. There is now a function to determine