mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
Without this patch socket.getaddrinfo crashed when called with some unusual argument combinations.
This commit is contained in:
parent
05ec6aca3a
commit
27a4ac535f
3 changed files with 15 additions and 0 deletions
|
@ -1166,6 +1166,9 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
# Issue #6697.
|
||||
self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800')
|
||||
|
||||
# Issue 17269
|
||||
socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV)
|
||||
|
||||
def test_getnameinfo(self):
|
||||
# only IP addresses are allowed
|
||||
self.assertRaises(socket.error, socket.getnameinfo, ('mail.python.org',0), 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue