Commit f8f1f487 authored by Jason Madden's avatar Jason Madden

Sync windows socketpair with Python 3.5+

parent 5f509a94
......@@ -678,9 +678,8 @@ if hasattr(_socket, "socketpair"):
else: # pragma: no cover
# Origin: https://gist.github.com/4325783, by Geert Jansen. Public domain.
# gevent: taken from 3.6 release. Expected to be used only on Win. Added to Win/3.5
# gevent: for < 3.5, pass the default value of 128 to lsock.listen()
# (3.5+ uses this as a default and the original code passed no value)
# gevent: taken from 3.6 release, confirmed unchanged in 3.7 and
# 3.8a1. Expected to be used only on Win. Added to Win/3.5
_LOCALHOST = '127.0.0.1'
_LOCALHOST_V6 = '::1'
......@@ -703,7 +702,7 @@ else: # pragma: no cover
lsock = socket(family, type, proto)
try:
lsock.bind((host, 0))
lsock.listen(128)
lsock.listen()
# On IPv6, ignore flow_info and scope_id
addr, port = lsock.getsockname()[:2]
csock = socket(family, type, proto)
......
# We can monkey-patch in a thread, but things don't work as expected.
from __future__ import print_function
import sys
import threading
from gevent import monkey
import gevent.testing as greentest
......
......@@ -157,7 +157,6 @@ else:
return main_threads[0]
import sys
if PY3:
# XXX: Issue 18808 breaks us on Python 3.4+.
# Thread objects now expect a callback from the interpreter itself
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment