[issue7900] posix.getgroups() failure on Mac OS X

2011-03-14 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm closing this issue again, the current behavior is intended (as it mirrors platform behavior). -- status: open -> closed ___ Python tracker ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Ned Deily
Ned Deily added the comment: (Argh! Just to be very clear, those ./configure commands are all one line, including the MACOSX_DEPLOYMENT_TARGET as an argument to the configure script.) -- ___ Python tracker ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Ned Deily
Ned Deily added the comment: The problem Stephen is seeing with the buildbot machine is ABI-dependent; the behavior of getgroups(2) changed in 10.6. You can demonstrate this all on a 10.6 system. Open a terminal session and verify the process's groups: $ id -G 20 40200 401 204 100 98 80 61

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Stephen Hansen
Stephen Hansen added the comment: On 11/16/10 5:44 AM, Ronald Oussoren wrote: > Ronald Oussoren added the comment: > Please explain how the failure can be reproduced. I have. But to do so more directly: 1. Launch Terminal.app; leave the window console open. 2. Run: id -G 3. Run: python 4. Typ

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread R. David Murray
R. David Murray added the comment: And it's entirely possible (even likely) that what Stephen is seeing here is a platform bug in OSX's quirky implementation of group management. -- ___ Python tracker

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread R. David Murray
R. David Murray added the comment: Having just reread this issue more carefully, my understanding is that Ronald had elected to make the results returned from os.getgroups match that returned by "system tools" (by which I understood him to mean the 'id' command). Since Ronald reports he sees

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: Please explain how the failure can be reproduced. I've done some testing on my machine using Apple's copy of python 2.6.1 (on OSX 10.6), which has the same getgroups implementation as the current heads of the active branches. >>> os.getgroups() [20, 402,

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-16 Thread R. David Murray
R. David Murray added the comment: I agree with Stephen. The test in question is *not a valid test* on OSX. Therefore on OSX it should be skipped. If you can think of a way to test the actual behavior of getgroups on OSX, that's even better. --

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-15 Thread Stephen Hansen
Stephen Hansen added the comment: The test is clearly verifying a *wrong* assumption: that id -G will match posix.getgroups() which simply does not hold on OSX. I can reproduce this reliably on a completely clean, brand new installation of 10.5: from there the only things that have been done

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm still -1 on changing the test. The test only fails when run from the buildbot and the buildbot account is changed without restarting buildbot. Changing the buildbot account should happen almost never, and IMO you should restart the buildbot daemon when

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-15 Thread R. David Murray
R. David Murray added the comment: Ronald, on a normal unix system if you add a user to a group, any existing process/terminal session that runs 'id -G' will return the *old* group list. Only a new process/terminal session will see the new group. On OSX, 'id -G' returns the new group when ru

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: If anything should be done the test that checks the output of id -G should be removed if we want the buildbot to keep running without problems when you change the buildbots account. After reading the message about the new failures again I don't think this is

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-11 Thread R. David Murray
Changes by R. David Murray : -- priority: high -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-11 Thread R. David Murray
R. David Murray added the comment: Right, regardless of whether or not it is a bug in python, IMO it *is* a bug in the python test suite, since we *expect* buildbots to be long running processes and therefore they are going to get hit by this failure on OSX periodically with a pretty high lik

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-11 Thread Stephen Hansen
Stephen Hansen added the comment: Well, yes: the result of posix.getgroups is not a bug in Python, but is it a bug in the test? Should it be skipped on OSX, or some other solution? Having buildbots fail because of something that's expected behavior is bad, isn't it? -- _

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is the expected behavior on OSX. Apple has a pretty odd interpretation of the standards wrt getgroups and setgroups behavior. This behavior is not a bug in python Sent from my iPhone On 11 nov. 2010, at 22:17, Stephen Hansen wrote: > > Stephen Hans

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-11 Thread Stephen Hansen
Changes by Stephen Hansen : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue7900] posix.getgroups() failure on Mac OS X

2010-11-11 Thread Stephen Hansen
Stephen Hansen added the comment: This test is failing again, and IIUC, largely due to the same sort of issues: http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.1/builds/65 I was able to track down what exactly caused it to fail in this case on my box, though. Whatever "pos

