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.

Title: Docs error for 3.10
Type: behavior Stage:
Components: Documentation Versions: Python 3.10
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.araujo, mdk, terry.reedy, usetohandletrush
Priority: normal Keywords:

Created on 2022-02-17 18:12 by usetohandletrush, last changed 2022-04-11 14:59 by admin.

Messages (4)
msg413425 - (view) Author: sjndlnv brjkbn (usetohandletrush) Date: 2022-02-17 18:12
Document for 3.10 version seems auto convert 0o777 to 511. And it's correct for 3.9

(May be due to new version of Sphinx? Seems source code for docs are correct.)


It may misleading user. If we use os.mkdir(mode=511), it's not equal to use os.mkdir(mode=0o777)
msg413518 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-02-19 00:20
The conversions from 0o777 to 511 in 3.10 and 3.11 but not in 3.9 are these:
  Path.mkdir(mode=511, parents=False, exist_ok=False)
  os.mkdir(path, mode=511, *, dir_fd=None)

I don't know whether different sphinx versions are used for different versions of the docs.
msg413533 - (view) Author: sjndlnv brjkbn (usetohandletrush) Date: 2022-02-19 05:31
I found out that this issue can be fixed by set ``autodoc_preserve_defaults`` to True [(From sphinx-doc)](

On the other hand. I test ``Path.mkdir(mode=511)`` on my mac. It's the same as ``Path.mkdir(mode=0o77)``

But it's not the same on my company's dev linux server.

I will double check this part on Monday.
msg413542 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2022-02-19 10:49
Octal 777 is really the same as decimal 511.
If you are calling mkdir and looking at the permissions on the created directory, you may think the mode is wrong because of umask (default permission bitmask that’s applied to the mode).  But the numbers are really equivalent, we are only talking about a doc presentation issue here, not any problem in code.
Date User Action Args
2022-04-11 14:59:56adminsetgithub: 90938
2022-02-19 10:49:50eric.araujosetmessages: + msg413542
2022-02-19 05:31:11usetohandletrushsetmessages: + msg413533
2022-02-19 00:20:05terry.reedysetnosy: + eric.araujo, mdk, terry.reedy
messages: + msg413518
2022-02-17 18:12:21usetohandletrushcreate