You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-12-02.20:47:25.344>created_at=<Date2009-11-16.14:57:38.152>labels= ['library']
title='Add initgroups to the posix/os modules'updated_at=<Date2009-12-02.20:47:25.342>user='https://bugs.python.org/exarkun'
initgroups(2) is a function for initializing the aux group id list from
site-specific configuration (typically /etc/groups, but not necessarily).
Attached is a patch based on some code from Zope, expanded to have a
test and some docs. Presumably Zope will be happy to use this function
from the stdlib once they can depend on a version of Python which
includes it. Twisted would like to as well.
I wasn't able to test the autoconf related parts of the patch as I don't
have easy access to autoconf 2.61.
I also can't run regrtest.py in my environment for some reason. It
fails to import some names from test_support. So I didn't run the unit
test that I added, either.
The documentation is os.rst is too laconic (coming from the Windows
world, I could not understand what the function is about).
The docstring is much better (at least I understand it's related to the
Unix security model), I suggest to use it for the documentation.
exarkun commented on Dec 2, 2009
exarkunmannequin
MannequinAuthor
More actions
New version attached which makes the os.rst docs the same as the
docstring. Also fixes a conflict since introduced in trunk in configure.in.
Activity
exarkun commentedon Nov 16, 2009
initgroups(2) is a function for initializing the aux group id list from
site-specific configuration (typically /etc/groups, but not necessarily).
Attached is a patch based on some code from Zope, expanded to have a
test and some docs. Presumably Zope will be happy to use this function
from the stdlib once they can depend on a version of Python which
includes it. Twisted would like to as well.
I wasn't able to test the autoconf related parts of the patch as I don't
have easy access to autoconf 2.61.
I also can't run regrtest.py in my environment for some reason. It
fails to import some names from test_support. So I didn't run the unit
test that I added, either.
exarkun commentedon Nov 16, 2009
In case anyone is concerned about licensing issues, please see
<https://mail.zope.org/pipermail/zope-dev/2009-November/038289.html\>
pjenvey commentedon Nov 16, 2009
The test should skip when not hasattr(os, 'initgroups') since it's
optional
exarkun commentedon Nov 16, 2009
Good point. Updated patch attached.
pitrou commentedon Nov 17, 2009
You can use the new test-skipping feature:
http://docs.python.org/dev/library/unittest.html#skipping-tests-and-expected-failures
exarkun commentedon Nov 17, 2009
Alright. Updated patch attached.
exarkun commentedon Nov 17, 2009
pyflakes told me I didn't import errno in test_posix.py. Updated patch
attached.
amauryfa commentedon Dec 2, 2009
The documentation is os.rst is too laconic (coming from the Windows
world, I could not understand what the function is about).
The docstring is much better (at least I understand it's related to the
Unix security model), I suggest to use it for the documentation.
exarkun commentedon Dec 2, 2009
New version attached which makes the os.rst docs the same as the
docstring. Also fixes a conflict since introduced in trunk in configure.in.
pitrou commentedon Dec 2, 2009
Slightly modified and committed in r76636 (trunk) and r76637 (py3k).
Thank you.