[Python-Dev] Does anyone care enough about asyncore and asynchat to help adapt their APIs for Py3k?
Gary Herron
gherron at islandtraining.com
Wed Dec 5 21:54:49 CET 2007
Guido van Rossum wrote:
> The asyncore and asynchat modules are in a difficult position when it
> comes to Python 3000. None of the core developers use it or
> particularly care about it (AFAIK), and the API has problems because
> it wasn't written to deal with bytes vs. unicode. E.g. in
> http://bugs.python.org/issue1067, Thomas suggests that these modules
> need to be rewritten to use bytes internally and have separate APIs to
> handle (unicode) text as desired, similar to the way file I/O was
> redesigned. Another alternative would be to make these modules deal
> strictly in bytes, but that would probably vastly reduce their
> usefulness (though I don't know -- as I said, I don't use them).
>
>
I use asyncore/asynchat in one (proprietary) project of mine. However,
since the only thing I use them for is bytes, your suggested alternative
(of bytes instead of strings) is fine with me, and seems the most
natural choice.
(In fact what I'm currently passing around is strings produced by
cPickle, but I'm assuming that the Python3 version of cPickle will
create/consume bytes. True?)
Gary Herron
More information about the Python-Dev
mailing list