[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2014-08-27 Thread STINNER Victor
STINNER Victor added the comment: The latest patch was written 5 years ago, it's probably a huge work to rebase it. Giampaolo wrote that the code changed a lot since this time (especially code handling errors). asyncore-fix-refused-4.patch catchs EBADF. To me, it looks like a bug: if you get

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2014-06-27 Thread Mark Lawrence
Mark Lawrence added the comment: @Victor as you've been looking at other asyncore/chat issues can you look at this please? -- nosy: +haypo ___ Python tracker ___

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2014-06-07 Thread Mark Lawrence
Mark Lawrence added the comment: Has maintenance of asyncore effectively ceased owing to tulip/asyncio or are outstanding problems here, if any, still considered valid? -- nosy: +BreamoreBoy ___ Python tracker

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2010-08-09 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- versions: +Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2010-08-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: What's the current status of this issue? I think some of the problems raised at the time this was opened should have been fixed in meantime, like checking for errors in handle_expt_event and handle_connect_event (issue 2944). The handle_close being called

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-08-03 Thread Nir Soffer
Nir Soffer added the comment: handle_expt is documented to be called when there is OOB data. However, handle_expt_event is not documented, and according the framework design as I see it, it simply means "socket has exceptional condition" when select returns. On unix, this means there is oob data

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-08-01 Thread Josiah Carlson
Josiah Carlson added the comment: handle_expt_event was removed in the test classes because it is no longer being used by any of the tests. None of them send OOB data (also known as priority data), so handle_expt_event should never be called. When I have a chance to compare your patch to mi

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-08-01 Thread Nir Soffer
Nir Soffer added the comment: This is asyncore-fix-refused-3.patch with some fixes: 1. Call handle_close instead of non exiting handle_close_event 2. Remove unneeded handle_close_event in test classes 3. Revert removal of handle_expt_event in test classes - not clear why it was removed in t

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-08-01 Thread Nir Soffer
Nir Soffer added the comment: I was wrong about handle_connect_event - it is called only from the dispatcher, so it will not break 3rd party dispatcher. -- ___ Python tracker __

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-31 Thread Nir Soffer
Nir Soffer added the comment: I tested asyncore_fix_refused-3.patch on Mac OS X 10.5 - all asyncore and asynchat tests pass. There is one minor issue - _exception calls the non existing handle_close_event instead of handle_close. However, looking again at the code I think that it is ugly and

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-31 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-29 Thread Josiah Carlson
Changes by Josiah Carlson : Removed file: http://bugs.python.org/file14585/asyncore_fix_refused-2.patch ___ Python tracker ___ ___ Python-bugs-

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-29 Thread Josiah Carlson
Changes by Josiah Carlson : Removed file: http://bugs.python.org/file14581/asyncore_fix_refused.patch ___ Python tracker ___ ___ Python-bugs-li

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-29 Thread Josiah Carlson
Josiah Carlson added the comment: Originally, handle_expt_event() was described as "handles OOB data or exceptions", but over-using handle_expt_event() as an error/close handler is a bad idea. The function asyncore.readwrite() (called by asyncore.poll2()) does the right thing WRT handle_expt

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-29 Thread Nir Soffer
Nir Soffer added the comment: I'll check the patch this week. The asyncore framework has low level events - handle_read_event, handle_write_event and handle_expt_event - these events are not used for reading, writing and OOB - they are just responsible to call the high level events. The hi

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-28 Thread Josiah Carlson
Josiah Carlson added the comment: Firstly, it expects that handle_expt_event() is for handling exceptional conditions. This is not the case. handle_expt_event() is meant for handling "OOB" or "priority" data coming across a socket. FTP and some other protocols use this. I forgot to fix it

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-28 Thread Nir Soffer
Nir Soffer added the comment: I have a big problem with asyncore_fix_refused.patch - it assumes that a dispatcher has a socket attribute, which can be used with t getsockopt(). This is true in the default dispatcher class implemented in asyncore, but wont work with file_dispatcher, or 3rd pa

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-27 Thread Josiah Carlson
Josiah Carlson added the comment: The attached patch cleans up the remnants of the "handle_expt is for exceptions", which isn't the case, as well as makes the "connection refused" fix actually work on Windows. Nirs, could you verify this on *nix? -- assignee: -> josiahcarlson keywo

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-26 Thread R. David Murray
Changes by R. David Murray : -- nosy: +josiahcarlson priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer
Nir Soffer added the comment: This version fix also handle_expt_event, so connection refused error should be handled in the same way also on Windows. -- Added file: http://bugs.python.org/file14562/asycore-handle-connect-event-3.patch ___ Python tr

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer
Nir Soffer added the comment: The first fix reverted to 2.5 behavior, when self.connected is false when handle_connect is called. This behavior is little stupid - why call handle_connect if the socket is not really connected? This fix ensure that handle_connect is called only if the socket is

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer
Nir Soffer added the comment: Tested on Ubuntu Linux 9.04. The tests will probably fail on Windows, since connection refused is detected trough handle_expt_event, and not in hadnle_read_event. I hope someone on Windows will fix this :-) -- ___ Pytho

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-23 Thread Nir Soffer
Nir Soffer added the comment: The patch is tested with release26-maint and trunk. -- versions: +Python 2.7 ___ Python tracker ___ ___

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-22 Thread Nir Soffer
New submission from Nir Soffer : When using asynchat.async_chat channel, and connection is refused, asyncore fail incorrectly. First, instead of ECONNREFUSED, you get EPIPE, second, you also get a EBADF exception, and finally, the channel handle_close is called twice. The problem is the way