[issue13321] fstat doesn't accept an object with "fileno" method

2011-11-04 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

Closing as wontfix.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13321] fstat doesn't accept an object with "fileno" method

2011-11-04 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
resolution:  -> wont fix
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13321] fstat doesn't accept an object with "fileno" method

2011-11-02 Thread Eric V. Smith

Eric V. Smith  added the comment:

If I understand it correctly, this change request is to change os.fstat(obj) 
(and probably other functions) to call obj.fileno(), instead of the caller 
doing that?

If so, -1. Keep os.fstat() as a thin wrapper around fstat.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13321] fstat doesn't accept an object with "fileno" method

2011-11-02 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
priority: normal -> low

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13321] fstat doesn't accept an object with "fileno" method

2011-11-02 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

This is a request for new functionality, so marking as a feature request for 
3.3. If implemented, the change should be applied to many other functions, in 
the os module at least.

I'm not sure whether this is very useful, though. The fstat(f.fileno()) idiom 
doesn't require that much writing and makes it explicit that we're operating on 
an underlying file descriptor. Furthermore, funtions in the os module are 
low-level and map very closely to the underlying C API.

--
nosy: +benjamin.peterson, petri.lehtinen, pitrou, stutzbach
type: behavior -> feature request
versions:  -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13321] fstat doesn't accept an object with "fileno" method

2011-11-01 Thread Matt Joiner

New submission from Matt Joiner :

os.fstat doesn't not accept an object with the fileno() method.

Probably a bunch of other similar functions will not either.

In some parts of the standard library it's common practice to call 
PyObject_AsFileDescriptor on fd-wrapping arguments.

http://hg.python.org/cpython/file/d877d7f3b679/Modules/posixmodule.c#l7319
http://hg.python.org/cpython/file/d877d7f3b679/Objects/fileobject.c#l196

--
components: Library (Lib)
messages: 146823
nosy: anacrolix
priority: normal
severity: normal
status: open
title: fstat doesn't accept an object with "fileno" method
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com