This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients georg.brandl, josh.r, ncoghlan, neologix, pitrou, vstinner
Date 2014-05-18.09:52:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400406768.62.0.300352761155.issue21515@psf.upfronthosting.co.za>
In-reply-to
Content
tempfile_o_tmpfile2.patch: Updated patch to handle OS errors.

I'm not sure that __O_TMPFILE has the same value on all architectures.

The O_TMPFILE flag was added to fcntl.h in the glibc 2.19 (released the 8 Feb 2014):
https://sourceware.org/git/?p=glibc.git;a=commit;h=ffdd31816a67f48697ea4d6b852e58d2886d42ca

My Linux Fedora 20 uses the glibc 2.18.

I removed the hardcoded constant from my patch. Add this to Lib/tempfile.py to test manually if you have a glibc older than 2.19:

# after "if hasattr(_os, 'O_TMPFILE'):"
elif _sys.platform == 'linux':
    __O_TMPFILE = 0o20000000
    _O_TMPFILE = (__O_TMPFILE | _os.O_DIRECTORY)
History
Date User Action Args
2014-05-18 09:52:48vstinnersetrecipients: + vstinner, georg.brandl, ncoghlan, pitrou, neologix, josh.r
2014-05-18 09:52:48vstinnersetmessageid: <1400406768.62.0.300352761155.issue21515@psf.upfronthosting.co.za>
2014-05-18 09:52:48vstinnerlinkissue21515 messages
2014-05-18 09:52:48vstinnercreate