[Python-Dev] red buildbots on 2.7

Ronald Oussoren ronaldoussoren at mac.com
Tue Jun 22 18:39:03 CEST 2010


On 22 Jun, 2010, at 3:38, Alexander Belopolsky wrote:

> On Mon, Jun 21, 2010 at 6:16 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>>> The test_posix failure is a regression from 2.6 (but it only shows up on
>>> some machines - it is caused by a fairly braindead implementation of a
>>> couple of posix apis by Apple apparently).
>>> 
>>> http://bugs.python.org/issue7900
>> 
>> Ah, that one. I definitely think this should *not* block the release:
> 
> I agree that this is nowhere near being a release blocker, but I think
> it would be nice to do something about it before the final release.
> 
>> a) there is no clear solution in sight. So if we wait for it resolved,
>>   it could take months until we get a 2.7 release.
> 
> The ideal solution will have to wait until Apple gets its act together
> and fixed the problem on their end.  I would say "months" is an overly
> optimistic time estimate for that.  

I'd say there is no chance at all that this will be fixed in OSX 10.6, with some luck they'll change this in 10.7.

> However, the issue is a regression
> from prior versions.  In 2.5 getgroups would truncate the list to 16
> groups, but won't crash.  More importantly the 16 groups returned
> would be correct per-process groups and not something immune to
> setgroup changes.
> 
> I proposed a very simple fix:
> 
> http://bugs.python.org/file16326/no-darwin-ext.diff
> 
> which simply minimally reverts the change that introduced the regression.

That is one way to fix it, another just as valid fix is to change posix.getgroups to be able to return more than 16 groups on OSX (see my patch in issue7900). 

Both are valid fixes, both have both advantages and disadvantages.

Your proposal:
* Reverts to the behavior in 2.6
* Ensures that posix.getgroups and posix.setgroups are internally consistent

My proposal:
* Uses the newer ABI, which is more likely to be the one Apple wants you to use
* Is compatible with system tools (that is, posix.getgroups() agrees with id(1))
* Is compatible with /usr/bin/python
* results in posix.getgroups not reflecting results of posix.setgroups

What I haven't done yet, and probably should, is to check how either implementation of getgroups interacts with groups in the System Preferences panel and with groups in managed environment (using OSX Server).

My gut feeling is that second option (my proposal) would give more useful semantics, but that said: I almost never write code where I need os.setgroups.

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3567 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100622/57073a32/attachment-0001.bin>


More information about the Python-Dev mailing list