Roundup Robot added the comment:
New changeset f8c9dd2626aa by Victor Stinner in branch '3.4':
Issue #12523: asynchat.async_chat.push() now raises a TypeError if it doesn't
http://hg.python.org/cpython/rev/f8c9dd2626aa
New changeset 4b29d338cc41 by Victor Stinner in branch 'default':
(Merge
STINNER Victor added the comment:
I fixed the issue. I copied the check from asyncio,
_SelectorSocketTransport.write() of asyncio.selector_events for example.
--
nosy: +haypo
resolution: - fixed
status: open - closed
___
Python tracker
Mark Lawrence added the comment:
Just close this as asynchat is deprecated from 3.2.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12523
___
Mark Lawrence added the comment:
I've no objection to people trying to take this forward but they should be
aware that asyncio is recommended for new code.
--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3
___
Python
Antoine Pitrou added the comment:
I've no objection to people trying to take this forward
We were really looking for your approval, thank you.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12523
Caelyn McAulay added the comment:
Here is a small script that runs fine under 2.7 but demonstrates the error when
run at 3.5.
If, at all the points annotated with '#not bytes :-(', the unicode strings are
replaced with bytes objects, the example then successfully runs at 3.5.
--
Caelyn McAulay added the comment:
I was unable to locate a point in the code where we could be certain that the
error was ultimately caused by trying to use (unicode) strings instead of bytes
object.
The patch adds a logging statement suggesting what the trouble is when the
error is
Giampaolo Rodola' added the comment:
The part of the code where that is more likely to happen is the push() method.
One might also submit a producer (push_with_producer()) erroneously returning
strings on more() though; how to properly fix this one is not clear to me
because of the bad
Caelyn McAulay added the comment:
I like that approach decidedly more than my original one. Suggested revision
patch attached.
The sample script will not produce the following:
error: uncaptured python exception, closing channel __main__.fake_asynchat
127.0.0.1:8000 at 0x7f10a85b4ae8 (class
Caelyn McAulay added the comment:
*will now produce.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12523
___
___
Python-bugs-list mailing list
Antoine Pitrou pit...@free.fr added the comment:
Actually, the error is that in Python 3 you should use bytes objects when
transmitting/receiving data over the network, not (unicode) strings.
That is, replace '\r\n' with b'\r\n', etc.
Of course, the error message should be made less obscure.
Changes by R. David Murray rdmur...@bitdance.com:
--
components: +Library (Lib) -None
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12523
___
Changes by R. David Murray rdmur...@bitdance.com:
--
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12523
___
___
New submission from Gry gryll...@gmail.com:
Asynchat push() function has a bug which prevents it from functioning.
This code worked fine with Python 2.
---
# https://github.com/jstoker/BasicBot
import asynchat,asyncore,socket
class
Changes by Jimmy Cao jcao...@gmail.com:
--
nosy: +jcao219
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12523
___
___
Python-bugs-list mailing
15 matches
Mail list logo