Serhiy Storchaka added the comment:

This looks as unintentional consequences of ab0221811771.

I think the current behavior of grp.getgrgid() is not correct, because it 
accepts str, float and other types. Python is strong-typed language and 
shouldn't make unwanted implicit type conversions. I guess the purpose was to 
support long arguments in Python 2.

There is similar problem with grp.getgrnam() in 2.7. It accepts arguments of 
any types and convert them to str by calling str(). I guess the purpose was to 
support unicode arguments. In 3.x only str is accepted.

Proposed patch deprecates accepting non-integer arguments in grp.getgrgid(). 
May be we can just remove this without starting deprecating process. I don't 
know.

----------
keywords: +patch
nosy: +brett.cannon, serhiy.storchaka
resolution: wont fix -> 
stage: resolved -> patch review
status: closed -> open
Added file: http://bugs.python.org/file41640/grp_getgrgid_non_integer_gid.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26129>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to