Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit296a660

Browse files
authored
gh-127840: Revert "gh-127840: pass flags and address from send_fds (GH-127841)" (#134482)
Revert "gh-127840: pass flags and address from send_fds (GH-127841)"This reverts commit518c95b.
1 parentf3fc0c1 commit296a660

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

‎Lib/socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def send_fds(sock, buffers, fds, flags=0, address=None):
563563
importarray
564564

565565
returnsock.sendmsg(buffers, [(_socket.SOL_SOCKET,
566-
_socket.SCM_RIGHTS,array.array("i",fds))],flags,address)
566+
_socket.SCM_RIGHTS,array.array("i",fds))])
567567
__all__.append("send_fds")
568568

569569
ifhasattr(_socket.socket,"recvmsg"):

‎Lib/test/test_socket.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7366,30 +7366,6 @@ def close_fds(fds):
73667366
data=os.read(rfd,100)
73677367
self.assertEqual(data,str(index).encode())
73687368

7369-
deftestSendAndRecvFdsByAddress(self):
7370-
rfd,wfd=os.pipe()
7371-
self.addCleanup(os.close,rfd)
7372-
self.addCleanup(os.close,wfd)
7373-
7374-
sock=socket.socket(socket.AF_UNIX,socket.SOCK_DGRAM)
7375-
address=socket_helper.create_unix_domain_name()
7376-
self.addCleanup(os_helper.unlink,address)
7377-
socket_helper.bind_unix_socket(sock,address)
7378-
7379-
socket.send_fds(sock, [MSG], [rfd],0,address)
7380-
7381-
# request more data and file descriptors than expected
7382-
msg, (rfd2,),flags,addr=socket.recv_fds(sock,len(MSG)*2,2)
7383-
self.addCleanup(os.close,rfd2)
7384-
self.assertEqual(msg,MSG)
7385-
self.assertEqual(flags,0)
7386-
self.assertEqual(addr,address)
7387-
7388-
# test that the file descriptor is connected
7389-
os.write(wfd,b'data')
7390-
data=os.read(rfd2,100)
7391-
self.assertEqual(data,b'data')
7392-
73937369

73947370
classFreeThreadingTests(unittest.TestCase):
73957371

‎Misc/NEWS.d/next/Library/2024-12-11-20-15-00.gh-issue-127840.pt8fiQ.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp