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.

Author catalin.iacob
Recipients brian.curtin, catalin.iacob, pitrou, sijinjoseph
Date 2011-05-24.20:19:19
SpamBayes Score 7.7087703e-10
Marked as misclassified No
Message-id <1306268360.07.0.11648811403.issue12034@psf.upfronthosting.co.za>
In-reply-to
Content
I looked at providing a patch for this issue as an introductory step (this would be my first patch).

But when following the code I discovered that the case that this issue is trying to optimize is never executed in current CPython. In that case, there isn't much value in optimizing it.

More precisely, check_GetFinalPathNameByHandle is called by posix__getfinalpathname which is nt._getfinalpathname in Python code. If the check fails, posix__getfinalpathname throws NotImplmenentedError. But nt._getfinalpathname is only used by ntpath.py which checks the Windows version and only calls nt._getfinalpathname for Vista and higher where the check won't fail.

To me it would make more sense that the nt module has a _getfinalpathname attribute only if it supports the feature instead of always having one that throws NotImplementedError. In that case, ntpath.py would not check the Windows version but the presence of _getfinalpathname in the nt module. Does this seem like a better approach to you, at least theoretically? And if so, is it worth implementing it?

Thanks for any advice.
History
Date User Action Args
2011-05-24 20:19:20catalin.iacobsetrecipients: + catalin.iacob, pitrou, brian.curtin, sijinjoseph
2011-05-24 20:19:20catalin.iacobsetmessageid: <1306268360.07.0.11648811403.issue12034@psf.upfronthosting.co.za>
2011-05-24 20:19:19catalin.iacoblinkissue12034 messages
2011-05-24 20:19:19catalin.iacobcreate