Issue 990749: os constants missing (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/40558

classification

Title: os constants missing
Type: Stage:
Components: Documentation Versions:

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, connelly, tim.peters
Priority: normal Keywords:

Created on 2004-07-14 09:18 by connelly, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg21574 - (view) Author: Connelly (connelly) Date: 2004-07-14 09:18
Some constants are missing from the os module on Windows. http://docs.python.org/lib/os-fd-ops.html falsely claims that the following O_ constants are present on Windows: os.O_NDELAY os.O_NONBLOCK os.O_DSYNC os.O_RSYNC os.O_SYNC os.O_NOCTTY None of these constants are defined in module os on Windows. These constants allow file locking (via os.open). Currently, there is no cross platform way to lock a file in Python. I originally became interested in these constants because of the following quote from module fcntl: "The os.open function supports locking flags and is available on a wider variety of platforms than the fcntl.lockf and fcntl.flock functions, providing a more platform-independent file locking facility."
msg21575 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2004-07-15 05:35
Logged In: YES user_id=31435 Changed category to Documentation, since this is a doc bug. The O_XXX constants listed here aren't available on Windows because Windows itself doesn't support them (and never will), so that part of the docs should change. That doesn't change that these constants may be more portable than fcntl gimmicks (are they? don't know).
msg21576 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2004-07-15 05:38
Logged In: YES user_id=31435 Weird -- a *comment* in the LaTeX source already notes that those 6 constants aren't supported on Windows. Heh.
msg21577 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2004-07-15 05:49
Logged In: YES user_id=31435 Split the 6 non-Windows os.O_XXX constants into a different table, and removed the LaTeX comment, in Doc/lib/libos.tex rev 1.138. Leaving this open for someone to investigate the doc's claim that these things are more portable than the fcntl gimmicks (offhand, doesn't seem likely to me).
msg59256 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-04 19:56
The docs claim are wrong.
History
Date User Action Args
2022-04-11 14:56:05 admin set github: 40558
2008-01-04 19:56:29 christian.heimes set status: open -> closednosy: + christian.heimesresolution: fixedmessages: +
2004-07-14 09🔞58 connelly create