gh-136156: Allow using linkat() with TemporaryFile#136281
gh-136156: Allow using linkat() with TemporaryFile#136281vstinner merged 2 commits intopython:mainfrom
Conversation
tempfile.TemporaryFile() no longer uses os.O_EXCL with os.O_TMPFILE, so it's possible to use linkat() on the file descriptor.
|
Could you add a test using the proc filesystem? I tried to implement AT_EMPTY_PATH support (see #89341), but it only works for root. |
| self.assertEqual(os.listdir(dir), []) | ||
|
|
||
| @unittest.skipUnless(tempfile._O_TMPFILE_WORKS, 'need os.O_TMPFILE') | ||
| @unittest.skipUnless(os.path.exists('/proc/self/fd'), |
|
!buildbot BSD |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit c912963 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136281%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
I tested manually: the test is skipped since |
|
Merged, thanks for review @serhiy-storchaka. |
|
|
Oh, the test fails with PermissionError on Android: |
|
I wrote #136430 to fix the test on Android. |
|
|
Oh. The test fails on Arch Linux buildbots: https://buildbot.python.org/#/builders/582/builds/6857 |
tempfile.TemporaryFile() no longer uses os.O_EXCL with os.O_TMPFILE, so it's possible to use linkat() on the file descriptor.
tempfile.TemporaryFile() no longer uses os.O_EXCL with os.O_TMPFILE, so it's possible to use linkat() on the file descriptor.
tempfile.TemporaryFile() no longer uses os.O_EXCL with os.O_TMPFILE, so it's possible to use linkat() on the file descriptor.
tempfile.TemporaryFile() no longer uses os.O_EXCL with os.O_TMPFILE, so it's possible to use linkat() on the file descriptor.
The buildbot is back to green. |
tempfile.TemporaryFile() no longer uses os.O_EXCL with os.O_TMPFILE, so it's possible to use linkat() on the file descriptor.
tempfile.TemporaryFile() no longer uses os.O_EXCL with os.O_TMPFILE, so it's possible to use linkat() on the file descriptor.