You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
O_ASYNC and FASYNC should be defined if available #47139
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2008-05-16.13:10:34.714>created_at=<Date2008-05-16.07:25:03.016>labels= ['type-feature', 'library']
title='O_ASYNC and FASYNC should be defined if available'updated_at=<Date2008-05-16.13:42:02.644>user='https://bugs.python.org/donmez'
These flags are non-posix, linux-specific constants. Python 'os' module
uses 'posix' module for all *nix systems, including those, that do not
support O_ASYNC and FASYNC flags. I think your feature request should be
rejected.
donmez commented on May 16, 2008
donmezmannequin
MannequinAuthor
More actions
I think they at least should be supported on Linux then. It does work if
you use the value itself anyway.
mishok13 commented on May 16, 2008
mishok13mannequin
Mannequin
More actions
I think they at least should be supported on Linux then.
And what happens if some Unix flavor (i.e. Solaris) adds new flag, say
O_NONLINUXSYNC and it has the same value as linux's O_ASYNC? And then
FreeBSD adds O_BSDSYNC flag with the same number and so on. Then Python
will have to have separate system-specific module for each *nix system
that uses Python. Why do you think Python maintainers would want that?
It does work if you use the value itself anyway.
It's the way fcntl works -- it's just a thin layer on top of fcntl() and
ioctl() calls. But that's not a good reason for including non-posix
flags to 'posix' module
Platform-specific values are not a problem.
On win32 os.O_NOINHERIT == 128, and on linux os.O_EXCL has the same value.
Python just exposes the available #defines at the module level.
(btw, the posix module is also available on windows. It is named 'nt',
but it is really the same module)
And in posixmodule.c, There are already some "GNU extensions":
os.O_DIRECT, os.O_NOFOLLOW...
donmez commented on May 16, 2008
donmezmannequin
MannequinAuthor
More actions
Add O_ASYNC and FASYNC as GNU extensions.
donmez commented on May 16, 2008
donmezmannequin
MannequinAuthor
More actions
Python code already has GNU/Windows only exceptions. Attached patch adds
O_ASYNC and FASYNC as GNU extensions. If accepted I can send a
complimentary documentation patch.
Activity
donmez commentedon May 16, 2008
os module have varios O_ declerations but it doesn't define O_ASYNC.
Same for fcntl module which doesn't define FASYNC.
Simply defining
works fine but its not as elegant as saying os.O_ASYNC.
mishok13 commentedon May 16, 2008
These flags are non-posix, linux-specific constants. Python 'os' module
uses 'posix' module for all *nix systems, including those, that do not
support O_ASYNC and FASYNC flags. I think your feature request should be
rejected.
donmez commentedon May 16, 2008
I think they at least should be supported on Linux then. It does work if
you use the value itself anyway.
mishok13 commentedon May 16, 2008
And what happens if some Unix flavor (i.e. Solaris) adds new flag, say
O_NONLINUXSYNC and it has the same value as linux's O_ASYNC? And then
FreeBSD adds O_BSDSYNC flag with the same number and so on. Then Python
will have to have separate system-specific module for each *nix system
that uses Python. Why do you think Python maintainers would want that?
It's the way fcntl works -- it's just a thin layer on top of fcntl() and
ioctl() calls. But that's not a good reason for including non-posix
flags to 'posix' module
amauryfa commentedon May 16, 2008
Platform-specific values are not a problem.
On win32 os.O_NOINHERIT == 128, and on linux os.O_EXCL has the same value.
Python just exposes the available #defines at the module level.
(btw, the posix module is also available on windows. It is named 'nt',
but it is really the same module)
And in posixmodule.c, There are already some "GNU extensions":
os.O_DIRECT, os.O_NOFOLLOW...
donmez commentedon May 16, 2008
Add O_ASYNC and FASYNC as GNU extensions.
donmez commentedon May 16, 2008
Python code already has GNU/Windows only exceptions. Attached patch adds
O_ASYNC and FASYNC as GNU extensions. If accepted I can send a
complimentary documentation patch.
[-]O_ASYNC and FASYNC should be defined for *nix systems[/-][+]O_ASYNC and FASYNC should be defined if available[/+]birkenfeld commentedon May 16, 2008
OK, committed patch in r63368. Thanks!
donmez commentedon May 16, 2008
Thanks, can you also apply to py3k branch? :)
birkenfeld commentedon May 16, 2008
That will happen automatically.
donmez commentedon May 16, 2008
Documentation patch is added too.
birkenfeld commentedon May 16, 2008
Thanks, applied in r63373.