From: Benjamin Peterson Date: Sat, 23 Mar 2013 20:40:36 +0000 (-0500) Subject: group ids and user ids can be longs now (#17531) X-Git-Tag: v2.7.4~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01d9a775fae9f09dc185d2a6d4790adafc303a25;p=thirdparty%2FPython%2Fcpython.git group ids and user ids can be longs now (#17531) --- diff --git a/Lib/test/test_grp.py b/Lib/test/test_grp.py index e9e175826360..62d2baf590a9 100644 --- a/Lib/test/test_grp.py +++ b/Lib/test/test_grp.py @@ -16,7 +16,7 @@ class GroupDatabaseTestCase(unittest.TestCase): self.assertEqual(value[1], value.gr_passwd) self.assertIsInstance(value.gr_passwd, basestring) self.assertEqual(value[2], value.gr_gid) - self.assertIsInstance(value.gr_gid, int) + self.assertIsInstance(value.gr_gid, (long, int)) self.assertEqual(value[3], value.gr_mem) self.assertIsInstance(value.gr_mem, list) diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py index ce8b8b347ce7..696161a34908 100644 --- a/Lib/test/test_pwd.py +++ b/Lib/test/test_pwd.py @@ -18,9 +18,9 @@ class PwdTest(unittest.TestCase): self.assertEqual(e[1], e.pw_passwd) self.assertIsInstance(e.pw_passwd, basestring) self.assertEqual(e[2], e.pw_uid) - self.assertIsInstance(e.pw_uid, int) + self.assertIsInstance(e.pw_uid, (int, long)) self.assertEqual(e[3], e.pw_gid) - self.assertIsInstance(e.pw_gid, int) + self.assertIsInstance(e.pw_gid, (int, long)) self.assertEqual(e[4], e.pw_gecos) self.assertIsInstance(e.pw_gecos, basestring) self.assertEqual(e[5], e.pw_dir) diff --git a/Misc/NEWS b/Misc/NEWS index cfa3f64d6b34..d9e023fa1f3e 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -9,7 +9,8 @@ What's New in Python 2.7.4? Library ------- -- Issue #17531: Return group and user ids as int instead long when possible. +- Issue #17531: Fix tests that thought group and user ids were always the int + type. What's New in Python 2.7.4 release candidate 1