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: bad example for os.stat
Type: Stage: resolved
Components: Documentation Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: JelleZijlstra, docs@python, harridu, miss-islington, wangjiahua
Priority: normal Keywords: patch

Created on 2021-09-06 11:54 by harridu, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29845 merged wangjiahua, 2021-11-29 14:05
PR 32267 merged miss-islington, 2022-04-02 20:58
PR 32268 merged miss-islington, 2022-04-02 20:58
Messages (4)
msg401133 - (view) Author: Harri (harridu) Date: 2021-09-06 11:54
The example on https://docs.python.org/3/library/stat.html should be improved to avoid endless recursion, if there is a symlink loop. I would suggest to use os.lstat instead of os.stat.
msg416587 - (view) Author: Jelle Zijlstra (JelleZijlstra) * (Python committer) Date: 2022-04-02 20:58
New changeset c93a0ac6972221787d8bea1c41a9feb667ed3d2c by 180909 in branch 'main':
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
https://github.com/python/cpython/commit/c93a0ac6972221787d8bea1c41a9feb667ed3d2c
msg416589 - (view) Author: miss-islington (miss-islington) Date: 2022-04-02 21:19
New changeset 23c0200c436714a3f9b38d5e6cac230ceacd4c43 by Miss Islington (bot) in branch '3.10':
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
https://github.com/python/cpython/commit/23c0200c436714a3f9b38d5e6cac230ceacd4c43
msg416590 - (view) Author: miss-islington (miss-islington) Date: 2022-04-02 21:21
New changeset dc9322a91d48c80afe8329bb509673a2f74fb925 by Miss Islington (bot) in branch '3.9':
bpo-45114: Use lstat() instead of stat() in stat docs example (GH-29845)
https://github.com/python/cpython/commit/dc9322a91d48c80afe8329bb509673a2f74fb925
History
Date User Action Args
2022-04-11 14:59:49adminsetgithub: 89277
2022-04-02 21:21:56miss-islingtonsetmessages: + msg416590
2022-04-02 21:19:51miss-islingtonsetmessages: + msg416589
2022-04-02 20:59:57JelleZijlstrasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-04-02 20:58:41miss-islingtonsetpull_requests: + pull_request30334
2022-04-02 20:58:37miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request30333
2022-04-02 20:58:34JelleZijlstrasetnosy: + JelleZijlstra
messages: + msg416587
2021-11-29 14:05:14wangjiahuasetkeywords: + patch
nosy: + wangjiahua

pull_requests: + pull_request28074
stage: patch review
2021-09-06 11:54:30harriducreate