correspond to the members of the :c:type:`statvfs` structure, namely:
:attr:`f_bsize`, :attr:`f_frsize`, :attr:`f_blocks`, :attr:`f_bfree`,
:attr:`f_bavail`, :attr:`f_files`, :attr:`f_ffree`, :attr:`f_favail`,
- :attr:`f_flag`, :attr:`f_namemax`.
+ :attr:`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`.
Two module-level constants are defined for the :attr:`f_flag` attribute's
bit-flags: if :const:`ST_RDONLY` is set, the filesystem is mounted
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
+ .. versionadded:: 3.7
+ Added :attr:`f_fsid`.
+
.. data:: supports_dir_fd
for value, member in enumerate(members):
self.assertEqual(getattr(result, 'f_' + member), result[value])
+ self.assertTrue(isinstance(result.f_fsid, int))
+
+ # Test that the size of the tuple doesn't change
+ self.assertEqual(len(result), 10)
+
# Make sure that assignment really fails
try:
result.f_bfree = 1
{"f_favail", },
{"f_flag", },
{"f_namemax",},
+ {"f_fsid", },
{0}
};
PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag));
PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax));
#endif
+ PyStructSequence_SET_ITEM(v, 10, PyLong_FromUnsignedLong(st.f_fsid));
if (PyErr_Occurred()) {
Py_DECREF(v);
return NULL;