This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年09月01日 19:20 by pitrou, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| socket.patch | eng793, 2012年09月05日 17:57 | patch | review | |
| socket.patch | eng793, 2012年09月08日 23:51 | patch | review | |
| Messages (6) | |||
|---|---|---|---|
| msg169666 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年09月01日 19:20 | |
>>> import socket
>>> s = socket.socket()
>>> f = s.makefile("rb", buffering=0)
>>> f
<socket.SocketIO object at 0x7f2f323cd790>
>>> f.close()
>>> f.writable()
False
>>> f.readable()
False
|
|||
| msg169883 - (view) | Author: Alessandro Moura (eng793) * | Date: 2012年09月05日 17:57 | |
This patch fixes the problem, making those methods raise a ValueError exception after close. I also added one test case for this issue. |
|||
| msg170057 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年09月08日 17:16 | |
Actually, I've found a couple of issues with the patch: - it doesn't address seekable(); seekable() should also raise ValueError - the test should be done with makefile(..., buffering=0), so that SocketIO is actually tested, rather than the buffered object wrapping it |
|||
| msg170068 - (view) | Author: Alessandro Moura (eng793) * | Date: 2012年09月08日 23:51 | |
Fixed seekable(), and amended tests; see patch. |
|||
| msg170478 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年09月14日 15:34 | |
New changeset fad797916266 by Antoine Pitrou in branch '3.2': Issue #15842: the SocketIO.{readable,writable,seekable} methods now raise ValueError when the file-like object is closed. http://hg.python.org/cpython/rev/fad797916266 New changeset 3b0e20f71d8a by Antoine Pitrou in branch 'default': Issue #15842: the SocketIO.{readable,writable,seekable} methods now raise ValueError when the file-like object is closed. http://hg.python.org/cpython/rev/3b0e20f71d8a |
|||
| msg170479 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年09月14日 15:34 | |
Ok, I've committed the patch. Thanks Alessandro! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:35 | admin | set | github: 60046 |
| 2012年09月14日 15:34:51 | pitrou | set | status: open -> closed resolution: fixed messages: + msg170479 stage: resolved |
| 2012年09月14日 15:34:17 | python-dev | set | nosy:
+ python-dev messages: + msg170478 |
| 2012年09月08日 23:51:06 | eng793 | set | files:
+ socket.patch messages: + msg170068 |
| 2012年09月08日 17:16:03 | pitrou | set | messages: + msg170057 |
| 2012年09月05日 17:57:55 | eng793 | set | files:
+ socket.patch nosy: + eng793 messages: + msg169883 keywords: + patch |
| 2012年09月01日 19:20:12 | pitrou | create | |