This fixes issue7900 by adding code that deals
with the fact that getgroups(2) might return
more that MAX_GROUPS on OSX.

See the issue (and python-dev archives) for the
gory details. Summarized: OSX behaves rather oddly
and Apple says this is intentional.
diff --git a/Misc/NEWS b/Misc/NEWS
index 8ef64e8..a6b05e6 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1440,6 +1440,13 @@
 Extension Modules
 -----------------
 
+- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
+  compared to other unix systems. In particular, os.getgroups() does
+  not reflect any changes made using os.setgroups() but basicly always
+  returns the same information as the id command.
+
+  os.getgroups() can now return more than 16 groups on MacOSX.
+
 - Issue #6095: Make directory argument to os.listdir optional.
 
 - Issue #9277: Fix bug in struct.pack for bools in standard mode