[issue2413] os.strerror does not check for out of range argument

2008-05-11 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: IMO, the current behavior is the least problematic. It also mirrors the rest of Python's posix-wrapping calls: if something usable is returned, use it; if NULL is returned, raise an error. For most people, Unknown error XXX or Value error:

[issue2413] os.strerror does not check for out of range argument

2008-03-24 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: The current behaviour (without your patch) seems ok to me. I just wanted to point out that the patch in its current form could break on some platforms. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2413

[issue2413] os.strerror does not check for out of range argument

2008-03-19 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: my manpage (debian testing) states: POSIX.1-2001 permits strerror() to set errno if the call encounters an error, but does not specify what value should be returned as the func‐ tion result in the event of an error. On some systems,

[issue2413] os.strerror does not check for out of range argument

2008-03-19 Thread Alexander Belopolsky
Alexander Belopolsky [EMAIL PROTECTED] added the comment: And on some system Unknown error: nnn is returned with no error indication. Your concern that the patch is invalid on some unidentified system. This concern can easily be addressed by checking for NULL return *in addition* to the errno

[issue2413] os.strerror does not check for out of range argument

2008-03-19 Thread Terry J. Reedy
Changes by Terry J. Reedy [EMAIL PROTECTED]: -- nosy: -tjreedy __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2413 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2413] os.strerror does not check for out of range argument

2008-03-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky [EMAIL PROTECTED]: -- components: +Extension Modules __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2413 __ ___ Python-bugs-list mailing

[issue2413] os.strerror does not check for out of range argument

2008-03-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky [EMAIL PROTECTED]: Added file: http://bugs.python.org/file9755/posix-strerror.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2413 __ ___

[issue2413] os.strerror does not check for out of range argument

2008-03-18 Thread Alexander Belopolsky
New submission from Alexander Belopolsky [EMAIL PROTECTED]: ISO/ANSI C strerror indicates out of range error by setting errno, but existing code incorrectly checks for NULL return value. Attached patch (tested n Mac OS X) makes os.strerror raise ValueError for out of range argument.

[issue2413] os.strerror does not check for out of range argument

2008-03-18 Thread Terry J. Reedy
Changes by Terry J. Reedy [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file9754/posix-strerror.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2413 __ ___

[issue2413] os.strerror does not check for out of range argument

2008-03-18 Thread Terry J. Reedy
Terry J. Reedy [EMAIL PROTECTED] added the comment: Removed earlier version -- nosy: +tjreedy __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2413 __ ___