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年03月14日 16:58 by Shane.Hansen, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test.py | Shane.Hansen, 2012年03月14日 16:58 | script which asserts that dup() was called and the object returned by makefile has a different fileno() than the socket. | ||
| Messages (3) | |||
|---|---|---|---|
| msg155768 - (view) | Author: Shane Hansen (Shane.Hansen) | Date: 2012年03月14日 16:58 | |
The python docs state that for socket.makefile "The file object references a dup()ped version of the socket file descriptor, so the file object and socket object may be closed or garbage-collected independently." In fact for socket.py dup() is never called, and no additional files are opened. Instead an object is returned which uses the original socket and does buffering. For me, this is the desired behaviour, but just thought I'd mention the docs were off. |
|||
| msg228592 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年10月05日 17:27 | |
Shane, there are major differences between the makefile docs versions 2 and 3, so could you prepare a patch for this addressed at version 2 only? |
|||
| msg228697 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年10月06日 14:37 | |
New changeset 6e2a72e05b4f by Georg Brandl in branch '2.7': Closes #14303: socket.makefile() does not call dup() anymore on the socket fd. https://hg.python.org/cpython/rev/6e2a72e05b4f |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:28 | admin | set | github: 58511 |
| 2014年10月06日 14:37:04 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg228697 resolution: fixed stage: resolved |
| 2014年10月05日 17:27:53 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg228592 versions: - Python 2.6 |
| 2013年06月15日 05:29:55 | eric.snow | set | nosy:
+ eric.snow |
| 2012年03月14日 16:58:17 | Shane.Hansen | create | |