Alexander Belopolsky <alexander.belopol...@gmail.com> 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 = os.getgroups() print g os.setgroups(g[:5]) print os.getgroups() $ sudo python2.5 tg.py [0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2] [0, 101, 204, 100, 98] $ sudo python2.6 tg.py [0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2, 1, 401] [0, 101, 204, 100, 98, 80, 61, 29, 20, 12, 9, 8, 5, 4, 3, 2, 1, 401] Note that python2.5 truncates the group list which is $ sudo id -G 0 101 204 100 98 80 61 29 20 12 9 8 5 4 3 2 1 401 but setgroups works as expected. In contrast, python2.6 reports all groups correctly, but setgroups has no effect. ---------- Added file: http://bugs.python.org/file16306/tg.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7900> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com