Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch to compile on gnu/hurd #3290

Open
SnarkBoojum opened this issue Jun 26, 2023 · 1 comment
Open

Patch to compile on gnu/hurd #3290

SnarkBoojum opened this issue Jun 26, 2023 · 1 comment

Comments

@SnarkBoojum
Copy link

The Debian package for tornado has to following patch since long, but I think it was never forwarded:

--- python-tornado.orig/tornado/test/httpserver_test.py
+++ python-tornado/tornado/test/httpserver_test.py
@@ -711,6 +711,8 @@
     not hasattr(socket, "AF_UNIX") or sys.platform == "cygwin",
     "unix sockets not supported on this platform",
 )
+@unittest.skipIf(sys.platform == 'gnu0',
+                 "unix sockets with SO_REUSEADDR not supported on this platform")
 class UnixSocketTest(AsyncTestCase):
     """HTTPServers can listen on Unix sockets too.

you might be interested.

@bdarnell
Copy link
Member

I think that patch may be obsolete. We now have an except clause in bind_unix_socket to catch an error that is said to occur on hurd:

tornado/tornado/netutil.py

Lines 205 to 210 in 559f94a

try:
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
except socket.error as e:
if errno_from_exception(e) != errno.ENOPROTOOPT:
# Hurd doesn't support SO_REUSEADDR
raise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants