Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(368)

#26685: Raise errors from socket.close()

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 8 months ago by vadmium+py
Modified:
1 year, 8 months ago
Reviewers:
victor.stinner
CC:
haypo, devnull_psf.upfronthosting.co.za, Martin Panter, Yury Selivanov
Visibility:
Public.

Patch Set 1 #

Total comments: 10

Patch Set 2 #

Patch Set 3 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/socket.rst View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
Lib/test/test_pty.py View 1 2 1 chunk +0 lines, -1 line 0 comments Download
Lib/test/test_socket.py View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
Misc/NEWS View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
Modules/socketmodule.c View 1 2 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 4
haypo
http://bugs.python.org/review/26685/diff/16866/Lib/test/test_socket.py File Lib/test/test_socket.py (right): http://bugs.python.org/review/26685/diff/16866/Lib/test/test_socket.py#newcode1166 Lib/test/test_socket.py:1166: os.close(sock.fileno()) Does the test pass on Windows? On Windows, ...
1 year, 8 months ago #1
vadmium_yahoo.com.au
https://bugs.python.org/review/26685/diff/16866/Lib/test/test_socket.py File Lib/test/test_socket.py (right): https://bugs.python.org/review/26685/diff/16866/Lib/test/test_socket.py#newcode1166 Lib/test/test_socket.py:1166: os.close(sock.fileno()) On 2016/04/01 14:16:54, haypo wrote: > Does the ...
1 year, 8 months ago #2
vadmium_yahoo.com.au
https://bugs.python.org/review/26685/diff/16866/Modules/socketmodule.c File Modules/socketmodule.c (right): https://bugs.python.org/review/26685/diff/16866/Modules/socketmodule.c#newcode2594 Modules/socketmodule.c:2594: } On 2016/04/02 02:50:40, vadmium wrote: > Yes if ...
1 year, 8 months ago #3
vadmium_yahoo.com.au
1 year, 8 months ago #4
https://bugs.python.org/review/26685/diff/16866/Lib/test/test_socket.py
File Lib/test/test_socket.py (right):

https://bugs.python.org/review/26685/diff/16866/Lib/test/test_socket.py#newco...
Lib/test/test_socket.py:1172: self.fail("close() should raise EBADF")
On 2016/04/02 02:50:40, vadmium wrote:
> On 2016/04/01 14:16:54, haypo wrote:
> > You may also test a more simple case: close the socket twice. I expect an
> error
> > at the second close.
> 
> That is a worthwhile test (if not already done somewhere else)

This seems already tested in TCPCloserTest.testClose(), which ends with:

# Calling close() many times should be safe.
conn.close()
conn.close()
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7