[issue15221] os.path.is*() may return False if path can't be accessed

New submission from Giampaolo Rodola' <g.rodola@gmail.com>: It seems a doc fix is the best way to go, in which case I leave this one to a native English speaker: http://mail.python.org/pipermail/python-dev/2012-June/120788.html Alternatively a new 'strict' parameter has been proposed as a workaround: http://mail.python.org/pipermail/python-dev/2012-June/120800.html ---------- assignee: docs@python components: Documentation messages: 164307 nosy: christian.heimes, docs@python, eric.araujo, ezio.melotti, georg.brandl, giampaolo.rodola, ncoghlan priority: normal severity: normal status: open title: os.path.is*() may return False if path can't be accessed versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15221> _______________________________________

Changes by Cameron Simpson <cs@zip.com.au>: ---------- nosy: +cameron _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15221> _______________________________________

Antoine Pitrou <pitrou@free.fr> added the comment: -1 on a "strict" parameter. This is a pointless obfuscation of the API. ---------- nosy: +pitrou _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15221> _______________________________________

Nick Coghlan <ncoghlan@gmail.com> added the comment: The os.path.exists() docs already cover all the gory details of when it may be false due to limited permissions. The is* docs refer to this by their use of the word "existing", but that's probably too subtle. I suggest adding an extra sentence to the docs of all affected functions: "This always returns False if os.path.exists(path) returns False." ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15221> _______________________________________

Change by Cheryl Sabella <chekat2@gmail.com>: ---------- keywords: +patch pull_requests: +5039 stage: -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue15221> _______________________________________

Cheryl Sabella <chekat2@gmail.com> added the comment: I created a PR for this by making the word 'existing' a link to 'os.path.exists' since Nick mentioned that that word already implied the definition. ---------- nosy: +csabella versions: +Python 3.7 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue15221> _______________________________________

Mariatta Wijaya <mariatta.wijaya@gmail.com> added the comment: New changeset b3dd18d4035803b50c65a434955966d1b3b1f363 by Mariatta (Cheryl Sabella) in branch 'master': bpo-15221: Update os.path.is*() documentation (GH-5185) https://github.com/python/cpython/commit/b3dd18d4035803b50c65a434955966d1b3b... ---------- nosy: +Mariatta _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue15221> _______________________________________

Change by Roundup Robot <devnull@psf.upfronthosting.co.za>: ---------- pull_requests: +5040 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue15221> _______________________________________

Mariatta Wijaya <mariatta.wijaya@gmail.com> added the comment: New changeset bb80645d06c16461b0b58d8983cd7fa6962ba3c6 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-15221: Update os.path.is*() documentation (GH-5185) (GH-5186) https://github.com/python/cpython/commit/bb80645d06c16461b0b58d8983cd7fa6962... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue15221> _______________________________________

Mariatta Wijaya <mariatta.wijaya@gmail.com> added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue15221> _______________________________________
participants (7)
-
Antoine Pitrou
-
Cameron Simpson
-
Cheryl Sabella
-
Giampaolo Rodola'
-
Mariatta Wijaya
-
Nick Coghlan
-
Roundup Robot