[Python-Dev] Py3k and asyncore/asynchat
josiah.carlson at gmail.com
Fri Feb 15 03:24:04 CET 2008
Sorry I haven't been available for this recently, I've been working
far too much (10-14 hours/day, 6 days/week, since November) to really
do any "fun" programming. Also, sorry for top-posting.
As I stated 2+ and 6+ months ago, the patches I submitted 9+ months
ago work (I've been using them in my own projects without issue). The
only issue with the bugfix/rearrangement that I last heard about with
regards to the 2.x stuff was that I removed a class that no one was
using in the wild, which I believe Giampaolo added in a subsequent
patch in the last couple months.
1. Apply the most recent fixes to 2.6 asyncore/asynchat that Giampaolo
1.a. Figure out what the hell is up with OOB data, how to handle it,
and stop making it use handle_expt().
2. Use the 2.x -> 3.x tool to convert the fixes over.
3. Apply any 3.x specific fixes (for string/bytes, etc.) to the 3.x
branch as necessary (make them global constants in both 2.x and 3.x so
that they are easy to track).
4. Consider enhancements to 2.6 if they aren't to big, consider
slightly larger enhancements to 3.x. *
* Scheduled tasks are not a valid enhancement for either; anyone who
wants them can trivially add them with their own asyncore.loop()
variant and call asyncore.poll() as necessary (I did it in about 15
lines in the summer of 2002, I hope others can do better now). If you
want my opinion on other async-related features, feel free to email me
directly (use the gmail address you see here, then it ends up in my
inbox, not the overflowing python folder).
On Thu, Feb 14, 2008 at 9:09 AM, Giampaolo Rodola' <gnewsg at gmail.com> wrote:
> On 14 Feb, 16:36, "Giampaolo Rodola'" <gne... at gmail.com> wrote:
> > Ok, I'll try to take a look at all asyncore/chat reports and try to
> > summarize them by splitting patches which solve bugs and patches which
> > add enhancements or functionalities.
> > On 14 Feb, 16:12, "Facundo Batista" <facundobati... at gmail.com> wrote:
> > > 2008/2/14, Giampaolo Rodola' <gne... at gmail.com>:
> > > > asyncore and asynchat are in a difficult position right now since a
> > > > lot of patches for both modules are pending and no decisions are
> > > > taken.
> > > > In detail I'm talking about patches 1519, 1541, 2073 and 1736190 which
> > > > is the most important one since it includes a lot of fixes for other
> > > > reported issues (e.g. 1740572, 1736101, 909005).
> > > I took a look to some of these in other opportunity, and IIRC, the
> > > main issue here is exactly what you say: lots of issues with problem
> > > *and* fixes, but some decisions needs to be taken.
> > > No decision taken, the pile of issues (and real problems behind them)
> > > accumulate through time. I think it's a good idea to bring this
> > > discussion here, and with luck a result will come up regarding them.
> > > So, it would be great if you (please) summarize here the problems
> > > behind those issues and the decisions that must be taken... Thanks!
> > > Regards,
> > > --
> > > . Facundo
> > > Blog:http://www.taniquetil.com.ar/plog/
> > > PyAr:http://www.python.org/ar/
> === Patches for existing issues ===
> - 1736190 which includes fixes for the following issues among other
> - 1063924 (asyncore should handle ECONNRESET in send())
> - 1736101 (asyncore should handle ECONNABORTED in recv())
> - 760475 (handle_error() should call handle_close() instead of
> - 1740572 (refill_buffer() should call handle_close() rather than
> - 777588 (wrong "connection refused" behavior on Windows)
> - 889153 (wrong connect() behavior)
> - 953599 (asyncore misses socket closes when poll is used)
> - 1025525 (asyncore.file_dispatcher should not take fd as argument)
> - 1519 (async_chat.__init__() and asyncore.dispatcher.__init__
> parameters inconsistency)
> - 1541 (Bad OOB data management when using asyncore with
> - 2073 (asynchat push always sends 512 bytes (ignoring
> === Open issues with no patches (need review) ===
> - 658749 (asyncore connect() and winsock errors)
> - 1161031 (neverending warnings from asyncore)
> === Enhancements & new features ===
> - 1641 (add delayed calls feature)
> - 1563 (conversion to py3k and some other changes)
> IMHO the first thing to do should be modifying 1736190 patch to fix
> the minor issues came out in comments 52767 (re-add simple_producer
> and fifo classes) and 57581 (look at what is specified in
> ac_out_buffer_size) and then commit it.
> I've used that same modified asynchat version in my pyftpdlib project
> and I can tell that it works pretty good.
> I guess that Josiah Carlson could do that pretty quickly if he has
> time to do so.
> Independently from all a nice thing to do would be adding tests for
> many asyncore/chat behaviors which currently aren't covered by the
> test suite.
> It could be very useful to know if behaviors between different commits
> remain the same, hence it would be better working on that (the test
> suite) before committing 1736190.
> -- Giampaolo
More information about the Python-Dev