[Python-Dev] stat module in C -- what to do with stat.py?

Victor Stinner victor.stinner at gmail.com
Fri Jun 21 00:18:16 CEST 2013

2013/6/20 Eric V. Smith <eric at trueblade.com>:
> This is serious, not argumentative: If there's really no concern that
> the values be correct, then why implement it in C?

I read again the issue. The problem is to add new flags. Current flags
(type: block device/symlink/..., file mode) are well defined and
portable, whereas new flags are usually specific to an OS and no
standardize yet. Examples:

- Solaris: "door"
- Solaris: "event port"
- OSX/Darwin/FreeBSD: "whiteout"

The other problem is that values of the new flags are not portable.
Martin v. Löwis wrote:
"Looking in more detail: for the S_IFMT flags, OSX/Darwin/FreeBSD defines
0xe000 as S_IFWHT (whiteout), but Solaris defines it as
S_IFPORT (event port)."

A C module reusing existing S_ISxxx() macros is the obvious way to
solve this issue.


More information about the Python-Dev mailing list