mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-36889: Merge asyncio streams (GH-13251)
https://bugs.python.org/issue36889
This commit is contained in:
parent
6f6ff8a565
commit
23b4b697e5
13 changed files with 2065 additions and 393 deletions
|
@ -649,12 +649,13 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
|
|||
sock.close()
|
||||
|
||||
async def client(addr):
|
||||
reader, writer = await asyncio.open_connection(
|
||||
*addr,
|
||||
ssl=client_sslctx,
|
||||
server_hostname='',
|
||||
loop=self.loop,
|
||||
ssl_handshake_timeout=1.0)
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
reader, writer = await asyncio.open_connection(
|
||||
*addr,
|
||||
ssl=client_sslctx,
|
||||
server_hostname='',
|
||||
loop=self.loop,
|
||||
ssl_handshake_timeout=1.0)
|
||||
|
||||
with self.tcp_server(server,
|
||||
max_clients=1,
|
||||
|
@ -688,12 +689,13 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
|
|||
sock.close()
|
||||
|
||||
async def client(addr):
|
||||
reader, writer = await asyncio.open_connection(
|
||||
*addr,
|
||||
ssl=client_sslctx,
|
||||
server_hostname='',
|
||||
loop=self.loop,
|
||||
ssl_handshake_timeout=1.0)
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
reader, writer = await asyncio.open_connection(
|
||||
*addr,
|
||||
ssl=client_sslctx,
|
||||
server_hostname='',
|
||||
loop=self.loop,
|
||||
ssl_handshake_timeout=1.0)
|
||||
|
||||
with self.tcp_server(server,
|
||||
max_clients=1,
|
||||
|
@ -724,11 +726,12 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
|
|||
sock.close()
|
||||
|
||||
async def client(addr):
|
||||
reader, writer = await asyncio.open_connection(
|
||||
*addr,
|
||||
ssl=client_sslctx,
|
||||
server_hostname='',
|
||||
loop=self.loop)
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
reader, writer = await asyncio.open_connection(
|
||||
*addr,
|
||||
ssl=client_sslctx,
|
||||
server_hostname='',
|
||||
loop=self.loop)
|
||||
|
||||
self.assertEqual(await reader.readline(), b'A\n')
|
||||
writer.write(b'B')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue