Title: socket.fileno() returns java object not int
Type: behaviour Severity: normal
Components: Core Versions: 2.5.2b1
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: amak Nosy List: amak, kellyc2702
Priority: Keywords:

Created on 2010-11-18.15:25:27 by kellyc2702, last changed 2011-02-28.22:35:16 by amak.

msg6254 (view) Author: Kelly Campbell (kellyc2702) Date: 2010-11-18.15:25:27
socket.fileno() is documented as such:
"Return the socket’s file descriptor (a small integer)."

However, it returns the instance.
msg6256 (view) Author: Alan Kennedy (amak) Date: 2010-11-20.16:44:15
This is an implementation detail of jython: the java platform does not support integer file descriptors in the way that C does.

See the following discussion from 2007 for a detailed discussion of why.
msg6258 (view) Author: Kelly Campbell (kellyc2702) Date: 2010-11-20.16:50:09
Understood. I think the documentation should be updated to reflect this.
msg6264 (view) Author: Alan Kennedy (amak) Date: 2010-11-26.17:44:48
Reopening, to remind me to document this difference with cpython.
msg6420 (view) Author: Alan Kennedy (amak) Date: 2011-02-28.22:35:15
OK, I've documented this on the socket module wiki, along with supporting references to email discussions on python-dev and jython-dev.

Therefore, I am now closing this bug.
Date User Action Args
2011-02-28 22:35:16amaksetstatus: open -> closed
messages: + msg6420
2010-11-26 17:44:48amaksetstatus: closed -> open
messages: + msg6264
2010-11-20 16:50:09kellyc2702setmessages: + msg6258
2010-11-20 16:44:15amaksetstatus: open -> closed
assignee: amak
resolution: wont fix
messages: + msg6256
nosy: + amak
2010-11-18 15:25:27kellyc2702create