STINNER Victor added the comment: It looks like O_TMPFILE is supported by tmpfs (3.11), ext3 (3.11), ext4 (3.11), XFS (3.15). It looks like BTRFS will also support the O_TMPFILE: https://btrfs.wiki.kernel.org/index.php/Project_ideas#Implement_O_TMPFILE_support
-- It looks like os.open() fails with OSError(95, 'Operation not supported') if the filesystem of the directory doesn't support TMPFILE. In this case, a fallback to the current implementation should be enough. I don't think that we need to remember that the directory doesn't support TMPFILE. The directory may be on a different filesystem at the next call. haypo@smithers$ ~/prog/python/default/python Python 3.5.0a0 (default:5e98a50e0f55, May 16 2014, 10:44:10) >>> import tempfile >>> tempfile._O_TMPFILE 4259840 >>> f=tempfile.TemporaryFile(dir='.') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/haypo/prog/python/default/Lib/tempfile.py", line 507, in TemporaryFile fd = _os.open(dir, flags, 0o600) OSError: [Errno 95] Operation not supported: '.' haypo@smithers$ df . Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur 192.168.0.42:/test 96G 9,1G 83G 10% /home/haypo/nfs ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21515> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com