STINNER Victor added the comment:
Hum, I changed my mind a little bit :-)
> (2) to modify the sets() function in Modules/pwdmodule.c to set an empty
> string instead of None when the member of the passwd structure is a NULL
> pointer.
I checked the doc: pwd doesn't mention None at all :-(
ht
STINNER Victor added the comment:
> self.assertIsInstance(e.pw_gecos, str)
This test is wrong: it's perfectly fine to get None here.
Python must not test the OS itself, but only test our own code: make sure that
Python converts properly C types to nice Python types, so a string or None.
I pr
New submission from Xavier de Gaye :
On Android API 24:
$ python -c "import pwd; print(pwd.getpwuid(0))"
pwd.struct_passwd(pw_name='root', pw_passwd='', pw_uid=0, pw_gid=0,
pw_gecos=None, pw_dir='/', pw_shell='/system/bin/sh')
The pw_gecos member is None and the test_values test of pwd fails b