This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2003年06月25日 13:11 by jcea, last changed 2022年04月10日 16:09 by admin. This issue is now closed.
| Messages (5) | |||
|---|---|---|---|
| msg16595 - (view) | Author: Jesús Cea Avión (jcea) * (Python committer) | Date: 2003年06月25日 13:11 | |
When an uncached exception arises in "asyncore", the method "handle_error" is called. This method calls "self.close()" when it MUST call "self.handle_close()", in order to support correctly the "delegation" design pattern, for example. |
|||
| msg16596 - (view) | Author: Jeremy Hylton (jhylton) (Python triager) | Date: 2003年06月25日 18:11 | |
Logged In: YES user_id=31392 Can you expand on your comments. I don't know what the delegation design pattern you refer to is. Can you provide an example of why it is necessary that asyncore not call close()? |
|||
| msg16597 - (view) | Author: Josiah Carlson (josiahcarlson) * (Python triager) | Date: 2007年01月06日 23:02 | |
While the default .close() method is called inside .handle_close(), not calling .handle_close() in asyncore prevents any subclassed .handle_close() behavior to be run. Say, for example, that a user has written a subclass where within .handle_connect() the socket is registered somewhere (perhaps for I/O statistics in an FTP or Bittorrent application). Where it would make sense to place the unregistration code is within a .handle_close() method, which is bypassed by the standard .handle_error() code. I suggest switching to the self.handle_close() call at the end of handle_error() . Doing so preserves the passing of the test suite on release 2.5 on Windows. |
|||
| msg69215 - (view) | Author: Josiah Carlson (josiahcarlson) * (Python triager) | Date: 2008年07月03日 18:00 | |
I forgot to fix this in my most recent commits, but I'll fix it this weekend for Python 2.6 . |
|||
| msg69378 - (view) | Author: Josiah Carlson (josiahcarlson) * (Python triager) | Date: 2008年07月07日 05:05 | |
Fixed for 2.6 in changelist 64768. Fixed for 3.0 in changelist 64770. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月10日 16:09:25 | admin | set | github: 38708 |
| 2008年07月07日 05:05:34 | josiahcarlson | set | status: open -> closed resolution: fixed messages: + msg69378 |
| 2008年07月03日 18:00:12 | josiahcarlson | set | messages: + msg69215 |
| 2003年06月25日 13:11:28 | jcea | create | |