Stefan Krah added the comment:
Okay, for the record: I think that returning "None" would probably be
more correct than the empty string, but I don't think users actually
care to the point that they will introduce a case split in their
applications.
Realistically, probably no one cares about
Roundup Robot added the comment:
New changeset f0f519aca558 by Stefan Krah in branch 'default':
Issue #20306: Android is the only system that returns NULL for the pw_passwd
https://hg.python.org/cpython/rev/f0f519aca558
--
___
Python tracker
Xavier de Gaye added the comment:
With changeset 0d74d4937ab9, test_pwd fails on android API level 21 at
test_values with:
Traceback (most recent call last):
File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/test_pwd.py", line 27,
in test_values
Changes by Stefan Krah :
--
assignee: -> skrah
components: +Build -Cross-Build
nosy: +skrah
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 3.6 -Python 3.4, Python 3.5
___
Python tracker
Roundup Robot added the comment:
New changeset 0d74d4937ab9 by Stefan Krah in branch 'default':
Issue #20306: The pw_gecos and pw_passwd fields are not required by POSIX.
https://hg.python.org/cpython/rev/0d74d4937ab9
--
nosy: +python-dev
___
Python
Matt Frank added the comment:
Apologies. That last patch includes diffs to generated files (configure and
pyconfig.h.in). This version just patches Modules/pwdmodule.c and configure.ac.
After applying the patch please run autoheader and autoconf to correctly
regenerate configure and
Changes by Matt Frank matthew.i.fr...@intel.com:
--
nosy: +freakboy3742
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20306
___
___
Changes by Matt Frank matthew.i.fr...@intel.com:
--
nosy: +WanderingLogic
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20306
___
___
Matt Frank added the comment:
Here is shiz's patch extended with the addition to configure.ac. I added the
variable HAVE_PASSWD_GECOS_FIELD and the appropriate tests. Luckily this very
problem (missing pw_gecos field) is the example used in the autoconf manual
Antoine Pitrou added the comment:
Interesting. It seems pw_gecos isn't mandated by POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/pwd.h.html
I wonder if there's a better way to do this (autoconf check?) than an
Android-specific #ifdef, though.
--
nosy: +pitrou
Shiz added the comment:
Ah, yes, if it's not actually mandated by POSIX, something like
HAVE_PASSWD_PW_GECOS would be more appropriate. I'll rework the patch into
something more generic.
--
___
Python tracker rep...@bugs.python.org
New submission from Shiz:
As the title states, mkpwent() in pwdmodule.c accesses `pw_gecos`, which is not
defined for struct passwd in Bionic, Android's C library.
Attached is a patch that works around the issue by setting the field to None on
Android.
--
components: Cross-Build
12 matches
Mail list logo