[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-02-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: A BB failed. Looks like it's unrelated with this change: https://buildbot.python.org/all/#/builders/99/builds/2198 -- nosy: +giampaolo.rodola ___ Python tracker

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-02-25 Thread Anthony Sottile
Change by Anthony Sottile : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-22 Thread Anthony Sottile
Anthony Sottile added the comment: yep! did my due diligence there, you can check my work on https://github.com/python/cpython/pull/11643 all platforms have these functions since `posixmodule.c` is always compiled and the functions in question are not guarded by preprocessor directives in

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: I suspect these conditionals are very old and came from times when we supported some platforms that did not have these APIs. Are they present on all CPython supported platforms today? Windows is probably the only one left to verify. BSD/Linux/Un*xes and

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-21 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +11422 stage: -> patch review ___ Python tracker ___ ___

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-21 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch, patch pull_requests: +11422, 11423 stage: -> patch review ___ Python tracker ___

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-21 Thread Anthony Sottile
Anthony Sottile added the comment: looks true for os.chmod as well: https://github.com/python/cpython/blob/7a2368063f25746d4008a74aca0dc0b82f86ff7b/Modules/clinic/posixmodule.c.h#L327-L328 -- ___ Python tracker

[issue35802] os.stat / os.lstat always present, but code checks hastattr(os, 'stat') / hasattr(os, 'lstat')

2019-01-21 Thread Anthony Sottile
New submission from Anthony Sottile : Unless I'm reading incorrectly: https://github.com/python/cpython/blob/7a2368063f25746d4008a74aca0dc0b82f86ff7b/Modules/clinic/posixmodule.c.h#L30-L31