+ """detach() -> file descriptor
+ Close the socket object without closing the underlying file descriptor.
+ The object cannot be used after this call, but the file descriptor
+ can be reused for other purposes. The file descriptor is returned.
+ return super().detach()
def fromfd(fd, family, type, proto=0):
""" fromfd(fd, family, type[, proto]) -> socket object
f = self.cli_conn.detach()
# cli_conn cannot be used anymore...
self.assertRaises(socket.error, self.cli_conn.recv, 1024)
# ...but we can create another socket using the (still open)
+- Issue #13872: socket.detach() now marks the socket closed (as mirrored
+ in the socket repr()). Patch by Matt Joiner.
- Issue #14406: Fix a race condition when using ``concurrent.futures.wait(
return_when=ALL_COMPLETED)``. Patch by Matt Joiner.