Mailing List Archive

[issue2890] O_ASYNC and FASYNC should be defined for *nix systems
New submission from Ismail Donmez <ismail@namtrac.org>:

os module have varios O_ declerations but it doesn't define O_ASYNC.
Same for fcntl module which doesn't define FASYNC.

Simply defining

O_ASYNC = 020000

works fine but its not as elegant as saying os.O_ASYNC.

----------
components: Library (Lib)
messages: 66921
nosy: cartman
severity: normal
status: open
title: O_ASYNC and FASYNC should be defined for *nix systems
versions: Python 2.5

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue2890] O_ASYNC and FASYNC should be defined for *nix systems [ In reply to ]
Changes by Ismail Donmez <ismail@namtrac.org>:


----------
type: -> feature request

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue2890] O_ASYNC and FASYNC should be defined for *nix systems [ In reply to ]
Andrii V. Mishkovskyi <mishok13@gmail.com> added the comment:

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.

----------
nosy: +mishok13

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue2890] O_ASYNC and FASYNC should be defined for *nix systems [ In reply to ]
Ismail Donmez <ismail@namtrac.org> added the comment:

I think they at least should be supported on Linux then. It does work if
you use the value itself anyway.

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue2890] O_ASYNC and FASYNC should be defined for *nix systems [ In reply to ]
Andrii V. Mishkovskyi <mishok13@gmail.com> added the comment:

>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

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue2890] O_ASYNC and FASYNC should be defined for *nix systems [ In reply to ]
Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:

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...

----------
nosy: +amaury.forgeotdarc

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue2890] O_ASYNC and FASYNC should be defined for *nix systems [ In reply to ]
Ismail Donmez <ismail@namtrac.org> added the comment:

Add O_ASYNC and FASYNC as GNU extensions.

----------
keywords: +patch
Added file: http://bugs.python.org/file10341/async.patch

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue2890] O_ASYNC and FASYNC should be defined for *nix systems [ In reply to ]
Ismail Donmez <ismail@namtrac.org> added the comment:

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.

Added file: http://bugs.python.org/file10342/async.patch

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue2890] O_ASYNC and FASYNC should be defined for *nix systems [ In reply to ]
Changes by Ismail Donmez <ismail@namtrac.org>:


Removed file: http://bugs.python.org/file10341/async.patch

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue2890>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com