[New-bugs-announce] [issue23753] Drop HAVE_FSTAT: require fstat() to compile/use Python

STINNER Victor report at bugs.python.org
Mon Mar 23 18:16:39 CET 2015


New submission from STINNER Victor:

Topic previously discussed at:
https://mail.python.org/pipermail/python-dev/2013-May/126285.html

Related issue:
http://bugs.python.org/issue12082

Antoine Pitrou wrote in the issue:
"I would personally like to remove HAVE_FSTAT and make Python unconditionally use fstat(). It will make the code quite simpler in some places."

I agree. I'm quite sure that Python doesn't work on such platform, and it would require much more changes than just making fstat optional.

So I'm in favor of dropping the check on fstat() and expect it to be always available.

Examples of Python modules of the standard library using os.fstat:

- fileinput
- genericpath
- netrc
- os which contains "set.add(stat) # fstat always works"
- _pyio (the call is optional, it catchs AttributeError)
- shutil
- socket
- tarfile
- asyncio
- http.client (optional, catch AttributeError)
- http.server
- logging
- io
- etc.

----------
messages: 239047
nosy: haypo, neologix, pitrou
priority: normal
severity: normal
status: open
title: Drop HAVE_FSTAT: require fstat() to compile/use Python
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23753>
_______________________________________


More information about the New-bugs-announce mailing list