Issue 18530: posixpath.ismount performs extra lstat calls (original) (raw)

Created on 2013-07-22 15:07 by alex, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ismount.diff alex,2013-07-22 15:14 review
ismount.diff alex,2013-07-22 16:33 review
ismount-3k.diff alex,2013-07-22 16:43 review
Messages (9)
msg193540 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2013-07-22 15:07
Right now it calls islink(), which does an lstat, and then does its own lstat on the same path. This can be optimized by inlining the body of islink and reusing the stat result. (This has been identified as an actual issue in openstack-swift https://review.openstack.org/#/c/37929/ )
msg193542 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2013-07-22 15:14
Attached is a simple first pass at a diff against 2.7, shoudl be easy to port it to default.
msg193543 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2013-07-22 16:33
Addresses the review comments: returns to catching all oserrors
msg193544 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-22 16:38
LGTM
msg193545 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2013-07-22 16:43
Attached patch is against default. I don't have my ssh keys set up for this machine, so if someone else could land I'd be appreciative :) (Not sure if this qualifies for a backport)
msg193551 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2013-07-22 17:16
Benjamin probably has the final say on backporting this to 2.7. I'm doing the 3.3/default commit right now.
msg193553 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-22 18:08
New changeset 240adc564539 by Brian Curtin in branch 'default': Fix #18530. Remove extra stat call from posixpath.ismount http://hg.python.org/cpython/rev/240adc564539
msg193554 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2013-07-22 18:09
^That takes care of default. I misspoke in an earlier comment about 3.3 - that should probably be determined by that RM (Georg?)
msg225882 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-08-25 18:01
Ok, this was landed, 3.3 is no longer open so closing this.
History
Date User Action Args
2022-04-11 14:57:48 admin set github: 62730
2014-08-25 18:36:15 berker.peksag set stage: patch review -> resolved
2014-08-25 18:01:23 alex set status: open -> closedresolution: fixedmessages: +
2013-07-22 18:09:49 brian.curtin set messages: +
2013-07-22 18:08:37 python-dev set nosy: + python-devmessages: +
2013-07-22 17:16:36 brian.curtin set nosy: + brian.curtinmessages: +
2013-07-22 16:43:51 alex set files: + ismount-3k.diffmessages: +
2013-07-22 16:38:36 christian.heimes set versions: + Python 3.3, Python 3.4nosy: + christian.heimesmessages: + type: resource usagestage: patch review
2013-07-22 16:33:15 alex set files: + ismount.diffmessages: +
2013-07-22 15:14:32 alex set files: + ismount.diffkeywords: + patchmessages: +
2013-07-22 15:07:40 alex create