Skip to content

Commit 0f650cc

Browse files
authored
Apply suggestions from code review
Co-authored-by: Victor Stinner <[email protected]>
1 parent 66db041 commit 0f650cc

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/test/test_ssl.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5066,9 +5066,8 @@ def test_got_eof(self):
50665066
sslobj.read(1024)
50675067
if hasattr(sslobj, 'sendfile'):
50685068
with open(__file__, "rb") as fp:
5069-
fd = fp.fileno()
50705069
with self.assertRaises(ssl.SSLEOFError):
5071-
sslobj.sendfile(fd, 0, 1)
5070+
sslobj.sendfile(fp.fileno(), 0, 1)
50725071
with self.assertRaises(ssl.SSLEOFError):
50735072
sslobj.write(b'client2\n')
50745073
with self.assertRaises(ssl.SSLEOFError):

Misc/NEWS.d/next/Library/2026-04-28-17-47-55.gh-issue-148292.oIq3ml.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:mod:`ssl`: Update :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` for
2-
OpenSSL 4. The class now remembers if it gets a :exc:`ssl.SSLEOFError`. In this
2+
OpenSSL 4. The classes now remember if they get a :exc:`ssl.SSLEOFError`. In this
33
case, following :meth:`~ssl.SSLSocket.read`, :meth:`!sendfile`,
44
:meth:`~ssl.SSLSocket.write`, and :meth:`~ssl.SSLSocket.do_handshake` calls
55
raise :exc:`ssl.SSLEOFError` without calling the underlying OpenSSL function.

0 commit comments

Comments
 (0)