[issue39729] stat.S_ISXXX can raise OverflowError for remote file modes

2020-02-28 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39729] stat.S_ISXXX can raise OverflowError for remote file modes

2020-02-23 Thread Arnon Yaari
Arnon Yaari added the comment: Maybe so, but IMHO it is a lesser concern - the operating systems that use "unsigned long" add bits on the right, and don't change the less significant bits that the S_ISXXX macros check (if I am not mistaken, those bits are POSIX standards). This issue is a

[issue39729] stat.S_ISXXX can raise OverflowError for remote file modes

2020-02-23 Thread Ammar Askar
Ammar Askar added the comment: Size of the mode aside, isn't this approach problematic anyway? One platform could have an entirely different way of signalling ISDIR vs another. In this case using the host's S_ISDIR for the remote's mode would result in possibly incorrect values. --

[issue39729] stat.S_ISXXX can raise OverflowError for remote file modes

2020-02-23 Thread Arnon Yaari
New submission from Arnon Yaari : The C implementation of the "stat" module on Python 3 (_stat) is using the type "mode_t" for file modes, which differs between operating systems. This type can be defined as either "unsigned short" (for example, in macOS, or the definition added specifically