[issue18787] Misleading error from getspnam function of spwd module

2016-03-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset c1677c8f92e1 by Victor Stinner in branch 'default': Fix test_spwd on OpenIndiana https://hg.python.org/cpython/rev/c1677c8f92e1 -- ___ Python tracker

[issue18787] Misleading error from getspnam function of spwd module

2016-03-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 430af393d8f1 by Victor Stinner in branch 'default': Try to fix test_spwd on OpenIndiana https://hg.python.org/cpython/rev/430af393d8f1 -- ___ Python tracker

[issue18787] Misleading error from getspnam function of spwd module

2016-03-19 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue18787] Misleading error from getspnam function of spwd module

2016-03-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset a1d738158390 by Berker Peksag in branch 'default': Issue #18787: spwd.getspnam() now raises a PermissionError if the user https://hg.python.org/cpython/rev/a1d738158390 -- nosy: +python-dev ___ Python

[issue18787] Misleading error from getspnam function of spwd module

2015-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As far as this change breaks compatibility. please add a note in the "Porting to Python 3.6" section in What's New. -- ___ Python tracker

[issue18787] Misleading error from getspnam function of spwd module

2015-09-24 Thread Berker Peksag
Berker Peksag added the comment: Here is a patch with a test. -- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file40567/issue18787.diff ___ Python tracker

[issue18787] Misleading error from getspnam function of spwd module

2015-07-25 Thread Robert Collins
Robert Collins added the comment: Sounds like we want something analogous to http://bugs.python.org/file33404/fix_error_message_getspall_v2.patch for this bug. Moving to patch needed. It looks like it would be easily tested too, so I'd like to see a test too please. -- nosy:

[issue18787] Misleading error from getspnam function of spwd module

2015-01-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think we should always raise OSError if errno is non-zero (and not KeyError). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18787 ___

[issue18787] Misleading error from getspnam function of spwd module

2014-12-31 Thread A.M. Kuchling
Changes by A.M. Kuchling a...@amk.ca: -- nosy: -akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18787 ___ ___ Python-bugs-list mailing

[issue18787] Misleading error from getspnam function of spwd module

2014-01-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18787 ___ ___

[issue18787] Misleading error from getspnam function of spwd module

2013-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyErr_SetFromErrno(PyExc_OSError) looks more appropriate for permission denied error. However this change is backward incompatible so perhaps we have to left a KeyError. -- nosy: +loewis, serhiy.storchaka stage: - test needed

[issue18787] Misleading error from getspnam function of spwd module

2013-08-20 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached the patch to accomodate Serhiy Storchaka's suggestion by using KeyError exception for backward compatibility. -- Added file: http://bugs.python.org/file31382/fix_error_message_getspnam_v2.patch ___ Python

[issue18787] Misleading error from getspnam function of spwd module

2013-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was not a suggestion, it was a doubt. See also issue10388. -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18787 ___

[issue18787] Misleading error from getspnam function of spwd module

2013-08-20 Thread Vajrasky Kok
Vajrasky Kok added the comment: Sorry about that. Okay, so for now, we wait for other people's suggestion, which way we should use to handle this situation? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18787

[issue18787] Misleading error from getspnam function of spwd module

2013-08-19 Thread Vajrasky Kok
New submission from Vajrasky Kok: As root: $ sudo python3 [sudo] password for ethan: Python 3.2.3 (default, Apr 10 2013, 05:07:54) [GCC 4.7.2] on linux2 Type help, copyright, credits or license for more information. import spwd spwd.getspnam(I_don't_exist) Traceback (most recent call last):