[Python-checkins] bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (GH-9859)

Yury Selivanov webhook-mailer at python.org
Mon Oct 15 17:39:19 EDT 2018


https://github.com/python/cpython/commit/43a5bd7b458f0ad2d62b00b033d025689d48d591
commit: 43a5bd7b458f0ad2d62b00b033d025689d48d591
branch: master
author: Braden Groom <braden.groom at gmail.com>
committer: Yury Selivanov <yury at magic.io>
date: 2018-10-15T17:39:16-04:00
summary:

bpo-23554: Change echo server example class name from EchoServerClientProtocol to EchoServerProtocol (GH-9859)

files:
M Doc/library/asyncio-protocol.rst

diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst
index 14ec31a6d5d2..5e6b5b480562 100644
--- a/Doc/library/asyncio-protocol.rst
+++ b/Doc/library/asyncio-protocol.rst
@@ -717,7 +717,7 @@ received data, and close the connection::
     import asyncio
 
 
-    class EchoServerClientProtocol(asyncio.Protocol):
+    class EchoServerProtocol(asyncio.Protocol):
         def connection_made(self, transport):
             peername = transport.get_extra_info('peername')
             print('Connection from {}'.format(peername))
@@ -740,7 +740,7 @@ received data, and close the connection::
         loop = asyncio.get_running_loop()
 
         server = await loop.create_server(
-            lambda: EchoServerClientProtocol(),
+            lambda: EchoServerProtocol(),
             '127.0.0.1', 8888)
 
         async with server:



More information about the Python-checkins mailing list