classification
Title: Some macOS open flags are missing from posixmodule.c
Type: enhancement Stage: resolved
Components: Extension Modules, macOS Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: corona10, ned.deily, ronaldoussoren
Priority: normal Keywords: easy (C), patch

Created on 2021-02-02 19:26 by ronaldoussoren, last changed 2021-02-04 01:13 by corona10. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24428 merged corona10, 2021-02-03 08:07
Messages (5)
msg386159 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2021-02-02 19:26
The following O_* flags are present in the macOS 11 SDK, but aren't provided by posixmodule.c:

O_FSYNC (alias for O_SYNC)
O_EVTONLY
O_SYMLINK
O_NOFOLLOW_ANY
msg386161 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2021-02-02 19:34
Likewise for O_POPUP and O_ALERT, although I don't understand what these are supposed to do.
msg386179 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-02-03 07:33
I can see some users use such flags with manual mapping
Looks good to support it :)

https://github.com/TaskEvolution/Task-Coach-Evolution/blob/master/taskcoach/taskcoachlib/filesystem/fs_darwin.py#L27
msg386181 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-02-03 08:34
O_FSYNC could be used as an alias of O_SYNC.
O_EVTONLY is used for kqueue API.

but other flags I don't know where to use it.
So I submit the patch to add O_FSYNC and O_EVTONLY only.

If other flags should be added, please let me know
msg386466 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-02-03 23:33
New changeset f917c243c52d62a787738379fb9b97acbed02c17 by Dong-hee Na in branch 'master':
bpo-43106: Add os.O_EVTONLY/O_FSYNC/O_SYMLINK/O_NOFOLLOW_ANY (GH-24428)
https://github.com/python/cpython/commit/f917c243c52d62a787738379fb9b97acbed02c17
History
Date User Action Args
2021-02-04 01:13:54corona10setstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-02-03 23:33:02corona10setmessages: + msg386466
2021-02-03 08:34:27corona10setmessages: + msg386181
2021-02-03 08:07:54corona10setkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request23238
2021-02-03 07:33:43corona10setmessages: + msg386179
2021-02-03 07:07:34corona10setnosy: + corona10
2021-02-02 19:34:51ronaldoussorensetmessages: + msg386161
2021-02-02 19:26:29ronaldoussorencreate