This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.chmod() documentation refers to non-existent documentation in stat
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: r.david.murray Nosy List: georg.brandl, mhearne808, r.david.murray
Priority: normal Keywords: easy

Created on 2009-06-30 15:49 by mhearne808, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg89932 - (view) Author: Michael (mhearne808) Date: 2009-06-30 15:49
If you look at the documentation for os.chmod(), it says:
"mode may take one of the following values (as defined in the stat
module)..."

and then lists a number of constants from the stat module (stat.S_ISUID,
stat.S_ISGID, etc.)

I cannot seem to find these constants defined anywhere on the stat
module page.  May I suggest that these constants be defined in the
documentation for os.chmod(), to make it easier on the user?
msg89935 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-06-30 16:17
Since the constants are listed in the os.chmod section of the manual, do
I understand that you are suggesting that the eplanations of the
meanings of the flags from the chmod man page be added to that list?

I observe that in the unix man pages the flags are documented both in
the chmod(2) man page and the stat(2) man page, with somewhat different
text.  I'm not sure this informational redundancy is good...and I'd be
inclined to put the docs in the stat module docs where the flags are
actually defined.  They will then be hotlinked from the flag list in
os.chmod.
msg89937 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-06-30 16:21
I agree with David.
msg90031 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-07-02 18:28
I've added the documentation of the flags defined in the stat module in
r73778, with the os.chmod references to the hyperlinked.  The
descriptions are taken from the linux stat(2) page, so if anyone spots
any cross-platform inaccuracies let me know.  (As far as I can see the
flags are defined on Windows, they are just meaningless there, for the
most part).
History
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50638
2009-07-02 18:28:25r.david.murraysetstatus: open -> closed
messages: + msg90031

assignee: georg.brandl -> r.david.murray
resolution: fixed
stage: needs patch -> resolved
2009-06-30 16:21:26georg.brandlsetmessages: + msg89937
2009-06-30 16:17:42r.david.murraysetpriority: normal

type: enhancement
versions: + Python 3.1, Python 2.7, Python 3.2
keywords: + easy
nosy: + r.david.murray

messages: + msg89935
stage: needs patch
2009-06-30 15:49:01mhearne808create