[issue7900] posix.getgroups() failure on Mac OS X

2010-08-03 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue7900] posix.getgroups() failure on Mac OS X

2010-08-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: Some else backported to 3.1 (that is, 3.1 already contained the fix when I tried the svnmerge) Backported to 2.7 in r83643 Backported to 2.6 in r83650 -- Added file: http://bugs.python.org/file18336/smime.p7s ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-08-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: The other problem is fixed in r83431 for the py3k trunk. I'll check the buildbot status tomorow morning, if that shows that the issue is truly gone I'll backport to the other branches and close this issue. -- ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-08-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: The 2.6 problem (the solaris buildbot you link to) should be fixed in r83420. -- ___ Python tracker ___ ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-08-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reopening. This seems to have broken a couple of buildbots (two different issues): http://www.python.org/dev/buildbot/builders/x86%20FreeBSD%202.7/builds/44/steps/test/logs/stdio http://www.python.org/dev/buildbot/builders/sparc%20solaris10%20gcc%202.6/builds/7

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-24 Thread Ronald Oussoren
Ronald Oussoren added the comment: 2.7: r83124 2.6: r83126 The fix is now in all active branches, and I therefore close the issue. -- stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Committed a port to python3 for os-getgroups-v3.patch in r83088, including test cases (contrary to what I wrote before). Backports: 3.1: r83093 I'll backport to 2.7 and 2.6 tomorrow. To complete the documentation for picking this patch: I've spoken with an

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've added issue9344 for adding os.getgroupslist. I'd prefer to keep adding that function separate from this issue. Btw. I'm +1 on adding such a function. I will shortly commit a port of os-getgroups-v3.patch to 3.2, but without the tests in "PosixGroupsTest

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: s/2.7/2.7.1/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This whole thing is a mess. Great analysis, by the way. I started a similar experiment some time ago, but gave up when I discovered that a member of the admin group can read any file regardless of permissions settings. Your solution is probably the bes

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: Your test might expect different behaviour than what OSX actually does (this is an annoying limitation of unittests for wrappers of system behaviour, you'll implicitly test system behaviour as well as the wreappers themselves) The behaviour w.r.t. secondairy

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Thu, Jul 8, 2010 at 4:30 PM, Ronald Oussoren wrote: .. > Note that explicitly setting the effective uid and gid of processes is > somewhat frowned upon by Apple, they'd prefer if all daemon processes where > started using launchd and used launchd to

[issue7900] posix.getgroups() failure on Mac OS X

2010-07-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: I got some time and did an experiment to deduce how multiple groups behave. This comment is rather long, a very short summary of the results is that OSX behaves oddly. What I did: * This is on OSX 10.6 * Create 18 groups named group1 to group18 * Create a u

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I don't know how relevant this is to OS X, but on FreeBSD 6.3, > kern.ngroups (maximum number of groups a uid may belong to) defaults > to 16. It probably is: "sysctl kern.ngroups" also gives 16 on OSX 10.6.4 (Darwin 10.4.0). -- ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread R. David Murray
R. David Murray added the comment: I don't know how relevant this is to OS X, but on FreeBSD 6.3, kern.ngroups (maximum number of groups a uid may belong to) defaults to 16. -- ___ Python tracker _

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reposting from python-dev. See "os.getgroups() on MacOS X" . """ On Wed, Jun 23, 2010 at 2:08 AM, Ronald Oussoren wrote: .. >> >>> * [Ronald's proposal] results in posix.getgroups not re

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: Wrt. non-gcc compilers: we do need to worry about those (there have been bugreports in the past about using the Intel compiler), but those compilers still have to be able to process system headers and Martin's patch basicly adds the definition from the syste

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Martin's solution works. I don't think we need to worry about non-gcc compilers on OSX. I am attaching a patch with tests where getgroups to id -G comparison test is skipped if id -G shows more than 16 groups. Some of the added tests are skipped for n

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: Here is a (untested) work-around that won't require undefining _DARWIN_C_SOURCE: After all includes, say #ifdef __APPLE__ int posix_getgroups(int, gid_t []) __asm("_getgroups"); #define getgroups posix_getgroups #endif This should cause linking to the s

[issue7900] posix.getgroups() failure on Mac OS X

2010-06-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ronald, Please see my python-dev post in "red buildbots on 2.7" thread: http://mail.python.org/pipermail/python-dev/2010-June/100873.html I argue that we should apply a fix along the lines of no-darwin-ext.diff while waiting for Apple to fix their bug

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-07 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: unit test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Ronald Oussoren
Changes by Ronald Oussoren : Added file: http://bugs.python.org/file17234/os-getgroups-v3.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ronald, Did you forget to attach your patch? I don't see v3. -- ___ Python tracker ___ ___ Py

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: The PyMalloc error was a lame bug. I've also fixed another issue (missing parenthesis in an error return). os-getgroups-v3.patch also adds unittests: * issue7900-tests.diff, but with all tests disabled on darwin (due to the broken implementation of getgroup

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ronald> How did you detect that the modern getgroups implementation Ronald> doesn't query the kernel? That would be very odd. I have just found the source code for getgroups: http://www.opensource.apple.com/source/Libc/Libc-594.1.4/sys/getgroups.c As I

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The latest patch, os-getgroups-v2.patch, seems to have the same bug as I reported in msg99926: """ The crash that I see is apparently due to underallocated memory: alt_grouplist = PyMem_Malloc(n); should be alt_grouplist = PyMem_Malloc(n * sizeof(g

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Ronald Oussoren
Changes by Ronald Oussoren : Added file: http://bugs.python.org/file17221/os-getgroups-v2.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue7900] posix.getgroups() failure on Mac OS X

2010-05-05 Thread Ronald Oussoren
Ronald Oussoren added the comment: I agree with Michael that something should be done. I propose to add commit os-getgroups-v2.patch, which is the almost same as os-getgroups.patch that I posted earlier, but adds a check for large values of NGROUPS_MAX (see msg99913 for the rationale) This e

[issue7900] posix.getgroups() failure on Mac OS X

2010-03-27 Thread Michael Foord
Michael Foord added the comment: I have a consistently failing test on my machine. If the answer is indeed "won't fix" and both os.getgroups() and os.setgroups() are not expected to work correctly on Mac OS X then the tests should be disabled for that platform. -- nosy: +michael.foord

[issue7900] posix.getgroups() failure on Mac OS X

2010-03-27 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-24 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Feb 24, 2010 at 12:45 PM, Martin v. Löwis wrote: .. > I still think that the sysconf version should be the correct one. If OSX > fails to work correctly under > that version, and causes Python to raise an exception - then that's a > platform bug

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: I still think that the sysconf version should be the correct one. If OSX fails to work correctly under that version, and causes Python to raise an exception - then that's a platform bug, and should only accept minimal work arounds. So I propose to close this

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: quoting compat(5) on OSX 10.6.2: Defining _POSIX_C_SOURCE or _DARWIN_C_SOURCE causes library and kernel calls to conform to the SUSv3 standards even if doing so would alter the behavior of functions used in 10.3. Defining _POSIX_C_SOURCE als

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've filed issue #7681618 in Apple's bugtracker with the attached file "getsetgroups-bug.tar" as a way to reproduce the issue. I want to wait a little to see how Apple responds (although I don't expect a quick response). -- Added file: http://bugs.p

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: David, Can you unset "normal" priority from this issue. Regardless of whether it is a crash or not a crash, this is a regression for which there is no user work-around. It looks like "normal" priority makes the issue disappear from the top of "Show O

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Feb 23, 2010 at 12:16 PM, Ronald Oussoren wrote: .. > How did you detect that the modern getgroups implementation doesn't > query the kernel? That would be very odd. I wish I could say that I mastered dtrace under OSX, but I am not there yet. :

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm probably being extremely dense at the moment, but the program below doesn't behave as I'd expect on OSX: #include int main(void) { #if 1 gid_t gids[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 }; int r;

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm -1 w.r.t changing the definition of _DARWIN_C_SOURCE, at least not without a thorough investigation on what else this changes. Removing _DARWIN_C_SOURCE without setting some other defines may well cause in removal of functions from header files (I'm pre

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think I finally understand what is going on and ready to make what I believe is a reasonable proposal. Setting _DARWIN_C_SOURCE (or _DARWIN_UNLIMITED_GETGROUPS) replaces getgroups with a Darwin extension, but does not change setgroups: $ nm tg1 | gre

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: E-mail to tracker handling still seems to remove '>' quoted lines. I am reposting a couple of comments that got clobbered: -- > * allocate an array of groupcount gid_t's and call getgroups(groupcount) > This is more or less what my original patch did,

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Feb 23, 2010 at 8:46 AM, Ronald Oussoren wrote: > .. > I get test failures, but no crashes, when I do run the additional tests. The crash that I see is apparently due to underallocated memory: alt_grouplist = PyMem_Malloc(n); should be alt_

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Feb 23, 2010 at 8:46 AM, Ronald Oussoren wrote: .. > What I did notice though is that the tests don't actually test the issue at > hand: > having more than 16 secondairy groups on OSX. This is easy to fix: just add another entry in groups +

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: My patch is very lightly tested and I didn't try to use the additional testcases. I get test failures, but no crashes, when I do run the additional tests. I haven't had time to review the testcases though. What I did notice though is that the tests don't

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread R. David Murray
Changes by R. David Murray : -- priority: -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Ronald, Have you tested your patch with issue7900-tests.diff? On my system: $ ./python.exe Lib/test/test_posix.py testNoArgFunctions (__main__.PosixTester) ... Segmentation fault and $ sudo ./python.exe Lib/test/test_posix.py .. FAIL: test_setgroups

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Feb 23, 2010 at 2:20 AM, Ronald Oussoren wrote: > .. > Alexander:  What makes you think r63955 introduced the problem? That revision introduced _DARWIN_C_SOURCE which, as I explained, has two effects on get/setgroups: """ It turns out that defi

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-23 Thread Ronald Oussoren
Ronald Oussoren added the comment: On my system with the attached patch (os-getgroups.patch): $ sudo ./python.exe Python 2.7a3+ (trunk:78371M, Feb 23 2010, 09:19:44) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Ronald Oussoren
Ronald Oussoren added the comment: Alexander: What makes you think r63955 introduced the problem? Btw. This does not crash the interpreter: the example you give causes an exception and cleanly shuts down the interpreter. The exception is unwanted, but I wouldn't call it a crash. The Apple

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am reclassifying this as a crash because os.getgroups() crashes the interpreter when python is running as root on an unmodified system: $ sudo ./python.exe -c "import os; os.getgroups()" Traceback (most recent call last): File "", line 1, in OSErro

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: After some head-scratching, I figured out how to reproduce stock python2.5 behavior. It turns out that defining _DARWIN_C_SOURCE not only allows getgroups() output to exceed NGROUPS_MAX (as documented), but also effectively disables setgroups() which i

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've converted apple patches to unified diffs, but I cannot reproduce 2.5 behavior. -- Added file: http://bugs.python.org/file16309/apple-2.5-fix-posixmodule.c.diff ___ Python tracker

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Ronald Oussoren
Ronald Oussoren added the comment: And as usual they can't be bothered to describe what the patch does, or even use regular universal diffs. -- ___ Python tracker ___ __

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Apparently, Apple patches posix_[gs]etgroups functions as follows: for 2.5: http://www.opensource.apple.com/source/python/python-44/2.5/fix/posixmodule.c.ed for 2.6: http://www.opensource.apple.com/source/python/python-44/2.6/fix/posixmodule.c.ed

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Here is another interesting fact: Mac OS 10.6 comes with python 2.5 and 2.6 preinstalled: $ python2.5 -V Python 2.5.3c1 $ python2.6 -V Python 2.6.1 Neither of these exhibit the same bug, but both are broken in some way. Given $ cat tg.py import os g =

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Feb 21, 2010 at 1:58 PM, Martin v. Löwis wrote: .. > I would propose a different strategy: if _SC_NGROUPS_MAX is defined, use > that to find out how much memory to allocate, otherwise, fall back to > the current max array size. Can you find out wh

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I would suggest using my _DARWIN_C_SOURCE implementation > unconditionally and make similar changes to posix_setgroups, but this > is probably a subject for a separate issue. I would propose a different strategy: if _SC_NGROUPS_MAX is defined, use that to fi

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like the current implementation is not POSIX compliant because it assumes that NGROUPS_MAX is compile time constant. However, according to , "Application writers should no

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: It looks like the current implementation is not POSIX compliant because it assumes that NGROUPS_MAX is compile time constant. However, according to , "Application writers should no

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am submitting a fix. I am using the following feature documented in getgroups(2): """ If _DARWIN_C_SOURCE is defined, getgroups() can return more than {NGROUPS_MAX} groups. """ It appears that _DARWIN_C_SOURCE is defined in the standard python confi

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I was able to reproduce the error. First, add your user name to multiple test groups as follows: $ sudo dscl . -create /Groups/testN GroupMembership username (repeat 16 times with different Ns) $ ./python.exe Python 2.7a3+ (trunk:78265M, Feb 20 2010,

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Michael, Can you post the output of "groups" and "id" command from your Mac? It looks like posix_getgroups cannot handle more than NGROUPS_MAX groups and NGROUPS_MAX is 16 on Mac OS. -- nosy: +Alexander.Belopolsky

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-18 Thread Michael Foord
Michael Foord added the comment: I'm not seeing the same issue on my Macbook Pro. I can get all this info from my desktop machine (Mac Pro) when I return from PyCon. -- ___ Python tracker _

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: A related question: is this issue present in the 3.x trunk? (BTW: feel free to assign all OSX related issues to me) -- assignee: -> ronaldoussoren ___ Python tracker ___

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-16 Thread Ronald Oussoren
Ronald Oussoren added the comment: Michael: * which configure options do you use? * which xcode version do you use? (this shouldn't be relevant, I'm interested in what causes the dot 1 suffix) * If you use --enable-universalsdk: do you have the 10.4 SDK installed (should be installed in

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-12 Thread Shashwat Anand
Shashwat Anand added the comment: 5646 and 5646.1 are the builds of GCC by Apple. The various builds of gcc are present on http://www.opensource.apple.com/source/gcc/ [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin -> http://www.opensource.apple.com/source/gcc/gcc-5646.1/ [GCC 4.2.1 (

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-12 Thread Shashwat Anand
Shashwat Anand added the comment: Thanks for correcting it back. I did not even realized it. -- ___ Python tracker ___ ___ Python-bugs

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: please not remove the nosy list. ( I guess, you did it by accident). let's wait for ronald's response. -- nosy: +loewis, michael.foord, orsenthil, ronaldoussoren ___ Python tracker

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-12 Thread Shashwat Anand
Shashwat Anand added the comment: It seems they are basically the same thing, the version of GCC and the build of OS X(latest in the case here). Was not able to figure out the (dot 1) stuff though. -- nosy: -loewis, michael.foord, orsenthil, ronaldoussoren __

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-12 Thread Michael Foord
Michael Foord added the comment: I still see it on trunk (revision 78165). No idea what the (dot 1) means. -- ___ Python tracker ___ _

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: What is the (Apple Inc. build 5646) (dot 1) vs normal (Apple Inc. build 5646). ? While, ronald.oussoren did make a lot some changes recently (r78149 to r78152).This fix could have been a side-effect of one of it, thought I could not find the direct correlati

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-12 Thread Shashwat Anand
Shashwat Anand added the comment: I don't see any issue here, runs perfectly fine on Mac OS X (Snow Leopard) Shashwat-Anands-MacBook-Pro:test l0nwlf$ pwd /Users/l0nwlf/python-svn/Lib/test Shashwat-Anands-MacBook-Pro:test l0nwlf$ python2.7 test_posix.py testNoArgFunctions (__main__.PosixTester)

[issue7900] posix.getgroups() failure on Mac OS X

2010-02-10 Thread Michael Foord
New submission from Michael Foord : test_posix fails on trunk on Mac OS X (Snow Leopard) test.test_support.TestFailed: Traceback (most recent call last): File "Lib/test/test_posix.py", line 42, in testNoArgFunctions posix_func() OSError: [Errno 22] Invalid argument Python 2.7a3+ (trunk:78