homepage

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.

Author gvanrossum
Recipients asvetlov, georg.brandl, gvanrossum, larry, pconnell, xdegaye
Date 2013年11月19日.21:21:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384896073.08.0.724853076774.issue16596@psf.upfronthosting.co.za>
In-reply-to
Content
It's not fixed. Let me paste in a session. This uses the latest Tulip repo (simple_tcp_server.py was just added). I've added "import pdb; pdb.set_trace()" to the top of the client() coroutine, to set a breakpoint (I'm a very unsophisticated pdb user :-). I step over a yield-from, great. Then I step into recv(). Note the final 'n' command. This is at the return statement in recv(). At this point I expect to go back into the client() coroutine, but somehow the debugger loses control and the program finishes execution without giving control back.
bash-3.2$ ~/cpython/python.exe -m examples.simple_tcp_server
~/cpython/python.exe -m examples.simple_tcp_server
> /Users/guido/tulip/examples/simple_tcp_server.py(119)client()
-> reader, writer = yield from asyncio.streams.open_connection(
(Pdb) n
n
> /Users/guido/tulip/examples/simple_tcp_server.py(120)client()
-> '127.0.0.1', 12345, loop=loop)
(Pdb) 
> /Users/guido/tulip/examples/simple_tcp_server.py(122)client()
-> def send(msg):
(Pdb) 
> /Users/guido/tulip/examples/simple_tcp_server.py(126)client()
-> def recv():
(Pdb) 
> /Users/guido/tulip/examples/simple_tcp_server.py(132)client()
-> send("add 1 2")
(Pdb) 
> add 1 2
> /Users/guido/tulip/examples/simple_tcp_server.py(133)client()
-> msg = yield from recv()
(Pdb) s
s
--Call--
> /Users/guido/tulip/examples/simple_tcp_server.py(126)recv()
-> def recv():
(Pdb) n
n
> /Users/guido/tulip/examples/simple_tcp_server.py(127)recv()
-> msgback = (yield from reader.readline()).decode("utf-8").rstrip()
(Pdb) n
n
> /Users/guido/tulip/examples/simple_tcp_server.py(128)recv()
-> print("< " + msgback)
(Pdb) n
n
< 3.0
> /Users/guido/tulip/examples/simple_tcp_server.py(129)recv()
-> return msgback
(Pdb) n
n
> repeat 5 hello
< begin
< 1. hello
< 2. hello
< 3. hello
< 4. hello
< 5. hello
< end
client task done: Task(<_handle_client>)<result=None>
bash-3.2$
History
Date User Action Args
2013年11月19日 21:21:13gvanrossumsetrecipients: + gvanrossum, georg.brandl, larry, asvetlov, xdegaye, pconnell
2013年11月19日 21:21:13gvanrossumsetmessageid: <1384896073.08.0.724853076774.issue16596@psf.upfronthosting.co.za>
2013年11月19日 21:21:13gvanrossumlinkissue16596 messages
2013年11月19日 21:21:12gvanrossumcreate

AltStyle によって変換されたページ (->オリジナル) /