Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
39708de
Support helpers for running on non-IPv4 IPv6-only hosts.
gpshead May 17, 2021
aa9e7c5
Fixes eight testsuites to work on IPv6-only hosts.
gpshead May 17, 2021
ee00e8b
Make test_support pass on IPv6 only.
gpshead May 18, 2021
29efd49
Make test_os work on IPv6-only.
gpshead May 18, 2021
d51dc79
fix test_telnetlib IPv6-only, introduce get_family helper.
gpshead May 18, 2021
0c95594
Fix test_urllib2_localnet for IPv6-only.
gpshead May 18, 2021
7938fdc
tcp_socket() to replace socket.socket() in tests.
gpshead May 18, 2021
6436757
make test_ssl pass on IPv6-only.
gpshead May 18, 2021
d752f1a
cleanup a bit.
gpshead May 18, 2021
b726756
Make test_httplib pass IPv6-only.
gpshead May 18, 2021
66054f4
Make test_wsgiref pass on IPv6-only.
gpshead May 18, 2021
f20c40a
fix test_smtplib for IPv6-only.
gpshead May 18, 2021
8859b2a
Fix test_poplib for IPv6-only.
gpshead May 18, 2021
d485dc3
Make test_asyncore IPv6-only friendly.
gpshead May 18, 2021
77ed056
make test_asynchat IPv6-only friendly.
gpshead May 18, 2021
99e0665
Add udp_socket(), use SkipTest.
gpshead May 18, 2021
03aac81
Allow test_socket to work on IPv6-only hosts.
gpshead May 18, 2021
56d179e
cleanup test names to clarify IPv4 status.
gpshead May 18, 2021
7d55a83
Add AF_INET6 support to multiprocessing IPC.
gpshead May 19, 2021
1a72129
Fix test_httpservers for IPv6-only hosts.
gpshead May 19, 2021
bc6d51a
If starting a logging config server on AF_INET fails, try AF_INET6.
gpshead May 19, 2021
1317e7a
Fix test_logging for use on IPv6-only hosts.
gpshead May 19, 2021
6d50fa5
Make test_xmlrpc work on IPv6-only hosts rather than hang.
gpshead May 19, 2021
be88847
Prevent test_asyncio from hanging on an IPv6-only host.
gpshead May 19, 2021
5d0f8d7
Fix test_asyncio.test_streams to work on IPv6-only.
gpshead May 19, 2021
0b556da
Fix socket_helper sock vs tempsock paste error..
gpshead May 19, 2021
b7688e4
socket_helper typo (yes, find_unused_port is too ugly...)
gpshead May 19, 2021
2965d32
Undo find_unused_port complexity, use get_family()
gpshead May 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make test_asynchat IPv6-only friendly.
  • Loading branch information
gpshead committed May 18, 2021
commit 77ed056ece2fe0c524e3709c5cb836106bc361eb
5 changes: 2 additions & 3 deletions Lib/test/test_asynchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class echo_server(threading.Thread):
def __init__(self, event):
threading.Thread.__init__(self)
self.event = event
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.port = socket_helper.bind_port(self.sock)
self.sock, self.port = socket_helper.get_bound_ip_socket_and_port()
# This will be set if the client wants us to wait before echoing
# data back.
self.start_resend_event = None
Expand Down Expand Up @@ -69,7 +68,7 @@ class echo_client(asynchat.async_chat):
def __init__(self, terminator, server_port):
asynchat.async_chat.__init__(self)
self.contents = []
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.create_socket(socket_helper.get_family(), socket.SOCK_STREAM)
self.connect((HOST, server_port))
self.set_terminator(terminator)
self.buffer = b""
Expand Down