[issue35913] asyncore: allow handling of half closed connections

2021-10-21 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed superseder: -> Close asyncore/asynchat/smtpd issues and list them here ___ Python tracker

[issue35913] asyncore: allow handling of half closed connections

2019-05-01 Thread Josiah Carlson
Change by Josiah Carlson : -- nosy: -josiahcarlson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35913] asyncore: allow handling of half closed connections

2019-02-07 Thread Isaac Boukris
Isaac Boukris added the comment: if not data: # a closed connection is indicated by signaling # a read condition, and having recv() return 0. self.handle_close() return b'' This above is the current code. Do you agree that it

[issue35913] asyncore: allow handling of half closed connections

2019-02-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: The change adds a new public method. The method should be added to documentation also. Documentation requires `.. versionadded:: 3.8` tag. It doesn't look like *just a bugfix* but a feature. -- ___ Python tracker

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Isaac Boukris
Isaac Boukris added the comment: > But I want to raise the flag again: why we are adding new functionality to > the *deprecated* module? It violates our on deprecation policy, isn't it? I'm biased but I see this as more of a small and subtle fix for the current logic that incorrectly treats

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I agree. The problem I have with this is that it introduces a new method (handle_eof), which ends up in the "new functionality" bucket (even though it's not backward incompatible per-se, as it defaults on calling handle_close() anyway, but still it is

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: Technically the change seems correct, we have the same logic for asyncio half-closed streams. But I want to raise the flag again: why we are adding new functionality to the *deprecated* module? It violates our on deprecation policy, isn't it? --

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Isaac Boukris
Isaac Boukris added the comment: > It seems recv() returning b"" is an alias for "connection lost". E.g. in > Twisted: To my understanding, technically the connection is not fully closed, it is just shut-down for reading but we can still perform write operations on it (that is, the client

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > When recv() return 0 we may still have data to send. It seems recv() returning b"" is an alias for "connection lost". E.g. in Twisted: https://github.com/twisted/twisted/blob/06c891502be9f6389451fcc959cad5485f55d653/src/twisted/internet/tcp.py#L227-L248

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Andrew Svetlov
Andrew Svetlov added the comment: My personal opinion is: we should accept bug fixes for asyncore but stop adding new features to the module. asyncio supersedes asyncore in all aspects. -- nosy: +asvetlov ___ Python tracker

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Isaac Boukris
Isaac Boukris added the comment: Fair enough. I'll sign the CLA meanwhile you consider it. In my opinion it may still be useful in addressing issues in existing projects written using asyncore (and maybe for python2 as well). Thanks! -- ___

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi! > Assigning this to me but am not sure 1) when I'll be able to look at this 2) > whether it's worth it as asyncore is deprecated in favor of asyncio. Yes, asyncore is deprecated since 3.6. -- nosy: +eamanu

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Assigning this to me but am not sure 1) when I'll be able to look at this 2) whether it's worth it as asyncore is deprecated in favor of asyncio. -- assignee: -> giampaolo.rodola ___ Python tracker

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread SilentGhost
Change by SilentGhost : -- nosy: +giampaolo.rodola, josiahcarlson, stutzbach versions: +Python 3.8 ___ Python tracker ___ ___

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch pull_requests: +11735, 11736 stage: -> patch review ___ Python tracker ___

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +11735 stage: -> patch review ___ Python tracker ___ ___

[issue35913] asyncore: allow handling of half closed connections

2019-02-06 Thread Isaac Boukris
New submission from Isaac Boukris : When recv() return 0 we may still have data to send. Add a handler for this case, which may happen with some protocols, notably http1.0 ver. Also, do not call recv with a buffer size of zero to avoid ambiguous return value (see recv man page). --