[pypy-svn] pypy merge-stdlib-2.7.1: (antocuni, berdario) merge the 2.7.1 version of the stdlib

antocuni commits-noreply at bitbucket.org
Wed Apr 27 11:28:28 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: merge-stdlib-2.7.1
Changeset: r43657:a9a6d0d17124
Date: 2011-04-27 10:59 +0200
http://bitbucket.org/pypy/pypy/changeset/a9a6d0d17124/

Log:	(antocuni, berdario) merge the 2.7.1 version of the stdlib

	At the moment, the directory is still named 2.7.0, we will rename it
	in a later checkin.

	The changes in modified-2.7.0 have been merged using the following 3
	-way-merge command for each file under the modified-2.7.0 directory:

	 merge -A UserDict.py ../2.7.0/UserDict.py
	../../../cpython/Lib/UserDict.py

diff --git a/lib-python/2.7.0/test/test_cookielib.py b/lib-python/2.7.0/test/test_cookielib.py
--- a/lib-python/2.7.0/test/test_cookielib.py
+++ b/lib-python/2.7.0/test/test_cookielib.py
@@ -18,10 +18,10 @@
 
         base = 1019227000
         day = 24*3600
-        self.assertEquals(time2isoz(base), "2002-04-19 14:36:40Z")
-        self.assertEquals(time2isoz(base+day), "2002-04-20 14:36:40Z")
-        self.assertEquals(time2isoz(base+2*day), "2002-04-21 14:36:40Z")
-        self.assertEquals(time2isoz(base+3*day), "2002-04-22 14:36:40Z")
+        self.assertEqual(time2isoz(base), "2002-04-19 14:36:40Z")
+        self.assertEqual(time2isoz(base+day), "2002-04-20 14:36:40Z")
+        self.assertEqual(time2isoz(base+2*day), "2002-04-21 14:36:40Z")
+        self.assertEqual(time2isoz(base+3*day), "2002-04-22 14:36:40Z")
 
         az = time2isoz()
         bz = time2isoz(500000)
@@ -35,13 +35,13 @@
         def parse_date(text):
             return time.gmtime(http2time(text))[:6]
 
-        self.assertEquals(parse_date("01 Jan 2001"), (2001, 1, 1, 0, 0, 0.0))
+        self.assertEqual(parse_date("01 Jan 2001"), (2001, 1, 1, 0, 0, 0.0))
 
         # this test will break around year 2070
-        self.assertEquals(parse_date("03-Feb-20"), (2020, 2, 3, 0, 0, 0.0))
+        self.assertEqual(parse_date("03-Feb-20"), (2020, 2, 3, 0, 0, 0.0))
 
         # this test will break around year 2048
-        self.assertEquals(parse_date("03-Feb-98"), (1998, 2, 3, 0, 0, 0.0))
+        self.assertEqual(parse_date("03-Feb-98"), (1998, 2, 3, 0, 0, 0.0))
 
     def test_http2time_formats(self):
         from cookielib import http2time, time2isoz
@@ -71,8 +71,8 @@
         test_t = 760233600  # assume broken POSIX counting of seconds
         result = time2isoz(test_t)
         expected = "1994-02-03 00:00:00Z"
-        self.assertEquals(result, expected,
-                          "%s  =>  '%s' (%s)" % (test_t, result, expected))
+        self.assertEqual(result, expected,
+                         "%s  =>  '%s' (%s)" % (test_t, result, expected))
 
         for s in tests:
             t = http2time(s)
@@ -114,7 +114,7 @@
             'foo=bar; expires=01 Jan 2040 22:23:32 GMT',
             'foo=bar; expires="01 Jan 2040 22:23:32 GMT"',
             ]:
-            self.assertEquals(parse_ns_headers([hdr]), expected)
+            self.assertEqual(parse_ns_headers([hdr]), expected)
 
     def test_parse_ns_headers_version(self):
         from cookielib import parse_ns_headers
@@ -125,7 +125,7 @@
             'foo=bar; version="1"',
             'foo=bar; Version="1"',
             ]:
-            self.assertEquals(parse_ns_headers([hdr]), expected)
+            self.assertEqual(parse_ns_headers([hdr]), expected)
 
     def test_parse_ns_headers_special_names(self):
         # names such as 'expires' are not special in first name=value pair
@@ -135,15 +135,15 @@
         # Cookie with name 'expires'
         hdr = 'expires=01 Jan 2040 22:23:32 GMT'
         expected = [[("expires", "01 Jan 2040 22:23:32 GMT"), ("version", "0")]]
-        self.assertEquals(parse_ns_headers([hdr]), expected)
+        self.assertEqual(parse_ns_headers([hdr]), expected)
 
     def test_join_header_words(self):
         from cookielib import join_header_words
 
         joined = join_header_words([[("foo", None), ("bar", "baz")]])
-        self.assertEquals(joined, "foo; bar=baz")
+        self.assertEqual(joined, "foo; bar=baz")
 
-        self.assertEquals(join_header_words([[]]), "")
+        self.assertEqual(join_header_words([[]]), "")
 
     def test_split_header_words(self):
         from cookielib import split_header_words
@@ -175,7 +175,7 @@
                 f = StringIO.StringIO()
                 traceback.print_exc(None, f)
                 result = "(error -- traceback follows)\n\n%s" % f.getvalue()
-            self.assertEquals(result,  expect, """
+            self.assertEqual(result,  expect, """
 When parsing: '%s'
 Expected:     '%s'
 Got:          '%s'
@@ -209,7 +209,7 @@
         for arg, expect in tests:
             input = split_header_words([arg])
             res = join_header_words(input)
-            self.assertEquals(res, expect, """
+            self.assertEqual(res, expect, """
 When parsing: '%s'
 Expected:     '%s'
 Got:          '%s'
@@ -380,11 +380,11 @@
         interact_netscape(c, "http://www.acme.com/", '"spam"; path=/foo/')
         cookie = c._cookies["www.acme.com"]["/"]["eggs"]
         self.assertTrue(cookie.value is None)
-        self.assertEquals(cookie.name, "eggs")
+        self.assertEqual(cookie.name, "eggs")
         cookie = c._cookies["www.acme.com"]['/foo/']['"spam"']
         self.assertTrue(cookie.value is None)
-        self.assertEquals(cookie.name, '"spam"')
-        self.assertEquals(lwp_cookie_str(cookie), (
+        self.assertEqual(cookie.name, '"spam"')
+        self.assertEqual(lwp_cookie_str(cookie), (
             r'"spam"; path="/foo/"; domain="www.acme.com"; '
             'path_spec; discard; version=0'))
         old_str = repr(c)
@@ -395,13 +395,13 @@
         finally:
             os.unlink(c.filename)
         # cookies unchanged apart from lost info re. whether path was specified
-        self.assertEquals(
+        self.assertEqual(
             repr(c),
             re.sub("path_specified=%s" % True, "path_specified=%s" % False,
                    old_str)
             )
-        self.assertEquals(interact_netscape(c, "http://www.acme.com/foo/"),
-                          '"spam"; eggs')
+        self.assertEqual(interact_netscape(c, "http://www.acme.com/foo/"),
+                         '"spam"; eggs')
 
     def test_rfc2109_handling(self):
         # RFC 2109 cookies are handled as RFC 2965 or Netscape cookies,
@@ -449,18 +449,18 @@
                           'expires="Foo Bar 25 33:22:11 3022"')
 
         cookie = c._cookies[".acme.com"]["/"]["spam"]
-        self.assertEquals(cookie.domain, ".acme.com")
+        self.assertEqual(cookie.domain, ".acme.com")
         self.assertTrue(cookie.domain_specified)
-        self.assertEquals(cookie.port, DEFAULT_HTTP_PORT)
+        self.assertEqual(cookie.port, DEFAULT_HTTP_PORT)
         self.assertTrue(not cookie.port_specified)
         # case is preserved
         self.assertTrue(cookie.has_nonstandard_attr("blArgh") and
                      not cookie.has_nonstandard_attr("blargh"))
 
         cookie = c._cookies["www.acme.com"]["/"]["ni"]
-        self.assertEquals(cookie.domain, "www.acme.com")
+        self.assertEqual(cookie.domain, "www.acme.com")
         self.assertTrue(not cookie.domain_specified)
-        self.assertEquals(cookie.port, "80,8080")
+        self.assertEqual(cookie.port, "80,8080")
         self.assertTrue(cookie.port_specified)
 
         cookie = c._cookies["www.acme.com"]["/"]["nini"]
@@ -494,13 +494,13 @@
         future = time2netscape(time.time()+3600)
         interact_netscape(c, "http://www.acme.com/", 'spam="bar"; expires=%s' %
                           future)
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
         now = time2netscape(time.time()-1)
         # ... and if in past or present, discard it
         interact_netscape(c, "http://www.acme.com/", 'foo="eggs"; expires=%s' %
                           now)
         h = interact_netscape(c, "http://www.acme.com/")
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
         self.assertTrue('spam="bar"' in h and "foo" not in h)
 
         # max-age takes precedence over expires, and zero max-age is request to
@@ -509,19 +509,19 @@
                           future)
         interact_netscape(c, "http://www.acme.com/", 'bar="bar"; expires=%s' %
                           future)
-        self.assertEquals(len(c), 3)
+        self.assertEqual(len(c), 3)
         interact_netscape(c, "http://www.acme.com/", 'eggs="bar"; '
                           'expires=%s; max-age=0' % future)
         interact_netscape(c, "http://www.acme.com/", 'bar="bar"; '
                           'max-age=0; expires=%s' % future)
         h = interact_netscape(c, "http://www.acme.com/")
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
 
         # test expiry at end of session for cookies with no expires attribute
         interact_netscape(c, "http://www.rhubarb.net/", 'whum="fizz"')
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
         c.clear_session_cookies()
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
         self.assertIn('spam="bar"', h)
 
         # XXX RFC 2965 expiry rules (some apply to V0 too)
@@ -576,7 +576,7 @@
         # default path does not include query, so is "/", not "/?spam"
         self.assertIn("/", cj._cookies["example.com"])
         # cookie is sent back to the same URI
-        self.assertEquals(interact_netscape(cj, uri), value)
+        self.assertEqual(interact_netscape(cj, uri), value)
 
     def test_escape_path(self):
         from cookielib import escape_path
@@ -600,7 +600,7 @@
             (u"/foo/bar\uabcd", "/foo/bar%EA%AF%8D"),  # UTF-8 encoded
             ]
         for arg, result in cases:
-            self.assertEquals(escape_path(arg), result)
+            self.assertEqual(escape_path(arg), result)
 
     def test_request_path(self):
         from urllib2 import Request
@@ -608,25 +608,25 @@
         # with parameters
         req = Request("http://www.example.com/rheum/rhaponticum;"
                       "foo=bar;sing=song?apples=pears&spam=eggs#ni")
-        self.assertEquals(request_path(req),
-                          "/rheum/rhaponticum;foo=bar;sing=song")
+        self.assertEqual(request_path(req),
+                         "/rheum/rhaponticum;foo=bar;sing=song")
         # without parameters
         req = Request("http://www.example.com/rheum/rhaponticum?"
                       "apples=pears&spam=eggs#ni")
-        self.assertEquals(request_path(req), "/rheum/rhaponticum")
+        self.assertEqual(request_path(req), "/rheum/rhaponticum")
         # missing final slash
         req = Request("http://www.example.com")
-        self.assertEquals(request_path(req), "/")
+        self.assertEqual(request_path(req), "/")
 
     def test_request_port(self):
         from urllib2 import Request
         from cookielib import request_port, DEFAULT_HTTP_PORT
         req = Request("http://www.acme.com:1234/",
                       headers={"Host": "www.acme.com:4321"})
-        self.assertEquals(request_port(req), "1234")
+        self.assertEqual(request_port(req), "1234")
         req = Request("http://www.acme.com/",
                       headers={"Host": "www.acme.com:4321"})
-        self.assertEquals(request_port(req), DEFAULT_HTTP_PORT)
+        self.assertEqual(request_port(req), DEFAULT_HTTP_PORT)
 
     def test_request_host(self):
         from urllib2 import Request
@@ -636,20 +636,20 @@
                       headers={"Host": "www.acme.com:80"})
         # libwww-perl wants this response, but that seems wrong (RFC 2616,
         # section 5.2, point 1., and RFC 2965 section 1, paragraph 3)
-        #self.assertEquals(request_host(req), "www.acme.com")
-        self.assertEquals(request_host(req), "1.1.1.1")
+        #self.assertEqual(request_host(req), "www.acme.com")
+        self.assertEqual(request_host(req), "1.1.1.1")
         req = Request("http://www.acme.com/",
                       headers={"Host": "irrelevant.com"})
-        self.assertEquals(request_host(req), "www.acme.com")
+        self.assertEqual(request_host(req), "www.acme.com")
         # not actually sure this one is valid Request object, so maybe should
         # remove test for no host in url in request_host function?
         req = Request("/resource.html",
                       headers={"Host": "www.acme.com"})
-        self.assertEquals(request_host(req), "www.acme.com")
+        self.assertEqual(request_host(req), "www.acme.com")
         # port shouldn't be in request-host
         req = Request("http://www.acme.com:2345/resource.html",
                       headers={"Host": "www.acme.com:5432"})
-        self.assertEquals(request_host(req), "www.acme.com")
+        self.assertEqual(request_host(req), "www.acme.com")
 
     def test_is_HDN(self):
         from cookielib import is_HDN
@@ -664,14 +664,14 @@
 
     def test_reach(self):
         from cookielib import reach
-        self.assertEquals(reach("www.acme.com"), ".acme.com")
-        self.assertEquals(reach("acme.com"), "acme.com")
-        self.assertEquals(reach("acme.local"), ".local")
-        self.assertEquals(reach(".local"), ".local")
-        self.assertEquals(reach(".com"), ".com")
-        self.assertEquals(reach("."), ".")
-        self.assertEquals(reach(""), "")
-        self.assertEquals(reach("192.168.0.1"), "192.168.0.1")
+        self.assertEqual(reach("www.acme.com"), ".acme.com")
+        self.assertEqual(reach("acme.com"), "acme.com")
+        self.assertEqual(reach("acme.local"), ".local")
+        self.assertEqual(reach(".local"), ".local")
+        self.assertEqual(reach(".com"), ".com")
+        self.assertEqual(reach("."), ".")
+        self.assertEqual(reach(""), "")
+        self.assertEqual(reach("192.168.0.1"), "192.168.0.1")
 
     def test_domain_match(self):
         from cookielib import domain_match, user_domain_match
@@ -719,7 +719,7 @@
         c = CookieJar()
         interact_2965(c, "http://www.nasty.com/",
                       'foo=bar; domain=friendly.org; Version="1"')
-        self.assertEquals(len(c), 0)
+        self.assertEqual(len(c), 0)
 
     def test_strict_domain(self):
         # Cookies whose domain is a country-code tld like .co.uk should
@@ -731,11 +731,11 @@
         interact_netscape(cj, "http://example.co.uk/", 'no=problemo')
         interact_netscape(cj, "http://example.co.uk/",
                           'okey=dokey; Domain=.example.co.uk')
-        self.assertEquals(len(cj), 2)
+        self.assertEqual(len(cj), 2)
         for pseudo_tld in [".co.uk", ".org.za", ".tx.us", ".name.us"]:
             interact_netscape(cj, "http://example.%s/" % pseudo_tld,
                               'spam=eggs; Domain=.co.uk')
-            self.assertEquals(len(cj), 2)
+            self.assertEqual(len(cj), 2)
 
     def test_two_component_domain_ns(self):
         # Netscape: .www.bar.com, www.bar.com, .bar.com, bar.com, no domain
@@ -747,17 +747,17 @@
 
         # two-component V0 domain is OK
         interact_netscape(c, "http://foo.net/", 'ns=bar')
-        self.assertEquals(len(c), 1)
-        self.assertEquals(c._cookies["foo.net"]["/"]["ns"].value, "bar")
-        self.assertEquals(interact_netscape(c, "http://foo.net/"), "ns=bar")
+        self.assertEqual(len(c), 1)
+        self.assertEqual(c._cookies["foo.net"]["/"]["ns"].value, "bar")
+        self.assertEqual(interact_netscape(c, "http://foo.net/"), "ns=bar")
         # *will* be returned to any other domain (unlike RFC 2965)...
-        self.assertEquals(interact_netscape(c, "http://www.foo.net/"),
-                          "ns=bar")
+        self.assertEqual(interact_netscape(c, "http://www.foo.net/"),
+                         "ns=bar")
         # ...unless requested otherwise
         pol = DefaultCookiePolicy(
             strict_ns_domain=DefaultCookiePolicy.DomainStrictNonDomain)
         c.set_policy(pol)
-        self.assertEquals(interact_netscape(c, "http://www.foo.net/"), "")
+        self.assertEqual(interact_netscape(c, "http://www.foo.net/"), "")
 
         # unlike RFC 2965, even explicit two-component domain is OK,
         # because .foo.net matches foo.net
@@ -766,17 +766,17 @@
         # even if starts with a dot -- in NS rules, .foo.net matches foo.net!
         interact_netscape(c, "http://foo.net/foo/bar/",
                           'spam2=eggs; domain=.foo.net')
-        self.assertEquals(len(c), 3)
-        self.assertEquals(c._cookies[".foo.net"]["/foo"]["spam1"].value,
-                          "eggs")
-        self.assertEquals(c._cookies[".foo.net"]["/foo/bar"]["spam2"].value,
-                          "eggs")
-        self.assertEquals(interact_netscape(c, "http://foo.net/foo/bar/"),
-                          "spam2=eggs; spam1=eggs; ns=bar")
+        self.assertEqual(len(c), 3)
+        self.assertEqual(c._cookies[".foo.net"]["/foo"]["spam1"].value,
+                         "eggs")
+        self.assertEqual(c._cookies[".foo.net"]["/foo/bar"]["spam2"].value,
+                         "eggs")
+        self.assertEqual(interact_netscape(c, "http://foo.net/foo/bar/"),
+                         "spam2=eggs; spam1=eggs; ns=bar")
 
         # top-level domain is too general
         interact_netscape(c, "http://foo.net/", 'nini="ni"; domain=.net')
-        self.assertEquals(len(c), 3)
+        self.assertEqual(len(c), 3)
 
 ##         # Netscape protocol doesn't allow non-special top level domains (such
 ##         # as co.uk) in the domain attribute unless there are at least three
@@ -784,8 +784,8 @@
         # Oh yes it does!  Real implementations don't check this, and real
         # cookies (of course) rely on that behaviour.
         interact_netscape(c, "http://foo.co.uk", 'nasty=trick; domain=.co.uk')
-##         self.assertEquals(len(c), 2)
-        self.assertEquals(len(c), 4)
+##         self.assertEqual(len(c), 2)
+        self.assertEqual(len(c), 4)
 
     def test_two_component_domain_rfc2965(self):
         from cookielib import CookieJar, DefaultCookiePolicy
@@ -795,43 +795,43 @@
 
         # two-component V1 domain is OK
         interact_2965(c, "http://foo.net/", 'foo=bar; Version="1"')
-        self.assertEquals(len(c), 1)
-        self.assertEquals(c._cookies["foo.net"]["/"]["foo"].value, "bar")
-        self.assertEquals(interact_2965(c, "http://foo.net/"),
-                          "$Version=1; foo=bar")
+        self.assertEqual(len(c), 1)
+        self.assertEqual(c._cookies["foo.net"]["/"]["foo"].value, "bar")
+        self.assertEqual(interact_2965(c, "http://foo.net/"),
+                         "$Version=1; foo=bar")
         # won't be returned to any other domain (because domain was implied)
-        self.assertEquals(interact_2965(c, "http://www.foo.net/"), "")
+        self.assertEqual(interact_2965(c, "http://www.foo.net/"), "")
 
         # unless domain is given explicitly, because then it must be
         # rewritten to start with a dot: foo.net --> .foo.net, which does
         # not domain-match foo.net
         interact_2965(c, "http://foo.net/foo",
                       'spam=eggs; domain=foo.net; path=/foo; Version="1"')
-        self.assertEquals(len(c), 1)
-        self.assertEquals(interact_2965(c, "http://foo.net/foo"),
-                          "$Version=1; foo=bar")
+        self.assertEqual(len(c), 1)
+        self.assertEqual(interact_2965(c, "http://foo.net/foo"),
+                         "$Version=1; foo=bar")
 
         # explicit foo.net from three-component domain www.foo.net *does* get
         # set, because .foo.net domain-matches .foo.net
         interact_2965(c, "http://www.foo.net/foo/",
                       'spam=eggs; domain=foo.net; Version="1"')
-        self.assertEquals(c._cookies[".foo.net"]["/foo/"]["spam"].value,
-                          "eggs")
-        self.assertEquals(len(c), 2)
-        self.assertEquals(interact_2965(c, "http://foo.net/foo/"),
-                          "$Version=1; foo=bar")
-        self.assertEquals(interact_2965(c, "http://www.foo.net/foo/"),
-                          '$Version=1; spam=eggs; $Domain="foo.net"')
+        self.assertEqual(c._cookies[".foo.net"]["/foo/"]["spam"].value,
+                         "eggs")
+        self.assertEqual(len(c), 2)
+        self.assertEqual(interact_2965(c, "http://foo.net/foo/"),
+                         "$Version=1; foo=bar")
+        self.assertEqual(interact_2965(c, "http://www.foo.net/foo/"),
+                         '$Version=1; spam=eggs; $Domain="foo.net"')
 
         # top-level domain is too general
         interact_2965(c, "http://foo.net/",
                       'ni="ni"; domain=".net"; Version="1"')
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
 
         # RFC 2965 doesn't require blocking this
         interact_2965(c, "http://foo.co.uk/",
                       'nasty=trick; domain=.co.uk; Version="1"')
-        self.assertEquals(len(c), 3)
+        self.assertEqual(len(c), 3)
 
     def test_domain_allow(self):
         from cookielib import CookieJar, DefaultCookiePolicy
@@ -845,24 +845,24 @@
         headers = ["Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/"]
         res = FakeResponse(headers, "http://acme.com/")
         c.extract_cookies(res, req)
-        self.assertEquals(len(c), 0)
+        self.assertEqual(len(c), 0)
 
         req = Request("http://www.acme.com/")
         res = FakeResponse(headers, "http://www.acme.com/")
         c.extract_cookies(res, req)
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
 
         req = Request("http://www.coyote.com/")
         res = FakeResponse(headers, "http://www.coyote.com/")
         c.extract_cookies(res, req)
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
 
         # set a cookie with non-allowed domain...
         req = Request("http://www.coyote.com/")
         res = FakeResponse(headers, "http://www.coyote.com/")
         cookies = c.make_cookies(res, req)
         c.set_cookie(cookies[0])
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
         # ... and check is doesn't get returned
         c.add_cookie_header(req)
         self.assertTrue(not req.has_header("Cookie"))
@@ -879,17 +879,17 @@
         req = Request("http://www.acme.com/")
         res = FakeResponse(headers, "http://www.acme.com/")
         c.extract_cookies(res, req)
-        self.assertEquals(len(c), 0)
+        self.assertEqual(len(c), 0)
 
         p = pol.set_blocked_domains(["acme.com"])
         c.extract_cookies(res, req)
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
 
         c.clear()
         req = Request("http://www.roadrunner.net/")
         res = FakeResponse(headers, "http://www.roadrunner.net/")
         c.extract_cookies(res, req)
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
         req = Request("http://www.roadrunner.net/")
         c.add_cookie_header(req)
         self.assertTrue((req.has_header("Cookie") and
@@ -898,14 +898,14 @@
         c.clear()
         pol.set_blocked_domains([".acme.com"])
         c.extract_cookies(res, req)
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
 
         # set a cookie with blocked domain...
         req = Request("http://www.acme.com/")
         res = FakeResponse(headers, "http://www.acme.com/")
         cookies = c.make_cookies(res, req)
         c.set_cookie(cookies[0])
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
         # ... and check is doesn't get returned
         c.add_cookie_header(req)
         self.assertTrue(not req.has_header("Cookie"))
@@ -940,7 +940,7 @@
         c = CookieJar(policy=DefaultCookiePolicy(rfc2965=True))
         interact_2965(c, "http://www.acme.com/", r'foo=\b"a"r; Version=1')
         h = interact_2965(c, "http://www.acme.com/")
-        self.assertEquals(h, r'$Version=1; foo=\\b\"a\"r')
+        self.assertEqual(h, r'$Version=1; foo=\\b\"a\"r')
 
     def test_missing_final_slash(self):
         # Missing slash from request URL's abs_path should be assumed present.
@@ -950,7 +950,7 @@
         c = CookieJar(DefaultCookiePolicy(rfc2965=True))
         interact_2965(c, url, "foo=bar; Version=1")
         req = Request(url)
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
         c.add_cookie_header(req)
         self.assertTrue(req.has_header("Cookie"))
 
@@ -1070,33 +1070,33 @@
             i = 0
             for c in cs:
                 self.assertIsInstance(c, Cookie)
-                self.assertEquals(c.version, versions[i])
-                self.assertEquals(c.name, names[i])
-                self.assertEquals(c.domain, domains[i])
-                self.assertEquals(c.path, paths[i])
+                self.assertEqual(c.version, versions[i])
+                self.assertEqual(c.name, names[i])
+                self.assertEqual(c.domain, domains[i])
+                self.assertEqual(c.path, paths[i])
                 i = i + 1
 
     def test_parse_ns_headers(self):
         from cookielib import parse_ns_headers
 
         # missing domain value (invalid cookie)
-        self.assertEquals(
+        self.assertEqual(
             parse_ns_headers(["foo=bar; path=/; domain"]),
             [[("foo", "bar"),
               ("path", "/"), ("domain", None), ("version", "0")]]
             )
         # invalid expires value
-        self.assertEquals(
+        self.assertEqual(
             parse_ns_headers(["foo=bar; expires=Foo Bar 12 33:22:11 2000"]),
             [[("foo", "bar"), ("expires", None), ("version", "0")]]
             )
         # missing cookie value (valid cookie)
-        self.assertEquals(
+        self.assertEqual(
             parse_ns_headers(["foo"]),
             [[("foo", None), ("version", "0")]]
             )
         # shouldn't add version if header is empty
-        self.assertEquals(parse_ns_headers([""]), [])
+        self.assertEqual(parse_ns_headers([""]), [])
 
     def test_bad_cookie_header(self):
 
@@ -1122,7 +1122,7 @@
             ]:
             c = cookiejar_from_cookie_headers(headers)
             # these bad cookies shouldn't be set
-            self.assertEquals(len(c), 0)
+            self.assertEqual(len(c), 0)
 
         # cookie with invalid expires is treated as session cookie
         headers = ["Set-Cookie: c=foo; expires=Foo Bar 12 33:22:11 2000"]
@@ -1267,7 +1267,7 @@
         req = Request("http://www.acme.com/")
         c.add_cookie_header(req)
 
-        self.assertEquals(req.get_header("Cookie"),
+        self.assertEqual(req.get_header("Cookie"),
                           "PART_NUMBER=ROCKET_LAUNCHER_0001")
 
         headers.append(
@@ -1471,40 +1471,40 @@
         # legal domain
         cookie = interact_2965(c, "http://www.acme.com",
                                'ping=pong; domain="acme.com"; version=1')
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
 
         # illegal domain (host prefix "www.a" contains a dot)
         cookie = interact_2965(c, "http://www.a.acme.com",
                                'whiz=bang; domain="acme.com"; version=1')
-        self.assertEquals(len(c), 1)
+        self.assertEqual(len(c), 1)
 
         # legal domain
         cookie = interact_2965(c, "http://www.a.acme.com",
                                'wow=flutter; domain=".a.acme.com"; version=1')
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
 
         # can't partially match an IP-address
         cookie = interact_2965(c, "http://125.125.125.125",
                                'zzzz=ping; domain="125.125.125"; version=1')
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
 
         # illegal path (must be prefix of request path)
         cookie = interact_2965(c, "http://www.sol.no",
                                'blah=rhubarb; domain=".sol.no"; path="/foo"; '
                                'version=1')
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
 
         # legal path
         cookie = interact_2965(c, "http://www.sol.no/foo/bar",
                                'bing=bong; domain=".sol.no"; path="/foo"; '
                                'version=1')
-        self.assertEquals(len(c), 3)
+        self.assertEqual(len(c), 3)
 
         # illegal port (request-port not in list)
         cookie = interact_2965(c, "http://www.sol.no",
                                'whiz=ffft; domain=".sol.no"; port="90,100"; '
                                'version=1')
-        self.assertEquals(len(c), 3)
+        self.assertEqual(len(c), 3)
 
         # legal port
         cookie = interact_2965(
@@ -1512,13 +1512,13 @@
             r'bang=wallop; version=1; domain=".sol.no"; '
             r'port="90,100, 80,8080"; '
             r'max-age=100; Comment = "Just kidding! (\"|\\\\) "')
-        self.assertEquals(len(c), 4)
+        self.assertEqual(len(c), 4)
 
         # port attribute without any value (current port)
         cookie = interact_2965(c, "http://www.sol.no",
                                'foo9=bar; version=1; domain=".sol.no"; port; '
                                'max-age=100;')
-        self.assertEquals(len(c), 5)
+        self.assertEqual(len(c), 5)
 
         # encoded path
         # LWP has this test, but unescaping allowed path characters seems
@@ -1529,7 +1529,7 @@
         # character:
         cookie = interact_2965(c, "http://www.sol.no/<oo/",
                                r'foo8=bar; version=1; path="/%3coo"')
-        self.assertEquals(len(c), 6)
+        self.assertEqual(len(c), 6)
 
         # save and restore
         filename = test_support.TESTFN
@@ -1544,7 +1544,7 @@
             try: os.unlink(filename)
             except OSError: pass
 
-        self.assertEquals(old, repr(c))
+        self.assertEqual(old, repr(c))
 
     def test_url_encoding(self):
         # Try some URL encodings of the PATHs.
@@ -1604,11 +1604,11 @@
             return new_c
 
         new_c = save_and_restore(c, True)
-        self.assertEquals(len(new_c), 6)  # none discarded
+        self.assertEqual(len(new_c), 6)  # none discarded
         self.assertIn("name='foo1', value='bar'", repr(new_c))
 
         new_c = save_and_restore(c, False)
-        self.assertEquals(len(new_c), 4)  # 2 of them discarded on save
+        self.assertEqual(len(new_c), 4)  # 2 of them discarded on save
         self.assertIn("name='foo1', value='bar'", repr(new_c))
 
     def test_netscape_misc(self):
@@ -1661,12 +1661,12 @@
         interact_netscape(c, "http://example/", "foo1=bar")
         cookie = interact_netscape(c, "http://example/",
                                    'foo2=bar; domain=.local')
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
         self.assertIn("foo1=bar", cookie)
 
         cookie = interact_netscape(c, "http://example/")
         self.assertIn("foo2=bar", cookie)
-        self.assertEquals(len(c), 2)
+        self.assertEqual(len(c), 2)
 
     def test_empty_path(self):
         from cookielib import CookieJar, DefaultCookiePolicy
@@ -1690,17 +1690,17 @@
         req = Request("http://www.ants.com/")
         c.add_cookie_header(req)
 
-        self.assertEquals(req.get_header("Cookie"),
-                          "JSESSIONID=ABCDERANDOM123")
-        self.assertEquals(req.get_header("Cookie2"), '$Version="1"')
+        self.assertEqual(req.get_header("Cookie"),
+                         "JSESSIONID=ABCDERANDOM123")
+        self.assertEqual(req.get_header("Cookie2"), '$Version="1"')
 
         # missing path in the request URI
         req = Request("http://www.ants.com:8080")
         c.add_cookie_header(req)
 
-        self.assertEquals(req.get_header("Cookie"),
-                          "JSESSIONID=ABCDERANDOM123")
-        self.assertEquals(req.get_header("Cookie2"), '$Version="1"')
+        self.assertEqual(req.get_header("Cookie"),
+                         "JSESSIONID=ABCDERANDOM123")
+        self.assertEqual(req.get_header("Cookie2"), '$Version="1"')
 
     def test_session_cookies(self):
         from cookielib import CookieJar

diff --git a/lib-python/2.7.0/bsddb/test/test_early_close.py b/lib-python/2.7.0/bsddb/test/test_early_close.py
--- a/lib-python/2.7.0/bsddb/test/test_early_close.py
+++ b/lib-python/2.7.0/bsddb/test/test_early_close.py
@@ -162,7 +162,7 @@
         txn = dbenv.txn_begin()
         c1 = d.cursor(txn)
         c2 = c1.dup()
-        self.assertEquals(("XXX", "yyy"), c1.first())
+        self.assertEqual(("XXX", "yyy"), c1.first())
 
         # Not interested in warnings about implicit close.
         import warnings

diff --git a/lib-python/2.7.0/bsddb/test/test_dbtables.py b/lib-python/2.7.0/bsddb/test/test_dbtables.py
--- a/lib-python/2.7.0/bsddb/test/test_dbtables.py
+++ b/lib-python/2.7.0/bsddb/test/test_dbtables.py
@@ -18,7 +18,7 @@
 #
 #   --  Gregory P. Smith <greg at krypto.org>
 #
-# $Id: test_dbtables.py 79285 2010-03-22 14:22:26Z jesus.cea $
+# $Id$
 
 import os, re, sys
 
@@ -84,8 +84,8 @@
             colval = pickle.loads(values[0][colname])
         else :
             colval = pickle.loads(bytes(values[0][colname], "iso8859-1"))
-        self.assert_(colval > 3.141)
-        self.assert_(colval < 3.142)
+        self.assertTrue(colval > 3.141)
+        self.assertTrue(colval < 3.142)
 
 
     def test02(self):

diff --git a/lib-python/2.7.0/test/test_fileio.py b/lib-python/2.7.0/test/test_fileio.py
--- a/lib-python/2.7.0/test/test_fileio.py
+++ b/lib-python/2.7.0/test/test_fileio.py
@@ -31,31 +31,31 @@
         # verify weak references
         p = proxy(self.f)
         p.write(bytes(range(10)))
-        self.assertEquals(self.f.tell(), p.tell())
+        self.assertEqual(self.f.tell(), p.tell())
         self.f.close()
         self.f = None
         self.assertRaises(ReferenceError, getattr, p, 'tell')
 
     def testSeekTell(self):
         self.f.write(bytes(range(20)))
-        self.assertEquals(self.f.tell(), 20)
+        self.assertEqual(self.f.tell(), 20)
         self.f.seek(0)
-        self.assertEquals(self.f.tell(), 0)
+        self.assertEqual(self.f.tell(), 0)
         self.f.seek(10)
-        self.assertEquals(self.f.tell(), 10)
+        self.assertEqual(self.f.tell(), 10)
         self.f.seek(5, 1)
-        self.assertEquals(self.f.tell(), 15)
+        self.assertEqual(self.f.tell(), 15)
         self.f.seek(-5, 1)
-        self.assertEquals(self.f.tell(), 10)
+        self.assertEqual(self.f.tell(), 10)
         self.f.seek(-5, 2)
-        self.assertEquals(self.f.tell(), 15)
+        self.assertEqual(self.f.tell(), 15)
 
     def testAttributes(self):
         # verify expected attributes exist
         f = self.f
 
-        self.assertEquals(f.mode, "wb")
-        self.assertEquals(f.closed, False)
+        self.assertEqual(f.mode, "wb")
+        self.assertEqual(f.closed, False)
 
         # verify the attributes are readonly
         for attr in 'mode', 'closed':
@@ -69,7 +69,7 @@
         a = array(b'b', b'x'*10)
         self.f = _FileIO(TESTFN, 'r')
         n = self.f.readinto(a)
-        self.assertEquals(array(b'b', [1, 2]), a[:n])
+        self.assertEqual(array(b'b', [1, 2]), a[:n])
 
     def test_none_args(self):
         self.f.write(b"hi\nbye\nabc")
@@ -81,19 +81,19 @@
         self.assertEqual(self.f.readlines(None), [b"bye\n", b"abc"])
 
     def testRepr(self):
-        self.assertEquals(repr(self.f), "<_io.FileIO name=%r mode='%s'>"
-                                        % (self.f.name, self.f.mode))
+        self.assertEqual(repr(self.f), "<_io.FileIO name=%r mode='%s'>"
+                                       % (self.f.name, self.f.mode))
         del self.f.name
-        self.assertEquals(repr(self.f), "<_io.FileIO fd=%r mode='%s'>"
-                                        % (self.f.fileno(), self.f.mode))
+        self.assertEqual(repr(self.f), "<_io.FileIO fd=%r mode='%s'>"
+                                       % (self.f.fileno(), self.f.mode))
         self.f.close()
-        self.assertEquals(repr(self.f), "<_io.FileIO [closed]>")
+        self.assertEqual(repr(self.f), "<_io.FileIO [closed]>")
 
     def testErrors(self):
         f = self.f
         self.assertTrue(not f.isatty())
         self.assertTrue(not f.closed)
-        #self.assertEquals(f.name, TESTFN)
+        #self.assertEqual(f.name, TESTFN)
         self.assertRaises(ValueError, f.read, 10) # Open for reading
         f.close()
         self.assertTrue(f.closed)
@@ -236,22 +236,22 @@
     def testAbles(self):
         try:
             f = _FileIO(TESTFN, "w")
-            self.assertEquals(f.readable(), False)
-            self.assertEquals(f.writable(), True)
-            self.assertEquals(f.seekable(), True)
+            self.assertEqual(f.readable(), False)
+            self.assertEqual(f.writable(), True)
+            self.assertEqual(f.seekable(), True)
             f.close()
 
             f = _FileIO(TESTFN, "r")
-            self.assertEquals(f.readable(), True)
-            self.assertEquals(f.writable(), False)
-            self.assertEquals(f.seekable(), True)
+            self.assertEqual(f.readable(), True)
+            self.assertEqual(f.writable(), False)
+            self.assertEqual(f.seekable(), True)
             f.close()
 
             f = _FileIO(TESTFN, "a+")
-            self.assertEquals(f.readable(), True)
-            self.assertEquals(f.writable(), True)
-            self.assertEquals(f.seekable(), True)
-            self.assertEquals(f.isatty(), False)
+            self.assertEqual(f.readable(), True)
+            self.assertEqual(f.writable(), True)
+            self.assertEqual(f.seekable(), True)
+            self.assertEqual(f.isatty(), False)
             f.close()
 
             if sys.platform != "win32":
@@ -263,14 +263,14 @@
                     # OS'es that don't support /dev/tty.
                     pass
                 else:
-                    self.assertEquals(f.readable(), False)
-                    self.assertEquals(f.writable(), True)
+                    self.assertEqual(f.readable(), False)
+                    self.assertEqual(f.writable(), True)
                     if sys.platform != "darwin" and \
                        'bsd' not in sys.platform and \
                        not sys.platform.startswith('sunos'):
                         # Somehow /dev/tty appears seekable on some BSDs
-                        self.assertEquals(f.seekable(), False)
-                    self.assertEquals(f.isatty(), True)
+                        self.assertEqual(f.seekable(), False)
+                    self.assertEqual(f.isatty(), True)
                     f.close()
         finally:
             os.unlink(TESTFN)
@@ -304,7 +304,7 @@
             f.write(b"abc")
             f.close()
             with open(TESTFN, "rb") as f:
-                self.assertEquals(f.read(), b"abc")
+                self.assertEqual(f.read(), b"abc")
         finally:
             os.unlink(TESTFN)
 

diff --git a/lib-python/2.7.0/distutils/command/build_ext.py b/lib-python/2.7.0/distutils/command/build_ext.py
--- a/lib-python/2.7.0/distutils/command/build_ext.py
+++ b/lib-python/2.7.0/distutils/command/build_ext.py
@@ -6,7 +6,7 @@
 
 # This module should be kept compatible with Python 2.1.
 
-__revision__ = "$Id: build_ext.py 84683 2010-09-10 20:03:17Z antoine.pitrou $"
+__revision__ = "$Id$"
 
 import sys, os, string, re
 from types import *

diff --git a/lib-python/2.7.0/test/test_httplib.py b/lib-python/2.7.0/test/test_httplib.py
--- a/lib-python/2.7.0/test/test_httplib.py
+++ b/lib-python/2.7.0/test/test_httplib.py
@@ -97,6 +97,26 @@
         conn.putheader('Content-length',42)
         self.assertTrue('Content-length: 42' in conn._buffer)
 
+    def test_ipv6host_header(self):
+        # Default host header on IPv6 transaction should wrapped by [] if
+        # its actual IPv6 address
+        expected = 'GET /foo HTTP/1.1\r\nHost: [2001::]:81\r\n' \
+                   'Accept-Encoding: identity\r\n\r\n'
+        conn = httplib.HTTPConnection('[2001::]:81')
+        sock = FakeSocket('')
+        conn.sock = sock
+        conn.request('GET', '/foo')
+        self.assertTrue(sock.data.startswith(expected))
+
+        expected = 'GET /foo HTTP/1.1\r\nHost: [2001:102A::]\r\n' \
+                   'Accept-Encoding: identity\r\n\r\n'
+        conn = httplib.HTTPConnection('[2001:102A::]')
+        sock = FakeSocket('')
+        conn.sock = sock
+        conn.request('GET', '/foo')
+        self.assertTrue(sock.data.startswith(expected))
+
+
 class BasicTest(TestCase):
     def test_status_lines(self):
         # Test HTTP status lines
@@ -115,7 +135,7 @@
 
     def test_bad_status_repr(self):
         exc = httplib.BadStatusLine('')
-        self.assertEquals(repr(exc), '''BadStatusLine("\'\'",)''')
+        self.assertEqual(repr(exc), '''BadStatusLine("\'\'",)''')
 
     def test_partial_reads(self):
         # if we have a lenght, the system knows when to close itself
@@ -196,13 +216,13 @@
         sock = FakeSocket(None)
         conn.sock = sock
         conn.send(expected)
-        self.assertEquals(expected, sock.data)
+        self.assertEqual(expected, sock.data)
         sock.data = ''
         conn.send(array.array('c', expected))
-        self.assertEquals(expected, sock.data)
+        self.assertEqual(expected, sock.data)
         sock.data = ''
         conn.send(StringIO.StringIO(expected))
-        self.assertEquals(expected, sock.data)
+        self.assertEqual(expected, sock.data)
 
     def test_chunked(self):
         chunked_start = (
@@ -216,7 +236,7 @@
         sock = FakeSocket(chunked_start + '0\r\n')
         resp = httplib.HTTPResponse(sock, method="GET")
         resp.begin()
-        self.assertEquals(resp.read(), 'hello world')
+        self.assertEqual(resp.read(), 'hello world')
         resp.close()
 
         for x in ('', 'foo\r\n'):
@@ -226,7 +246,7 @@
             try:
                 resp.read()
             except httplib.IncompleteRead, i:
-                self.assertEquals(i.partial, 'hello world')
+                self.assertEqual(i.partial, 'hello world')
                 self.assertEqual(repr(i),'IncompleteRead(11 bytes read)')
                 self.assertEqual(str(i),'IncompleteRead(11 bytes read)')
             else:
@@ -246,9 +266,9 @@
         sock = FakeSocket(chunked_start + '0\r\n')
         resp = httplib.HTTPResponse(sock, method="HEAD")
         resp.begin()
-        self.assertEquals(resp.read(), '')
-        self.assertEquals(resp.status, 200)
-        self.assertEquals(resp.reason, 'OK')
+        self.assertEqual(resp.read(), '')
+        self.assertEqual(resp.status, 200)
+        self.assertEqual(resp.reason, 'OK')
         self.assertTrue(resp.isclosed())
 
     def test_negative_content_length(self):
@@ -256,7 +276,7 @@
                           'Content-Length: -1\r\n\r\nHello\r\n')
         resp = httplib.HTTPResponse(sock, method="GET")
         resp.begin()
-        self.assertEquals(resp.read(), 'Hello\r\n')
+        self.assertEqual(resp.read(), 'Hello\r\n')
         resp.close()
 
     def test_incomplete_read(self):
@@ -266,7 +286,7 @@
         try:
             resp.read()
         except httplib.IncompleteRead as i:
-            self.assertEquals(i.partial, 'Hello\r\n')
+            self.assertEqual(i.partial, 'Hello\r\n')
             self.assertEqual(repr(i),
                              "IncompleteRead(7 bytes read, 3 more expected)")
             self.assertEqual(str(i),
@@ -301,7 +321,7 @@
 
 class OfflineTest(TestCase):
     def test_responses(self):
-        self.assertEquals(httplib.responses[httplib.NOT_FOUND], "Not Found")
+        self.assertEqual(httplib.responses[httplib.NOT_FOUND], "Not Found")
 
 
 class SourceAddressTest(TestCase):

diff --git a/lib-python/2.7.0/test/test_py3kwarn.py b/lib-python/2.7.0/test/test_py3kwarn.py
--- a/lib-python/2.7.0/test/test_py3kwarn.py
+++ b/lib-python/2.7.0/test/test_py3kwarn.py
@@ -397,7 +397,7 @@
             reset_module_registry(mod)
             with check_py3k_warnings() as w:
                 mod.walk("crashers", dumbo, None)
-            self.assertEquals(str(w.message), msg)
+            self.assertEqual(str(w.message), msg)
 
     def test_reduce_move(self):
         from operator import add

diff --git a/lib-python/2.7.0/distutils/dist.py b/lib-python/2.7.0/distutils/dist.py
--- a/lib-python/2.7.0/distutils/dist.py
+++ b/lib-python/2.7.0/distutils/dist.py
@@ -4,7 +4,7 @@
 being built/installed/distributed.
 """
 
-__revision__ = "$Id: dist.py 77717 2010-01-24 00:33:32Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys, os, re
 from email import message_from_file
@@ -1101,9 +1101,11 @@
     def write_pkg_info(self, base_dir):
         """Write the PKG-INFO file into the release tree.
         """
-        pkg_info = open( os.path.join(base_dir, 'PKG-INFO'), 'w')
-        self.write_pkg_file(pkg_info)
-        pkg_info.close()
+        pkg_info = open(os.path.join(base_dir, 'PKG-INFO'), 'w')
+        try:
+            self.write_pkg_file(pkg_info)
+        finally:
+            pkg_info.close()
 
     def write_pkg_file(self, file):
         """Write the PKG-INFO format data to a file object.

diff --git a/lib-python/2.7.0/distutils/core.py b/lib-python/2.7.0/distutils/core.py
--- a/lib-python/2.7.0/distutils/core.py
+++ b/lib-python/2.7.0/distutils/core.py
@@ -6,7 +6,7 @@
 really defined in distutils.dist and distutils.cmd.
 """
 
-__revision__ = "$Id: core.py 77704 2010-01-23 09:23:15Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys
 import os
@@ -216,7 +216,11 @@
             sys.argv[0] = script_name
             if script_args is not None:
                 sys.argv[1:] = script_args
-            exec open(script_name, 'r').read() in g, l
+            f = open(script_name)
+            try:
+                exec f.read() in g, l
+            finally:
+                f.close()
         finally:
             sys.argv = save_argv
             _setup_stop_after = None

diff --git a/lib-python/2.7.0/distutils/command/build_clib.py b/lib-python/2.7.0/distutils/command/build_clib.py
--- a/lib-python/2.7.0/distutils/command/build_clib.py
+++ b/lib-python/2.7.0/distutils/command/build_clib.py
@@ -4,7 +4,7 @@
 that is included in the module distribution and needed by an extension
 module."""
 
-__revision__ = "$Id: build_clib.py 84610 2010-09-07 22:18:34Z eric.araujo $"
+__revision__ = "$Id$"
 
 
 # XXX this module has *lots* of code ripped-off quite transparently from

diff --git a/lib-python/2.7.0/distutils/extension.py b/lib-python/2.7.0/distutils/extension.py
--- a/lib-python/2.7.0/distutils/extension.py
+++ b/lib-python/2.7.0/distutils/extension.py
@@ -3,7 +3,7 @@
 Provides the Extension class, used to describe C/C++ extension
 modules in setup scripts."""
 
-__revision__ = "$Id: extension.py 78666 2010-03-05 00:16:02Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os, string, sys
 from types import *
@@ -150,87 +150,96 @@
     file = TextFile(filename,
                     strip_comments=1, skip_blanks=1, join_lines=1,
                     lstrip_ws=1, rstrip_ws=1)
-    extensions = []
+    try:
+        extensions = []
 
-    while 1:
-        line = file.readline()
-        if line is None:                # eof
-            break
-        if _variable_rx.match(line):    # VAR=VALUE, handled in first pass
-            continue
-
-        if line[0] == line[-1] == "*":
-            file.warn("'%s' lines not handled yet" % line)
-            continue
-
-        #print "original line: " + line
-        line = expand_makefile_vars(line, vars)
-        words = split_quoted(line)
-        #print "expanded line: " + line
-
-        # NB. this parses a slightly different syntax than the old
-        # makesetup script: here, there must be exactly one extension per
-        # line, and it must be the first word of the line.  I have no idea
-        # why the old syntax supported multiple extensions per line, as
-        # they all wind up being the same.
-
-        module = words[0]
-        ext = Extension(module, [])
-        append_next_word = None
-
-        for word in words[1:]:
-            if append_next_word is not None:
-                append_next_word.append(word)
-                append_next_word = None
+        while 1:
+            line = file.readline()
+            if line is None:                # eof
+                break
+            if _variable_rx.match(line):    # VAR=VALUE, handled in first pass
                 continue
 
-            suffix = os.path.splitext(word)[1]
-            switch = word[0:2] ; value = word[2:]
+                if line[0] == line[-1] == "*":
+                    file.warn("'%s' lines not handled yet" % line)
+                    continue
 
-            if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"):
-                # hmm, should we do something about C vs. C++ sources?
-                # or leave it up to the CCompiler implementation to
-                # worry about?
-                ext.sources.append(word)
-            elif switch == "-I":
-                ext.include_dirs.append(value)
-            elif switch == "-D":
-                equals = string.find(value, "=")
-                if equals == -1:        # bare "-DFOO" -- no value
-                    ext.define_macros.append((value, None))
-                else:                   # "-DFOO=blah"
-                    ext.define_macros.append((value[0:equals],
-                                              value[equals+2:]))
-            elif switch == "-U":
-                ext.undef_macros.append(value)
-            elif switch == "-C":        # only here 'cause makesetup has it!
-                ext.extra_compile_args.append(word)
-            elif switch == "-l":
-                ext.libraries.append(value)
-            elif switch == "-L":
-                ext.library_dirs.append(value)
-            elif switch == "-R":
-                ext.runtime_library_dirs.append(value)
-            elif word == "-rpath":
-                append_next_word = ext.runtime_library_dirs
-            elif word == "-Xlinker":
-                append_next_word = ext.extra_link_args
-            elif word == "-Xcompiler":
-                append_next_word = ext.extra_compile_args
-            elif switch == "-u":
-                ext.extra_link_args.append(word)
-                if not value:
+            #print "original line: " + line
+            line = expand_makefile_vars(line, vars)
+            words = split_quoted(line)
+            #print "expanded line: " + line
+
+            # NB. this parses a slightly different syntax than the old
+            # makesetup script: here, there must be exactly one extension per
+            # line, and it must be the first word of the line.  I have no idea
+            # why the old syntax supported multiple extensions per line, as
+            # they all wind up being the same.
+
+            module = words[0]
+            ext = Extension(module, [])
+            append_next_word = None
+
+            for word in words[1:]:
+                if append_next_word is not None:
+                    append_next_word.append(word)
+                    append_next_word = None
+                    continue
+
+                suffix = os.path.splitext(word)[1]
+                switch = word[0:2] ; value = word[2:]
+
+                if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"):
+                    # hmm, should we do something about C vs. C++ sources?
+                    # or leave it up to the CCompiler implementation to
+                    # worry about?
+                    ext.sources.append(word)
+                elif switch == "-I":
+                    ext.include_dirs.append(value)
+                elif switch == "-D":
+                    equals = string.find(value, "=")
+                    if equals == -1:        # bare "-DFOO" -- no value
+                        ext.define_macros.append((value, None))
+                    else:                   # "-DFOO=blah"
+                        ext.define_macros.append((value[0:equals],
+                                                  value[equals+2:]))
+                elif switch == "-U":
+                    ext.undef_macros.append(value)
+                elif switch == "-C":        # only here 'cause makesetup has it!
+                    ext.extra_compile_args.append(word)
+                elif switch == "-l":
+                    ext.libraries.append(value)
+                elif switch == "-L":
+                    ext.library_dirs.append(value)
+                elif switch == "-R":
+                    ext.runtime_library_dirs.append(value)
+                elif word == "-rpath":
+                    append_next_word = ext.runtime_library_dirs
+                elif word == "-Xlinker":
                     append_next_word = ext.extra_link_args
-            elif suffix in (".a", ".so", ".sl", ".o", ".dylib"):
-                # NB. a really faithful emulation of makesetup would
-                # append a .o file to extra_objects only if it
-                # had a slash in it; otherwise, it would s/.o/.c/
-                # and append it to sources.  Hmmmm.
-                ext.extra_objects.append(word)
-            else:
-                file.warn("unrecognized argument '%s'" % word)
+                elif word == "-Xcompiler":
+                    append_next_word = ext.extra_compile_args
+                elif switch == "-u":
+                    ext.extra_link_args.append(word)
+                    if not value:
+                        append_next_word = ext.extra_link_args
+                elif word == "-Xcompiler":
+                    append_next_word = ext.extra_compile_args
+                elif switch == "-u":
+                    ext.extra_link_args.append(word)
+                    if not value:
+                        append_next_word = ext.extra_link_args
+                elif suffix in (".a", ".so", ".sl", ".o", ".dylib"):
+                    # NB. a really faithful emulation of makesetup would
+                    # append a .o file to extra_objects only if it
+                    # had a slash in it; otherwise, it would s/.o/.c/
+                    # and append it to sources.  Hmmmm.
+                    ext.extra_objects.append(word)
+                else:
+                    file.warn("unrecognized argument '%s'" % word)
 
-        extensions.append(ext)
+            extensions.append(ext)
+    finally:
+        file.close()
 
         #print "module:", module
         #print "source files:", source_files

diff --git a/lib-python/2.7.0/distutils/errors.py b/lib-python/2.7.0/distutils/errors.py
--- a/lib-python/2.7.0/distutils/errors.py
+++ b/lib-python/2.7.0/distutils/errors.py
@@ -8,7 +8,7 @@
 This module is safe to use in "from ... import *" mode; it only exports
 symbols whose names start with "Distutils" and end with "Error"."""
 
-__revision__ = "$Id: errors.py 75901 2009-10-28 06:45:18Z tarek.ziade $"
+__revision__ = "$Id$"
 
 class DistutilsError(Exception):
     """The root of all Distutils evil."""

diff --git a/lib-python/2.7.0/test/test_file2k.py b/lib-python/2.7.0/test/test_file2k.py
--- a/lib-python/2.7.0/test/test_file2k.py
+++ b/lib-python/2.7.0/test/test_file2k.py
@@ -29,7 +29,7 @@
         # verify weak references
         p = proxy(self.f)
         p.write('teststring')
-        self.assertEquals(self.f.tell(), p.tell())
+        self.assertEqual(self.f.tell(), p.tell())
         self.f.close()
         self.f = None
         self.assertRaises(ReferenceError, getattr, p, 'tell')
@@ -58,7 +58,7 @@
         a = array('c', 'x'*10)
         self.f = open(TESTFN, 'rb')
         n = self.f.readinto(a)
-        self.assertEquals('12', a.tostring()[:n])
+        self.assertEqual('12', a.tostring()[:n])
 
     def testWritelinesUserList(self):
         # verify writelines with instance sequence
@@ -67,7 +67,7 @@
         self.f.close()
         self.f = open(TESTFN, 'rb')
         buf = self.f.read()
-        self.assertEquals(buf, '12')
+        self.assertEqual(buf, '12')
 
     def testWritelinesIntegers(self):
         # verify writelines with integers
@@ -94,7 +94,7 @@
         self.f.close()
         self.f = open(TESTFN, 'rb')
         f = self.f
-        self.assertEquals(f.name, TESTFN)
+        self.assertEqual(f.name, TESTFN)
         self.assertTrue(not f.isatty())
         self.assertTrue(not f.closed)
 
@@ -125,12 +125,12 @@
         self.assertRaises(ValueError, self.f.writelines, [])
 
         # file is closed, __exit__ shouldn't do anything
-        self.assertEquals(self.f.__exit__(None, None, None), None)
+        self.assertEqual(self.f.__exit__(None, None, None), None)
         # it must also return None if an exception was given
         try:
             1 // 0
         except:
-            self.assertEquals(self.f.__exit__(*sys.exc_info()), None)
+            self.assertEqual(self.f.__exit__(*sys.exc_info()), None)
 
     def testReadWhenWriting(self):
         self.assertRaises(IOError, self.f.read)
@@ -261,7 +261,7 @@
                 f.close()
             except IOError, msg:
                 self.fail('error setting buffer size %d: %s' % (s, str(msg)))
-            self.assertEquals(d, s)
+            self.assertEqual(d, s)
 
     def testTruncateOnWindows(self):
         os.unlink(TESTFN)
@@ -621,7 +621,7 @@
         try:
             print
         except RuntimeError as e:
-            self.assertEquals(str(e), "lost sys.stdout")
+            self.assertEqual(str(e), "lost sys.stdout")
         else:
             self.fail("Expected RuntimeError")
         finally:

diff --git a/lib-python/2.7.0/distutils/command/install_scripts.py b/lib-python/2.7.0/distutils/command/install_scripts.py
--- a/lib-python/2.7.0/distutils/command/install_scripts.py
+++ b/lib-python/2.7.0/distutils/command/install_scripts.py
@@ -5,7 +5,7 @@
 
 # contributed by Bastian Kleineidam
 
-__revision__ = "$Id: install_scripts.py 68943 2009-01-25 22:09:10Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 from distutils.core import Command

diff --git a/lib-python/2.7.0/bsddb/test/test_distributed_transactions.py b/lib-python/2.7.0/bsddb/test/test_distributed_transactions.py
--- a/lib-python/2.7.0/bsddb/test/test_distributed_transactions.py
+++ b/lib-python/2.7.0/bsddb/test/test_distributed_transactions.py
@@ -88,9 +88,9 @@
     # Get "to be recovered" transactions but
     # let them be garbage collected.
         recovered_txns=self.dbenv.txn_recover()
-        self.assertEquals(self.num_txns,len(recovered_txns))
+        self.assertEqual(self.num_txns,len(recovered_txns))
         for gid,txn in recovered_txns :
-            self.assert_(gid in txns)
+            self.assertTrue(gid in txns)
         del txn
         del recovered_txns
 
@@ -99,7 +99,7 @@
     # Get "to be recovered" transactions. Commit, abort and
     # discard them.
         recovered_txns=self.dbenv.txn_recover()
-        self.assertEquals(self.num_txns,len(recovered_txns))
+        self.assertEqual(self.num_txns,len(recovered_txns))
         discard_txns=set()
         committed_txns=set()
         state=0
@@ -122,7 +122,7 @@
     # Verify the discarded transactions are still
     # around, and dispose them.
         recovered_txns=self.dbenv.txn_recover()
-        self.assertEquals(len(discard_txns),len(recovered_txns))
+        self.assertEqual(len(discard_txns),len(recovered_txns))
         for gid,txn in recovered_txns :
             txn.abort()
         del txn
@@ -133,8 +133,8 @@
     # Be sure there are not pending transactions.
     # Check also database size.
         recovered_txns=self.dbenv.txn_recover()
-        self.assert_(len(recovered_txns)==0)
-        self.assertEquals(len(committed_txns),self.db.stat()["nkeys"])
+        self.assertTrue(len(recovered_txns)==0)
+        self.assertEqual(len(committed_txns),self.db.stat()["nkeys"])
 
 class DBTxn_distributedSYNC(DBTxn_distributed):
     nosync=False

diff --git a/lib-python/2.7.0/test/test_minidom.py b/lib-python/2.7.0/test/test_minidom.py
--- a/lib-python/2.7.0/test/test_minidom.py
+++ b/lib-python/2.7.0/test/test_minidom.py
@@ -748,7 +748,7 @@
     def check_clone_pi(self, deep, testName):
         doc = parseString("<?target data?><doc/>")
         pi = doc.firstChild
-        self.assertEquals(pi.nodeType, Node.PROCESSING_INSTRUCTION_NODE)
+        self.assertEqual(pi.nodeType, Node.PROCESSING_INSTRUCTION_NODE)
         clone = pi.cloneNode(deep)
         self.confirm(clone.target == pi.target
                 and clone.data == pi.data)
@@ -948,7 +948,7 @@
     def testBug0777884(self):
         doc = parseString("<o>text</o>")
         text = doc.documentElement.childNodes[0]
-        self.assertEquals(text.nodeType, Node.TEXT_NODE)
+        self.assertEqual(text.nodeType, Node.TEXT_NODE)
         # Should run quietly, doing nothing.
         text.normalize()
         doc.unlink()
@@ -1226,7 +1226,7 @@
         doc = parseString("<doc>a</doc>")
         elem = doc.documentElement
         text = elem.childNodes[0]
-        self.assertEquals(text.nodeType, Node.TEXT_NODE)
+        self.assertEqual(text.nodeType, Node.TEXT_NODE)
 
         self.checkWholeText(text, "a")
         elem.appendChild(doc.createTextNode("b"))
@@ -1483,6 +1483,13 @@
         doc.appendChild(doc.createComment("foo--bar"))
         self.assertRaises(ValueError, doc.toxml)
 
+    def testEmptyXMLNSValue(self):
+        doc = parseString("<element xmlns=''>\n"
+                          "<foo/>\n</element>")
+        doc2 = parseString(doc.toxml())
+        self.confirm(doc2.namespaceURI == xml.dom.EMPTY_NAMESPACE)
+
+
 def test_main():
     run_unittest(MinidomTest)
 

diff --git a/lib-python/2.7.0/distutils/tests/test_file_util.py b/lib-python/2.7.0/distutils/tests/test_file_util.py
--- a/lib-python/2.7.0/distutils/tests/test_file_util.py
+++ b/lib-python/2.7.0/distutils/tests/test_file_util.py
@@ -31,19 +31,21 @@
 
     def test_move_file_verbosity(self):
         f = open(self.source, 'w')
-        f.write('some content')
-        f.close()
+        try:
+            f.write('some content')
+        finally:
+            f.close()
 
         move_file(self.source, self.target, verbose=0)
         wanted = []
-        self.assertEquals(self._logs, wanted)
+        self.assertEqual(self._logs, wanted)
 
         # back to original state
         move_file(self.target, self.source, verbose=0)
 
         move_file(self.source, self.target, verbose=1)
         wanted = ['moving %s -> %s' % (self.source, self.target)]
-        self.assertEquals(self._logs, wanted)
+        self.assertEqual(self._logs, wanted)
 
         # back to original state
         move_file(self.target, self.source, verbose=0)
@@ -53,7 +55,7 @@
         os.mkdir(self.target_dir)
         move_file(self.source, self.target_dir, verbose=1)
         wanted = ['moving %s -> %s' % (self.source, self.target_dir)]
-        self.assertEquals(self._logs, wanted)
+        self.assertEqual(self._logs, wanted)
 
     def test_write_file(self):
         lines = ['a', 'b', 'c']
@@ -61,7 +63,7 @@
         foo = os.path.join(dir, 'foo')
         write_file(foo, lines)
         content = [line.strip() for line in open(foo).readlines()]
-        self.assertEquals(content, lines)
+        self.assertEqual(content, lines)
 
     def test_copy_file(self):
         src_dir = self.mkdtemp()

diff --git a/lib-python/2.7.0/distutils/tests/test_text_file.py b/lib-python/2.7.0/distutils/tests/test_text_file.py
--- a/lib-python/2.7.0/distutils/tests/test_text_file.py
+++ b/lib-python/2.7.0/distutils/tests/test_text_file.py
@@ -48,7 +48,7 @@
 
         def test_input(count, description, file, expected_result):
             result = file.readlines()
-            self.assertEquals(result, expected_result)
+            self.assertEqual(result, expected_result)
 
         tmpdir = self.mkdtemp()
         filename = os.path.join(tmpdir, "test.txt")
@@ -58,28 +58,46 @@
         finally:
             out_file.close()
 
-        in_file = TextFile (filename, strip_comments=0, skip_blanks=0,
-                            lstrip_ws=0, rstrip_ws=0)
-        test_input (1, "no processing", in_file, result1)
+        in_file = TextFile(filename, strip_comments=0, skip_blanks=0,
+                           lstrip_ws=0, rstrip_ws=0)
+        try:
+            test_input(1, "no processing", in_file, result1)
+        finally:
+            in_file.close()
 
-        in_file = TextFile (filename, strip_comments=1, skip_blanks=0,
-                            lstrip_ws=0, rstrip_ws=0)
-        test_input (2, "strip comments", in_file, result2)
+        in_file = TextFile(filename, strip_comments=1, skip_blanks=0,
+                           lstrip_ws=0, rstrip_ws=0)
+        try:
+            test_input(2, "strip comments", in_file, result2)
+        finally:
+            in_file.close()
 
-        in_file = TextFile (filename, strip_comments=0, skip_blanks=1,
-                            lstrip_ws=0, rstrip_ws=0)
-        test_input (3, "strip blanks", in_file, result3)
+        in_file = TextFile(filename, strip_comments=0, skip_blanks=1,
+                           lstrip_ws=0, rstrip_ws=0)
+        try:
+            test_input(3, "strip blanks", in_file, result3)
+        finally:
+            in_file.close()
 
-        in_file = TextFile (filename)
-        test_input (4, "default processing", in_file, result4)
+        in_file = TextFile(filename)
+        try:
+            test_input(4, "default processing", in_file, result4)
+        finally:
+            in_file.close()
 
-        in_file = TextFile (filename, strip_comments=1, skip_blanks=1,
-                            join_lines=1, rstrip_ws=1)
-        test_input (5, "join lines without collapsing", in_file, result5)
+        in_file = TextFile(filename, strip_comments=1, skip_blanks=1,
+                           join_lines=1, rstrip_ws=1)
+        try:
+            test_input(5, "join lines without collapsing", in_file, result5)
+        finally:
+            in_file.close()
 
-        in_file = TextFile (filename, strip_comments=1, skip_blanks=1,
-                            join_lines=1, rstrip_ws=1, collapse_join=1)
-        test_input (6, "join lines with collapsing", in_file, result6)
+        in_file = TextFile(filename, strip_comments=1, skip_blanks=1,
+                           join_lines=1, rstrip_ws=1, collapse_join=1)
+        try:
+            test_input(6, "join lines with collapsing", in_file, result6)
+        finally:
+            in_file.close()
 
 def test_suite():
     return unittest.makeSuite(TextFileTestCase)

diff --git a/lib-python/2.7.0/test/test_codeop.py b/lib-python/2.7.0/test/test_codeop.py
--- a/lib-python/2.7.0/test/test_codeop.py
+++ b/lib-python/2.7.0/test/test_codeop.py
@@ -37,14 +37,14 @@
                 ctx = {'a': 2}
                 d = { 'value': eval(code,ctx) }
                 r = { 'value': eval(str,ctx) }
-            self.assertEquals(unify_callables(r),unify_callables(d))
+            self.assertEqual(unify_callables(r),unify_callables(d))
         else:
             expected = compile(str, "<input>", symbol, PyCF_DONT_IMPLY_DEDENT)
-            self.assertEquals( compile_command(str, "<input>", symbol), expected)
+            self.assertEqual(compile_command(str, "<input>", symbol), expected)
 
     def assertIncomplete(self, str, symbol='single'):
         '''succeed iff str is the start of a valid piece of code'''
-        self.assertEquals( compile_command(str, symbol=symbol), None)
+        self.assertEqual(compile_command(str, symbol=symbol), None)
 
     def assertInvalid(self, str, symbol='single', is_syntax=1):
         '''succeed iff str is the start of an invalid piece of code'''
@@ -61,12 +61,12 @@
 
         # special case
         if not is_jython:
-            self.assertEquals(compile_command(""),
-                            compile("pass", "<input>", 'single',
-                                    PyCF_DONT_IMPLY_DEDENT))
-            self.assertEquals(compile_command("\n"),
-                            compile("pass", "<input>", 'single',
-                                    PyCF_DONT_IMPLY_DEDENT))
+            self.assertEqual(compile_command(""),
+                             compile("pass", "<input>", 'single',
+                                     PyCF_DONT_IMPLY_DEDENT))
+            self.assertEqual(compile_command("\n"),
+                             compile("pass", "<input>", 'single',
+                                     PyCF_DONT_IMPLY_DEDENT))
         else:
             av("")
             av("\n")
@@ -290,10 +290,10 @@
         ai("[i for i in range(10)] = (1, 2, 3)")
 
     def test_filename(self):
-        self.assertEquals(compile_command("a = 1\n", "abc").co_filename,
-                          compile("a = 1\n", "abc", 'single').co_filename)
-        self.assertNotEquals(compile_command("a = 1\n", "abc").co_filename,
-                             compile("a = 1\n", "def", 'single').co_filename)
+        self.assertEqual(compile_command("a = 1\n", "abc").co_filename,
+                         compile("a = 1\n", "abc", 'single').co_filename)
+        self.assertNotEqual(compile_command("a = 1\n", "abc").co_filename,
+                            compile("a = 1\n", "def", 'single').co_filename)
 
 
 def test_main():

diff --git a/lib-python/2.7.0/distutils/tests/test_dep_util.py b/lib-python/2.7.0/distutils/tests/test_dep_util.py
--- a/lib-python/2.7.0/distutils/tests/test_dep_util.py
+++ b/lib-python/2.7.0/distutils/tests/test_dep_util.py
@@ -42,8 +42,8 @@
         self.write_file(two)
         self.write_file(four)
 
-        self.assertEquals(newer_pairwise([one, two], [three, four]),
-                          ([one],[three]))
+        self.assertEqual(newer_pairwise([one, two], [three, four]),
+                         ([one],[three]))
 
     def test_newer_group(self):
         tmpdir = self.mkdtemp()

diff --git a/lib-python/2.7.0/json/tests/test_encode_basestring_ascii.py b/lib-python/2.7.0/json/tests/test_encode_basestring_ascii.py
--- a/lib-python/2.7.0/json/tests/test_encode_basestring_ascii.py
+++ b/lib-python/2.7.0/json/tests/test_encode_basestring_ascii.py
@@ -36,7 +36,7 @@
         fname = encode_basestring_ascii.__name__
         for input_string, expect in CASES:
             result = encode_basestring_ascii(input_string)
-            self.assertEquals(result, expect,
+            self.assertEqual(result, expect,
                 '{0!r} != {1!r} for {2}({3!r})'.format(
                     result, expect, fname, input_string))
 

diff --git a/lib-python/2.7.0/test/test_htmllib.py b/lib-python/2.7.0/test/test_htmllib.py
--- a/lib-python/2.7.0/test/test_htmllib.py
+++ b/lib-python/2.7.0/test/test_htmllib.py
@@ -38,11 +38,11 @@
             <a name='frob'> </a>
             """)
         parser.close()
-        self.assertEquals(parser.get_anchor_info(),
-                          [('http://foo.org/', 'splat', ''),
-                           ('http://www.python.org/', '', ''),
-                           ('', 'frob', ''),
-                           ])
+        self.assertEqual(parser.get_anchor_info(),
+                         [('http://foo.org/', 'splat', ''),
+                          ('http://www.python.org/', '', ''),
+                          ('', 'frob', ''),
+                          ])
 
     def test_decl_collection(self):
         # See SF patch #545300
@@ -56,10 +56,10 @@
             </html>
             """)
         parser.close()
-        self.assertEquals(parser.get_decl_info(),
-                          ["if !supportEmptyParas",
-                           "endif"
-                           ])
+        self.assertEqual(parser.get_decl_info(),
+                         ["if !supportEmptyParas",
+                          "endif"
+                          ])
 
 def test_main():
     test_support.run_unittest(HTMLParserTestCase)

diff --git a/lib-python/2.7.0/distutils/cygwinccompiler.py b/lib-python/2.7.0/distutils/cygwinccompiler.py
--- a/lib-python/2.7.0/distutils/cygwinccompiler.py
+++ b/lib-python/2.7.0/distutils/cygwinccompiler.py
@@ -47,7 +47,7 @@
 
 # This module should be kept compatible with Python 2.1.
 
-__revision__ = "$Id: cygwinccompiler.py 78666 2010-03-05 00:16:02Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os,sys,copy
 from distutils.ccompiler import gen_preprocess_options, gen_lib_options
@@ -382,8 +382,10 @@
         # It would probably better to read single lines to search.
         # But we do this only once, and it is fast enough
         f = open(fn)
-        s = f.read()
-        f.close()
+        try:
+            s = f.read()
+        finally:
+            f.close()
 
     except IOError, exc:
         # if we can't read this file, we cannot say it is wrong

diff --git a/lib-python/2.7.0/test/test_pow.py b/lib-python/2.7.0/test/test_pow.py
--- a/lib-python/2.7.0/test/test_pow.py
+++ b/lib-python/2.7.0/test/test_pow.py
@@ -5,17 +5,17 @@
     def powtest(self, type):
         if type != float:
             for i in range(-1000, 1000):
-                self.assertEquals(pow(type(i), 0), 1)
-                self.assertEquals(pow(type(i), 1), type(i))
-                self.assertEquals(pow(type(0), 1), type(0))
-                self.assertEquals(pow(type(1), 1), type(1))
+                self.assertEqual(pow(type(i), 0), 1)
+                self.assertEqual(pow(type(i), 1), type(i))
+                self.assertEqual(pow(type(0), 1), type(0))
+                self.assertEqual(pow(type(1), 1), type(1))
 
             for i in range(-100, 100):
-                self.assertEquals(pow(type(i), 3), i*i*i)
+                self.assertEqual(pow(type(i), 3), i*i*i)
 
             pow2 = 1
             for i in range(0,31):
-                self.assertEquals(pow(2, i), pow2)
+                self.assertEqual(pow(2, i), pow2)
                 if i != 30 : pow2 = pow2*2
 
             for othertype in int, long:
@@ -67,30 +67,30 @@
 
     def test_other(self):
         # Other tests-- not very systematic
-        self.assertEquals(pow(3,3) % 8, pow(3,3,8))
-        self.assertEquals(pow(3,3) % -8, pow(3,3,-8))
-        self.assertEquals(pow(3,2) % -2, pow(3,2,-2))
-        self.assertEquals(pow(-3,3) % 8, pow(-3,3,8))
-        self.assertEquals(pow(-3,3) % -8, pow(-3,3,-8))
-        self.assertEquals(pow(5,2) % -8, pow(5,2,-8))
+        self.assertEqual(pow(3,3) % 8, pow(3,3,8))
+        self.assertEqual(pow(3,3) % -8, pow(3,3,-8))
+        self.assertEqual(pow(3,2) % -2, pow(3,2,-2))
+        self.assertEqual(pow(-3,3) % 8, pow(-3,3,8))
+        self.assertEqual(pow(-3,3) % -8, pow(-3,3,-8))
+        self.assertEqual(pow(5,2) % -8, pow(5,2,-8))
 
-        self.assertEquals(pow(3L,3L) % 8, pow(3L,3L,8))
-        self.assertEquals(pow(3L,3L) % -8, pow(3L,3L,-8))
-        self.assertEquals(pow(3L,2) % -2, pow(3L,2,-2))
-        self.assertEquals(pow(-3L,3L) % 8, pow(-3L,3L,8))
-        self.assertEquals(pow(-3L,3L) % -8, pow(-3L,3L,-8))
-        self.assertEquals(pow(5L,2) % -8, pow(5L,2,-8))
+        self.assertEqual(pow(3L,3L) % 8, pow(3L,3L,8))
+        self.assertEqual(pow(3L,3L) % -8, pow(3L,3L,-8))
+        self.assertEqual(pow(3L,2) % -2, pow(3L,2,-2))
+        self.assertEqual(pow(-3L,3L) % 8, pow(-3L,3L,8))
+        self.assertEqual(pow(-3L,3L) % -8, pow(-3L,3L,-8))
+        self.assertEqual(pow(5L,2) % -8, pow(5L,2,-8))
 
         for i in range(-10, 11):
             for j in range(0, 6):
                 for k in range(-7, 11):
                     if j >= 0 and k != 0:
-                        self.assertEquals(
+                        self.assertEqual(
                             pow(i,j) % k,
                             pow(i,j,k)
                         )
                     if j >= 0 and k != 0:
-                        self.assertEquals(
+                        self.assertEqual(
                             pow(long(i),j) % k,
                             pow(long(i),j,k)
                         )
@@ -104,7 +104,7 @@
     def test_bug705231(self):
         # -1.0 raised to an integer should never blow up.  It did if the
         # platform pow() was buggy, and Python didn't worm around it.
-        eq = self.assertEquals
+        eq = self.assertEqual
         a = -1.0
         # The next two tests can still fail if the platform floor()
         # function doesn't treat all large inputs as integers

diff --git a/lib-python/2.7.0/sha.py b/lib-python/2.7.0/sha.py
--- a/lib-python/2.7.0/sha.py
+++ b/lib-python/2.7.0/sha.py
@@ -1,4 +1,4 @@
-# $Id: sha.py 58064 2007-09-09 20:25:00Z gregory.p.smith $
+# $Id$
 #
 #  Copyright (C) 2005   Gregory P. Smith (greg at krypto.org)
 #  Licensed to PSF under a Contributor Agreement.

diff --git a/lib-python/2.7.0/lib-tk/Tix.py b/lib-python/2.7.0/lib-tk/Tix.py
--- a/lib-python/2.7.0/lib-tk/Tix.py
+++ b/lib-python/2.7.0/lib-tk/Tix.py
@@ -1,6 +1,6 @@
 # -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
 #
-# $Id: Tix.py 81008 2010-05-08 20:59:42Z benjamin.peterson $
+# $Id$
 #
 # Tix.py -- Tix widget wrappers.
 #

diff --git a/lib-python/2.7.0/test/test_tcl.py b/lib-python/2.7.0/test/test_tcl.py
--- a/lib-python/2.7.0/test/test_tcl.py
+++ b/lib-python/2.7.0/test/test_tcl.py
@@ -147,7 +147,7 @@
             env.unset("TCL_LIBRARY")
             f = os.popen('%s -c "import Tkinter; print Tkinter"' % (unc_name,))
 
-        self.assert_('Tkinter.py' in f.read())
+        self.assertTrue('Tkinter.py' in f.read())
         # exit code must be zero
         self.assertEqual(f.close(), None)
 

diff --git a/lib-python/2.7.0/distutils/command/register.py b/lib-python/2.7.0/distutils/command/register.py
--- a/lib-python/2.7.0/distutils/command/register.py
+++ b/lib-python/2.7.0/distutils/command/register.py
@@ -5,7 +5,7 @@
 
 # created 2002/10/21, Richard Jones
 
-__revision__ = "$Id: register.py 77717 2010-01-24 00:33:32Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import urllib2
 import getpass

diff --git a/lib-python/2.7.0/bsddb/test/test_sequence.py b/lib-python/2.7.0/bsddb/test/test_sequence.py
--- a/lib-python/2.7.0/bsddb/test/test_sequence.py
+++ b/lib-python/2.7.0/bsddb/test/test_sequence.py
@@ -37,53 +37,53 @@
         self.seq = db.DBSequence(self.d, flags=0)
         start_value = 10 * self.int_32_max
         self.assertEqual(0xA00000000, start_value)
-        self.assertEquals(None, self.seq.initial_value(start_value))
-        self.assertEquals(None, self.seq.open(key='id', txn=None, flags=db.DB_CREATE))
-        self.assertEquals(start_value, self.seq.get(5))
-        self.assertEquals(start_value + 5, self.seq.get())
+        self.assertEqual(None, self.seq.initial_value(start_value))
+        self.assertEqual(None, self.seq.open(key='id', txn=None, flags=db.DB_CREATE))
+        self.assertEqual(start_value, self.seq.get(5))
+        self.assertEqual(start_value + 5, self.seq.get())
 
     def test_remove(self):
         self.seq = db.DBSequence(self.d, flags=0)
-        self.assertEquals(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
-        self.assertEquals(None, self.seq.remove(txn=None, flags=0))
+        self.assertEqual(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
+        self.assertEqual(None, self.seq.remove(txn=None, flags=0))
         del self.seq
 
     def test_get_key(self):
         self.seq = db.DBSequence(self.d, flags=0)
         key = 'foo'
-        self.assertEquals(None, self.seq.open(key=key, txn=None, flags=db.DB_CREATE))
-        self.assertEquals(key, self.seq.get_key())
+        self.assertEqual(None, self.seq.open(key=key, txn=None, flags=db.DB_CREATE))
+        self.assertEqual(key, self.seq.get_key())
 
     def test_get_dbp(self):
         self.seq = db.DBSequence(self.d, flags=0)
-        self.assertEquals(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
-        self.assertEquals(self.d, self.seq.get_dbp())
+        self.assertEqual(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
+        self.assertEqual(self.d, self.seq.get_dbp())
 
     def test_cachesize(self):
         self.seq = db.DBSequence(self.d, flags=0)
         cashe_size = 10
-        self.assertEquals(None, self.seq.set_cachesize(cashe_size))
-        self.assertEquals(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
-        self.assertEquals(cashe_size, self.seq.get_cachesize())
+        self.assertEqual(None, self.seq.set_cachesize(cashe_size))
+        self.assertEqual(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
+        self.assertEqual(cashe_size, self.seq.get_cachesize())
 
     def test_flags(self):
         self.seq = db.DBSequence(self.d, flags=0)
         flag = db.DB_SEQ_WRAP;
-        self.assertEquals(None, self.seq.set_flags(flag))
-        self.assertEquals(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
-        self.assertEquals(flag, self.seq.get_flags() & flag)
+        self.assertEqual(None, self.seq.set_flags(flag))
+        self.assertEqual(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
+        self.assertEqual(flag, self.seq.get_flags() & flag)
 
     def test_range(self):
         self.seq = db.DBSequence(self.d, flags=0)
         seq_range = (10 * self.int_32_max, 11 * self.int_32_max - 1)
-        self.assertEquals(None, self.seq.set_range(seq_range))
+        self.assertEqual(None, self.seq.set_range(seq_range))
         self.seq.initial_value(seq_range[0])
-        self.assertEquals(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
-        self.assertEquals(seq_range, self.seq.get_range())
+        self.assertEqual(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
+        self.assertEqual(seq_range, self.seq.get_range())
 
     def test_stat(self):
         self.seq = db.DBSequence(self.d, flags=0)
-        self.assertEquals(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
+        self.assertEqual(None, self.seq.open(key='foo', txn=None, flags=db.DB_CREATE))
         stat = self.seq.stat()
         for param in ('nowait', 'min', 'max', 'value', 'current',
                       'flags', 'cache_size', 'last_value', 'wait'):
@@ -106,24 +106,24 @@
     def test_64bits(self) :
         # We don't use both extremes because they are problematic
         value_plus=(1L<<63)-2
-        self.assertEquals(9223372036854775806L,value_plus)
+        self.assertEqual(9223372036854775806L,value_plus)
         value_minus=(-1L<<63)+1  # Two complement
-        self.assertEquals(-9223372036854775807L,value_minus)
+        self.assertEqual(-9223372036854775807L,value_minus)
         self.seq = db.DBSequence(self.d, flags=0)
-        self.assertEquals(None, self.seq.initial_value(value_plus-1))
-        self.assertEquals(None, self.seq.open(key='id', txn=None,
+        self.assertEqual(None, self.seq.initial_value(value_plus-1))
+        self.assertEqual(None, self.seq.open(key='id', txn=None,
             flags=db.DB_CREATE))
-        self.assertEquals(value_plus-1, self.seq.get(1))
-        self.assertEquals(value_plus, self.seq.get(1))
+        self.assertEqual(value_plus-1, self.seq.get(1))
+        self.assertEqual(value_plus, self.seq.get(1))
 
         self.seq.remove(txn=None, flags=0)
 
         self.seq = db.DBSequence(self.d, flags=0)
-        self.assertEquals(None, self.seq.initial_value(value_minus))
-        self.assertEquals(None, self.seq.open(key='id', txn=None,
+        self.assertEqual(None, self.seq.initial_value(value_minus))
+        self.assertEqual(None, self.seq.open(key='id', txn=None,
             flags=db.DB_CREATE))
-        self.assertEquals(value_minus, self.seq.get(1))
-        self.assertEquals(value_minus+1, self.seq.get(1))
+        self.assertEqual(value_minus, self.seq.get(1))
+        self.assertEqual(value_minus+1, self.seq.get(1))
 
     def test_multiple_close(self):
         self.seq = db.DBSequence(self.d)

diff --git a/lib-python/2.7.0/email/test/test_email.py b/lib-python/2.7.0/email/test/test_email.py
--- a/lib-python/2.7.0/email/test/test_email.py
+++ b/lib-python/2.7.0/email/test/test_email.py
@@ -40,13 +40,13 @@
 SPACE = ' '
 
 
-
+
 def openfile(filename, mode='r'):
     path = os.path.join(os.path.dirname(landmark), 'data', filename)
     return open(path, mode)
 
 
-
+
 # Base test class
 class TestEmailBase(unittest.TestCase):
     def ndiffAssertEqual(self, first, second):
@@ -68,7 +68,7 @@
         return msg
 
 
-
+
 # Test various aspects of the Message class's API
 class TestMessageAPI(TestEmailBase):
     def test_get_all(self):
@@ -543,7 +543,7 @@
         self.assertEqual('us-ascii', msg.get_content_charset())
 
 
-
+
 # Test the email.Encoders module
 class TestEncoders(unittest.TestCase):
     def test_encode_empty_payload(self):
@@ -572,7 +572,7 @@
         msg = email.MIMEText.MIMEText('\xca\xb8', _charset='euc-jp')
         eq(msg['content-transfer-encoding'], '7bit')
 
-
+
 # Test long header wrapping
 class TestLongHeaders(TestEmailBase):
     def test_split_long_continuation(self):
@@ -893,7 +893,7 @@
 """)
 
 
-
+
 # Test mangling of "From " lines in the body of a message
 class TestFromMangling(unittest.TestCase):
     def setUp(self):
@@ -927,7 +927,7 @@
 """)
 
 
-
+
 # Test the basic MIMEAudio class
 class TestMIMEAudio(unittest.TestCase):
     def setUp(self):
@@ -976,7 +976,7 @@
                                   header='foobar') is missing)
 
 
-
+
 # Test the basic MIMEImage class
 class TestMIMEImage(unittest.TestCase):
     def setUp(self):
@@ -1019,7 +1019,7 @@
                                   header='foobar') is missing)
 
 
-
+
 # Test the basic MIMEText class
 class TestMIMEText(unittest.TestCase):
     def setUp(self):
@@ -1071,7 +1071,7 @@
         self.assertRaises(UnicodeEncodeError, MIMEText, teststr)
 
 
-
+
 # Test complicated multipart/* messages
 class TestMultipart(TestEmailBase):
     def setUp(self):
@@ -1447,10 +1447,10 @@
 
 YXNkZg==
 --===============0012394164==--""")
-        self.assertEquals(m.get_payload(0).get_payload(), 'YXNkZg==')
-
-
-
+        self.assertEqual(m.get_payload(0).get_payload(), 'YXNkZg==')
+
+
+
 # Test some badly formatted messages
 class TestNonConformant(TestEmailBase):
     def test_parse_missing_minor_type(self):
@@ -1565,7 +1565,7 @@
 
 
 
-
+
 # Test RFC 2047 header encoding and decoding
 class TestRFC2047(unittest.TestCase):
     def test_rfc2047_multiline(self):
@@ -1627,7 +1627,7 @@
         self.assertEqual(decode_header(s),
                         [(b'andr\xe9=zz', 'iso-8659-1')])
 
-
+
 # Test the MIMEMessage class
 class TestMIMEMessage(TestEmailBase):
     def setUp(self):
@@ -1940,7 +1940,7 @@
         msg = MIMEMultipart()
         self.assertTrue(msg.is_multipart())
 
-
+
 # A general test of parser->model->generator idempotency.  IOW, read a message
 # in, parse it into a message object tree, then without touching the tree,
 # regenerate the plain text.  The original text and the transformed text
@@ -1964,7 +1964,7 @@
         eq(text, s.getvalue())
 
     def test_parse_text_message(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         msg, text = self._msgobj('msg_01.txt')
         eq(msg.get_content_type(), 'text/plain')
         eq(msg.get_content_maintype(), 'text')
@@ -1976,7 +1976,7 @@
         self._idempotent(msg, text)
 
     def test_parse_untyped_message(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         msg, text = self._msgobj('msg_03.txt')
         eq(msg.get_content_type(), 'text/plain')
         eq(msg.get_params(), None)
@@ -2048,7 +2048,7 @@
         self._idempotent(msg, text)
 
     def test_content_type(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         unless = self.assertTrue
         # Get a message object and reset the seek pointer for other tests
         msg, text = self._msgobj('msg_05.txt')
@@ -2080,7 +2080,7 @@
         eq(msg4.get_payload(), 'Yadda yadda yadda\n')
 
     def test_parser(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         unless = self.assertTrue
         msg, text = self._msgobj('msg_06.txt')
         # Check some of the outer headers
@@ -2097,7 +2097,7 @@
         eq(msg1.get_payload(), '\n')
 
 
-
+
 # Test various other bits of the package's functionality
 class TestMiscellaneous(TestEmailBase):
     def test_message_from_string(self):
@@ -2452,7 +2452,7 @@
 """)
 
 
-
+
 # Test the iterator/generators
 class TestIterators(TestEmailBase):
     def test_body_line_iterator(self):
@@ -2545,7 +2545,7 @@
         self.assertTrue(''.join([il for il, n in imt]) == ''.join(om))
 
 
-
+
 class TestParsers(TestEmailBase):
     def test_header_parser(self):
         eq = self.assertEqual
@@ -2708,7 +2708,7 @@
         msg = email.message_from_string(m)
         self.assertTrue(msg.get_payload(0).get_payload().endswith('\r\n'))
 
-
+
 class TestBase64(unittest.TestCase):
     def test_len(self):
         eq = self.assertEqual
@@ -2780,7 +2780,7 @@
  =?iso-8859-1?b?eHh4eCB4eHh4IHh4eHgg?=""")
 
 
-
+
 class TestQuopri(unittest.TestCase):
     def setUp(self):
         self.hlit = [chr(x) for x in range(ord('a'), ord('z')+1)] + \
@@ -2890,7 +2890,7 @@
 two line""")
 
 
-
+
 # Test the Charset class
 class TestCharset(unittest.TestCase):
     def tearDown(self):
@@ -2951,7 +2951,7 @@
         charset = Charset('utf8')
         self.assertEqual(str(charset), 'utf-8')
 
-
+
 # Test multilingual MIME headers.
 class TestHeader(TestEmailBase):
     def test_simple(self):
@@ -3114,7 +3114,7 @@
         raises(Errors.HeaderParseError, decode_header, s)
 
 
-
+
 # Test RFC 2231 header parameters (en/de)coding
 class TestRFC2231(TestEmailBase):
     def test_get_param(self):
@@ -3426,7 +3426,7 @@
         eq(s, 'My Document For You')
 
 
-
+
 # Tests to ensure that signed parts of an email are completely preserved, as
 # required by RFC1847 section 2.1.  Note that these are incomplete, because the
 # email package does not currently always preserve the body.  See issue 1670765.
@@ -3462,7 +3462,7 @@
         self._signed_parts_eq(original, result)
 
 
-
+
 def _testclasses():
     mod = sys.modules[__name__]
     return [getattr(mod, name) for name in dir(mod) if name.startswith('Test')]
@@ -3480,6 +3480,6 @@
         run_unittest(testclass)
 
 
-
+
 if __name__ == '__main__':
     unittest.main(defaultTest='suite')

diff --git a/lib-python/2.7.0/distutils/spawn.py b/lib-python/2.7.0/distutils/spawn.py
--- a/lib-python/2.7.0/distutils/spawn.py
+++ b/lib-python/2.7.0/distutils/spawn.py
@@ -6,7 +6,7 @@
 executable name.
 """
 
-__revision__ = "$Id: spawn.py 73147 2009-06-02 15:58:43Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys
 import os

diff --git a/lib-python/2.7.0/sysconfig.py b/lib-python/2.7.0/sysconfig.py
--- a/lib-python/2.7.0/sysconfig.py
+++ b/lib-python/2.7.0/sysconfig.py
@@ -635,13 +635,16 @@
                 # behaviour.
                 pass
             else:
-                m = re.search(
-                        r'<key>ProductUserVisibleVersion</key>\s*' +
-                        r'<string>(.*?)</string>', f.read())
-                f.close()
-                if m is not None:
-                    macrelease = '.'.join(m.group(1).split('.')[:2])
-                # else: fall back to the default behaviour
+                try:
+                    m = re.search(
+                            r'<key>ProductUserVisibleVersion</key>\s*' +
+                            r'<string>(.*?)</string>', f.read())
+                    f.close()
+                    if m is not None:
+                        macrelease = '.'.join(m.group(1).split('.')[:2])
+                    # else: fall back to the default behaviour
+                finally:
+                    f.close()
 
         if not macver:
             macver = macrelease

diff --git a/lib-python/2.7.0/distutils/tests/test_upload.py b/lib-python/2.7.0/distutils/tests/test_upload.py
--- a/lib-python/2.7.0/distutils/tests/test_upload.py
+++ b/lib-python/2.7.0/distutils/tests/test_upload.py
@@ -80,7 +80,7 @@
         for attr, waited in (('username', 'me'), ('password', 'secret'),
                              ('realm', 'pypi'),
                              ('repository', 'http://pypi.python.org/pypi')):
-            self.assertEquals(getattr(cmd, attr), waited)
+            self.assertEqual(getattr(cmd, attr), waited)
 
     def test_saved_password(self):
         # file with no password
@@ -90,14 +90,14 @@
         dist = Distribution()
         cmd = upload(dist)
         cmd.finalize_options()
-        self.assertEquals(cmd.password, None)
+        self.assertEqual(cmd.password, None)
 
         # make sure we get it as well, if another command
         # initialized it at the dist level
         dist.password = 'xxx'
         cmd = upload(dist)
         cmd.finalize_options()
-        self.assertEquals(cmd.password, 'xxx')
+        self.assertEqual(cmd.password, 'xxx')
 
     def test_upload(self):
         tmp = self.mkdtemp()
@@ -116,11 +116,11 @@
         # what did we send ?
         self.assertIn('d&#233;d&#233;', self.last_open.req.data)
         headers = dict(self.last_open.req.headers)
-        self.assertEquals(headers['Content-length'], '2085')
+        self.assertEqual(headers['Content-length'], '2085')
         self.assertTrue(headers['Content-type'].startswith('multipart/form-data'))
-        self.assertEquals(self.last_open.req.get_method(), 'POST')
-        self.assertEquals(self.last_open.req.get_full_url(),
-                          'http://pypi.python.org/pypi')
+        self.assertEqual(self.last_open.req.get_method(), 'POST')
+        self.assertEqual(self.last_open.req.get_full_url(),
+                         'http://pypi.python.org/pypi')
         self.assertTrue('xxx' in self.last_open.req.data)
         auth = self.last_open.req.headers['Authorization']
         self.assertFalse('\n' in auth)

diff --git a/lib-python/2.7.0/json/tests/test_unicode.py b/lib-python/2.7.0/json/tests/test_unicode.py
--- a/lib-python/2.7.0/json/tests/test_unicode.py
+++ b/lib-python/2.7.0/json/tests/test_unicode.py
@@ -10,50 +10,50 @@
         s = u.encode('utf-8')
         ju = encoder.encode(u)
         js = encoder.encode(s)
-        self.assertEquals(ju, js)
+        self.assertEqual(ju, js)
 
     def test_encoding2(self):
         u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}'
         s = u.encode('utf-8')
         ju = json.dumps(u, encoding='utf-8')
         js = json.dumps(s, encoding='utf-8')
-        self.assertEquals(ju, js)
+        self.assertEqual(ju, js)
 
     def test_encoding3(self):
         u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}'
         j = json.dumps(u)
-        self.assertEquals(j, '"\\u03b1\\u03a9"')
+        self.assertEqual(j, '"\\u03b1\\u03a9"')
 
     def test_encoding4(self):
         u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}'
         j = json.dumps([u])
-        self.assertEquals(j, '["\\u03b1\\u03a9"]')
+        self.assertEqual(j, '["\\u03b1\\u03a9"]')
 
     def test_encoding5(self):
         u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}'
         j = json.dumps(u, ensure_ascii=False)
-        self.assertEquals(j, u'"{0}"'.format(u))
+        self.assertEqual(j, u'"{0}"'.format(u))
 
     def test_encoding6(self):
         u = u'\N{GREEK SMALL LETTER ALPHA}\N{GREEK CAPITAL LETTER OMEGA}'
         j = json.dumps([u], ensure_ascii=False)
-        self.assertEquals(j, u'["{0}"]'.format(u))
+        self.assertEqual(j, u'["{0}"]'.format(u))
 
     def test_big_unicode_encode(self):
         u = u'\U0001d120'
-        self.assertEquals(json.dumps(u), '"\\ud834\\udd20"')
-        self.assertEquals(json.dumps(u, ensure_ascii=False), u'"\U0001d120"')
+        self.assertEqual(json.dumps(u), '"\\ud834\\udd20"')
+        self.assertEqual(json.dumps(u, ensure_ascii=False), u'"\U0001d120"')
 
     def test_big_unicode_decode(self):
         u = u'z\U0001d120x'
-        self.assertEquals(json.loads('"' + u + '"'), u)
-        self.assertEquals(json.loads('"z\\ud834\\udd20x"'), u)
+        self.assertEqual(json.loads('"' + u + '"'), u)
+        self.assertEqual(json.loads('"z\\ud834\\udd20x"'), u)
 
     def test_unicode_decode(self):
         for i in range(0, 0xd7ff):
             u = unichr(i)
             s = '"\\u{0:04x}"'.format(i)
-            self.assertEquals(json.loads(s), u)
+            self.assertEqual(json.loads(s), u)
 
     def test_object_pairs_hook_with_unicode(self):
         s = u'{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}'
@@ -71,12 +71,12 @@
                          OrderedDict(p))
 
     def test_default_encoding(self):
-        self.assertEquals(json.loads(u'{"a": "\xe9"}'.encode('utf-8')),
+        self.assertEqual(json.loads(u'{"a": "\xe9"}'.encode('utf-8')),
             {'a': u'\xe9'})
 
     def test_unicode_preservation(self):
-        self.assertEquals(type(json.loads(u'""')), unicode)
-        self.assertEquals(type(json.loads(u'"a"')), unicode)
-        self.assertEquals(type(json.loads(u'["a"]')[0]), unicode)
+        self.assertEqual(type(json.loads(u'""')), unicode)
+        self.assertEqual(type(json.loads(u'"a"')), unicode)
+        self.assertEqual(type(json.loads(u'["a"]')[0]), unicode)
         # Issue 10038.
-        self.assertEquals(type(json.loads('"foo"')), unicode)
+        self.assertEqual(type(json.loads('"foo"')), unicode)

diff --git a/lib-python/2.7.0/test/test_coercion.py b/lib-python/2.7.0/test/test_coercion.py
--- a/lib-python/2.7.0/test/test_coercion.py
+++ b/lib-python/2.7.0/test/test_coercion.py
@@ -266,9 +266,9 @@
                         self.assertRaises(TypeError, eval,
                                           'a %s b' % op, {'a': a, 'b': b})
                     else:
-                        self.assertEquals(format_result(res),
-                                          format_result(eval('a %s b' % op)),
-                                          '%s %s %s == %s failed' % (a, op, b, res))
+                        self.assertEqual(format_result(res),
+                                         format_result(eval('a %s b' % op)),
+                                         '%s %s %s == %s failed' % (a, op, b, res))
                     try:
                         z = copy.copy(a)
                     except copy.Error:
@@ -282,7 +282,7 @@
                             self.fail("TypeError not raised")
                     else:
                         exec('z %s= b' % op)
-                        self.assertEquals(ires, z)
+                        self.assertEqual(ires, z)
 
     def test_prefix_binops(self):
         for ia, a in enumerate(candidates):
@@ -293,9 +293,9 @@
                         self.assertRaises(TypeError, eval,
                                           '%s(a, b)' % op, {'a': a, 'b': b})
                     else:
-                        self.assertEquals(format_result(res),
-                                          format_result(eval('%s(a, b)' % op)),
-                                          '%s(%s, %s) == %s failed' % (op, a, b, res))
+                        self.assertEqual(format_result(res),
+                                         format_result(eval('%s(a, b)' % op)),
+                                         '%s(%s, %s) == %s failed' % (op, a, b, res))
 
     def test_cmptypes(self):
         # Built-in tp_compare slots expect their arguments to have the
@@ -303,21 +303,21 @@
         # SF #980352
         evil_coercer = CoerceTo(42)
         # Make sure these don't crash any more
-        self.assertNotEquals(cmp(u'fish', evil_coercer), 0)
-        self.assertNotEquals(cmp(slice(1), evil_coercer), 0)
+        self.assertNotEqual(cmp(u'fish', evil_coercer), 0)
+        self.assertNotEqual(cmp(slice(1), evil_coercer), 0)
         # ...but that this still works
         class WackyComparer(object):
             def __cmp__(slf, other):
                 self.assertTrue(other == 42, 'expected evil_coercer, got %r' % other)
                 return 0
             __hash__ = None # Invalid cmp makes this unhashable
-        self.assertEquals(cmp(WackyComparer(), evil_coercer), 0)
+        self.assertEqual(cmp(WackyComparer(), evil_coercer), 0)
         # ...and classic classes too, since that code path is a little different
         class ClassicWackyComparer:
             def __cmp__(slf, other):
                 self.assertTrue(other == 42, 'expected evil_coercer, got %r' % other)
                 return 0
-        self.assertEquals(cmp(ClassicWackyComparer(), evil_coercer), 0)
+        self.assertEqual(cmp(ClassicWackyComparer(), evil_coercer), 0)
 
     def test_infinite_rec_classic_classes(self):
         # if __coerce__() returns its arguments reversed it causes an infinite

diff --git a/lib-python/2.7.0/test/test_file.py b/lib-python/2.7.0/test/test_file.py
--- a/lib-python/2.7.0/test/test_file.py
+++ b/lib-python/2.7.0/test/test_file.py
@@ -30,7 +30,7 @@
         # verify weak references
         p = proxy(self.f)
         p.write(b'teststring')
-        self.assertEquals(self.f.tell(), p.tell())
+        self.assertEqual(self.f.tell(), p.tell())
         self.f.close()
         self.f = None
         self.assertRaises(ReferenceError, getattr, p, 'tell')
@@ -49,7 +49,7 @@
         a = array('b', b'x'*10)
         self.f = self.open(TESTFN, 'rb')
         n = self.f.readinto(a)
-        self.assertEquals(b'12', a.tostring()[:n])
+        self.assertEqual(b'12', a.tostring()[:n])
 
     def testReadinto_text(self):
         # verify readinto refuses text files
@@ -66,7 +66,7 @@
         self.f.close()
         self.f = self.open(TESTFN, 'rb')
         buf = self.f.read()
-        self.assertEquals(buf, b'12')
+        self.assertEqual(buf, b'12')
 
     def testWritelinesIntegers(self):
         # verify writelines with integers
@@ -87,7 +87,7 @@
 
     def testErrors(self):
         f = self.f
-        self.assertEquals(f.name, TESTFN)
+        self.assertEqual(f.name, TESTFN)
         self.assertTrue(not f.isatty())
         self.assertTrue(not f.closed)
 
@@ -124,12 +124,12 @@
             self.assertRaises(ValueError, method, *args)
 
         # file is closed, __exit__ shouldn't do anything
-        self.assertEquals(self.f.__exit__(None, None, None), None)
+        self.assertEqual(self.f.__exit__(None, None, None), None)
         # it must also return None if an exception was given
         try:
             1 // 0
         except:
-            self.assertEquals(self.f.__exit__(*sys.exc_info()), None)
+            self.assertEqual(self.f.__exit__(*sys.exc_info()), None)
 
     def testReadWhenWriting(self):
         self.assertRaises(IOError, self.f.read)
@@ -195,7 +195,7 @@
                 f.close()
             except IOError as msg:
                 self.fail('error setting buffer size %d: %s' % (s, str(msg)))
-            self.assertEquals(d, s)
+            self.assertEqual(d, s)
 
     def testTruncateOnWindows(self):
         # SF bug <http://www.python.org/sf/801631>

diff --git a/lib-python/2.7.0/distutils/tests/test_archive_util.py b/lib-python/2.7.0/distutils/tests/test_archive_util.py
--- a/lib-python/2.7.0/distutils/tests/test_archive_util.py
+++ b/lib-python/2.7.0/distutils/tests/test_archive_util.py
@@ -1,5 +1,5 @@
 """Tests for distutils.archive_util."""
-__revision__ = "$Id: test_archive_util.py 75659 2009-10-24 13:29:44Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import unittest
 import os
@@ -129,7 +129,7 @@
 
         self.assertTrue(os.path.exists(tarball2))
         # let's compare both tarballs
-        self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2))
+        self.assertEqual(self._tarinfo(tarball), self._tarinfo(tarball2))
 
         # trying an uncompressed one
         base_name = os.path.join(tmpdir2, 'archive')
@@ -169,7 +169,7 @@
             os.chdir(old_dir)
         tarball = base_name + '.tar.Z'
         self.assertTrue(os.path.exists(tarball))
-        self.assertEquals(len(w.warnings), 1)
+        self.assertEqual(len(w.warnings), 1)
 
         # same test with dry_run
         os.remove(tarball)
@@ -183,7 +183,7 @@
         finally:
             os.chdir(old_dir)
         self.assertTrue(not os.path.exists(tarball))
-        self.assertEquals(len(w.warnings), 1)
+        self.assertEqual(len(w.warnings), 1)
 
     @unittest.skipUnless(zlib, "Requires zlib")
     @unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run')
@@ -201,9 +201,9 @@
         tarball = base_name + '.zip'
 
     def test_check_archive_formats(self):
-        self.assertEquals(check_archive_formats(['gztar', 'xxx', 'zip']),
-                          'xxx')
-        self.assertEquals(check_archive_formats(['gztar', 'zip']), None)
+        self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']),
+                         'xxx')
+        self.assertEqual(check_archive_formats(['gztar', 'zip']), None)
 
     def test_make_archive(self):
         tmpdir = self.mkdtemp()
@@ -258,8 +258,8 @@
         archive = tarfile.open(archive_name)
         try:
             for member in archive.getmembers():
-                self.assertEquals(member.uid, 0)
-                self.assertEquals(member.gid, 0)
+                self.assertEqual(member.uid, 0)
+                self.assertEqual(member.gid, 0)
         finally:
             archive.close()
 
@@ -273,7 +273,7 @@
                 make_archive('xxx', 'xxx', root_dir=self.mkdtemp())
             except:
                 pass
-            self.assertEquals(os.getcwd(), current_dir)
+            self.assertEqual(os.getcwd(), current_dir)
         finally:
             del ARCHIVE_FORMATS['xxx']
 

diff --git a/lib-python/2.7.0/test/test_inspect.py b/lib-python/2.7.0/test/test_inspect.py
--- a/lib-python/2.7.0/test/test_inspect.py
+++ b/lib-python/2.7.0/test/test_inspect.py
@@ -384,8 +384,8 @@
         self.assertRaises(IOError, inspect.findsource, co)
         self.assertRaises(IOError, inspect.getsource, co)
         linecache.cache[co.co_filename] = (1, None, lines, co.co_filename)
-        self.assertEquals(inspect.findsource(co), (lines,0))
-        self.assertEquals(inspect.getsource(co), lines[0])
+        self.assertEqual(inspect.findsource(co), (lines,0))
+        self.assertEqual(inspect.getsource(co), lines[0])
 
 # Helper for testing classify_class_attrs.
 def attrs_wo_objs(cls):

diff --git a/lib-python/2.7.0/distutils/ccompiler.py b/lib-python/2.7.0/distutils/ccompiler.py
--- a/lib-python/2.7.0/distutils/ccompiler.py
+++ b/lib-python/2.7.0/distutils/ccompiler.py
@@ -3,7 +3,7 @@
 Contains CCompiler, an abstract base class that defines the interface
 for the Distutils compiler abstraction model."""
 
-__revision__ = "$Id: ccompiler.py 77704 2010-01-23 09:23:15Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys
 import os
@@ -794,14 +794,16 @@
             library_dirs = []
         fd, fname = tempfile.mkstemp(".c", funcname, text=True)
         f = os.fdopen(fd, "w")
-        for incl in includes:
-            f.write("""#include "%s"\n""" % incl)
-        f.write("""\
+        try:
+            for incl in includes:
+                f.write("""#include "%s"\n""" % incl)
+            f.write("""\
 main (int argc, char **argv) {
     %s();
 }
 """ % funcname)
-        f.close()
+        finally:
+            f.close()
         try:
             objects = self.compile([fname], include_dirs=include_dirs)
         except CompileError:

diff --git a/lib-python/2.7.0/test/test_multiprocessing.py b/lib-python/2.7.0/test/test_multiprocessing.py
--- a/lib-python/2.7.0/test/test_multiprocessing.py
+++ b/lib-python/2.7.0/test/test_multiprocessing.py
@@ -183,30 +183,30 @@
         current = self.current_process()
 
         if self.TYPE != 'threads':
-            self.assertEquals(p.authkey, current.authkey)
-        self.assertEquals(p.is_alive(), False)
-        self.assertEquals(p.daemon, True)
+            self.assertEqual(p.authkey, current.authkey)
+        self.assertEqual(p.is_alive(), False)
+        self.assertEqual(p.daemon, True)
         self.assertNotIn(p, self.active_children())
         self.assertTrue(type(self.active_children()) is list)
         self.assertEqual(p.exitcode, None)
 
         p.start()
 
-        self.assertEquals(p.exitcode, None)
-        self.assertEquals(p.is_alive(), True)
+        self.assertEqual(p.exitcode, None)
+        self.assertEqual(p.is_alive(), True)
         self.assertIn(p, self.active_children())
 
-        self.assertEquals(q.get(), args[1:])
-        self.assertEquals(q.get(), kwargs)
-        self.assertEquals(q.get(), p.name)
+        self.assertEqual(q.get(), args[1:])
+        self.assertEqual(q.get(), kwargs)
+        self.assertEqual(q.get(), p.name)
         if self.TYPE != 'threads':
-            self.assertEquals(q.get(), current.authkey)
-            self.assertEquals(q.get(), p.pid)
+            self.assertEqual(q.get(), current.authkey)
+            self.assertEqual(q.get(), p.pid)
 
         p.join()
 
-        self.assertEquals(p.exitcode, 0)
-        self.assertEquals(p.is_alive(), False)
+        self.assertEqual(p.exitcode, 0)
+        self.assertEqual(p.is_alive(), False)
         self.assertNotIn(p, self.active_children())
 
     @classmethod
@@ -812,8 +812,6 @@
 #
 #
 
- at unittest.skipUnless(HAS_SHAREDCTYPES,
-                     "requires multiprocessing.sharedctypes")
 class _TestValue(BaseTestCase):
 
     ALLOWED_TYPES = ('processes',)
@@ -825,6 +823,10 @@
         ('c', latin('x'), latin('y'))
         ]
 
+    def setUp(self):
+        if not HAS_SHAREDCTYPES:
+            self.skipTest("requires multiprocessing.sharedctypes")
+
     @classmethod
     def _test(cls, values):
         for sv, cv in zip(values, cls.codes_values):
@@ -1614,12 +1616,14 @@
         ('y', c_double)
         ]
 
- at unittest.skipUnless(HAS_SHAREDCTYPES,
-                     "requires multiprocessing.sharedctypes")
 class _TestSharedCTypes(BaseTestCase):
 
     ALLOWED_TYPES = ('processes',)
 
+    def setUp(self):
+        if not HAS_SHAREDCTYPES:
+            self.skipTest("requires multiprocessing.sharedctypes")
+
     @classmethod
     def _double(cls, x, y, foo, arr, string):
         x.value *= 2

diff --git a/lib-python/2.7.0/test/test_unicodedata.py b/lib-python/2.7.0/test/test_unicodedata.py
--- a/lib-python/2.7.0/test/test_unicodedata.py
+++ b/lib-python/2.7.0/test/test_unicodedata.py
@@ -252,7 +252,7 @@
         self.assertTrue(count >= 10) # should have tested at least the ASCII digits
 
     def test_bug_1704793(self):
-        self.assertEquals(self.db.lookup("GOTHIC LETTER FAIHU"), u'\U00010346')
+        self.assertEqual(self.db.lookup("GOTHIC LETTER FAIHU"), u'\U00010346')
 
     def test_ucd_510(self):
         import unicodedata

diff --git a/lib-python/2.7.0/ctypes/test/test_keeprefs.py b/lib-python/2.7.0/ctypes/test/test_keeprefs.py
--- a/lib-python/2.7.0/ctypes/test/test_keeprefs.py
+++ b/lib-python/2.7.0/ctypes/test/test_keeprefs.py
@@ -4,19 +4,19 @@
 class SimpleTestCase(unittest.TestCase):
     def test_cint(self):
         x = c_int()
-        self.assertEquals(x._objects, None)
+        self.assertEqual(x._objects, None)
         x.value = 42
-        self.assertEquals(x._objects, None)
+        self.assertEqual(x._objects, None)
         x = c_int(99)
-        self.assertEquals(x._objects, None)
+        self.assertEqual(x._objects, None)
 
     def test_ccharp(self):
         x = c_char_p()
-        self.assertEquals(x._objects, None)
+        self.assertEqual(x._objects, None)
         x.value = "abc"
-        self.assertEquals(x._objects, "abc")
+        self.assertEqual(x._objects, "abc")
         x = c_char_p("spam")
-        self.assertEquals(x._objects, "spam")
+        self.assertEqual(x._objects, "spam")
 
 class StructureTestCase(unittest.TestCase):
     def test_cint_struct(self):
@@ -25,21 +25,21 @@
                         ("b", c_int)]
 
         x = X()
-        self.assertEquals(x._objects, None)
+        self.assertEqual(x._objects, None)
         x.a = 42
         x.b = 99
-        self.assertEquals(x._objects, None)
+        self.assertEqual(x._objects, None)
 
     def test_ccharp_struct(self):
         class X(Structure):
             _fields_ = [("a", c_char_p),
                         ("b", c_char_p)]
         x = X()
-        self.assertEquals(x._objects, None)
+        self.assertEqual(x._objects, None)
 
         x.a = "spam"
         x.b = "foo"
-        self.assertEquals(x._objects, {"0": "spam", "1": "foo"})
+        self.assertEqual(x._objects, {"0": "spam", "1": "foo"})
 
     def test_struct_struct(self):
         class POINT(Structure):
@@ -52,28 +52,28 @@
         r.ul.y = 1
         r.lr.x = 2
         r.lr.y = 3
-        self.assertEquals(r._objects, None)
+        self.assertEqual(r._objects, None)
 
         r = RECT()
         pt = POINT(1, 2)
         r.ul = pt
-        self.assertEquals(r._objects, {'0': {}})
+        self.assertEqual(r._objects, {'0': {}})
         r.ul.x = 22
         r.ul.y = 44
-        self.assertEquals(r._objects, {'0': {}})
+        self.assertEqual(r._objects, {'0': {}})
         r.lr = POINT()
-        self.assertEquals(r._objects, {'0': {}, '1': {}})
+        self.assertEqual(r._objects, {'0': {}, '1': {}})
 
 class ArrayTestCase(unittest.TestCase):
     def test_cint_array(self):
         INTARR = c_int * 3
 
         ia = INTARR()
-        self.assertEquals(ia._objects, None)
+        self.assertEqual(ia._objects, None)
         ia[0] = 1
         ia[1] = 2
         ia[2] = 3
-        self.assertEquals(ia._objects, None)
+        self.assertEqual(ia._objects, None)
 
         class X(Structure):
             _fields_ = [("x", c_int),
@@ -83,9 +83,9 @@
         x.x = 1000
         x.a[0] = 42
         x.a[1] = 96
-        self.assertEquals(x._objects, None)
+        self.assertEqual(x._objects, None)
         x.a = ia
-        self.assertEquals(x._objects, {'1': {}})
+        self.assertEqual(x._objects, {'1': {}})
 
 class PointerTestCase(unittest.TestCase):
     def test_p_cint(self):

diff --git a/lib-python/2.7.0/distutils/tests/test_dist.py b/lib-python/2.7.0/distutils/tests/test_dist.py
--- a/lib-python/2.7.0/distutils/tests/test_dist.py
+++ b/lib-python/2.7.0/distutils/tests/test_dist.py
@@ -70,13 +70,13 @@
         with captured_stdout() as stdout:
             self.create_distribution(files)
         stdout.seek(0)
-        self.assertEquals(stdout.read(), '')
+        self.assertEqual(stdout.read(), '')
         distutils.dist.DEBUG = True
         try:
             with captured_stdout() as stdout:
                 self.create_distribution(files)
             stdout.seek(0)
-            self.assertEquals(stdout.read(), '')
+            self.assertEqual(stdout.read(), '')
         finally:
             distutils.dist.DEBUG = False
 
@@ -102,29 +102,29 @@
 
     def test_command_packages_configfile(self):
         sys.argv.append("build")
+        self.addCleanup(os.unlink, TESTFN)
         f = open(TESTFN, "w")
         try:
             print >>f, "[global]"
             print >>f, "command_packages = foo.bar, splat"
+        finally:
             f.close()
-            d = self.create_distribution([TESTFN])
-            self.assertEqual(d.get_command_packages(),
-                             ["distutils.command", "foo.bar", "splat"])
 
-            # ensure command line overrides config:
-            sys.argv[1:] = ["--command-packages", "spork", "build"]
-            d = self.create_distribution([TESTFN])
-            self.assertEqual(d.get_command_packages(),
-                             ["distutils.command", "spork"])
+        d = self.create_distribution([TESTFN])
+        self.assertEqual(d.get_command_packages(),
+                         ["distutils.command", "foo.bar", "splat"])
 
-            # Setting --command-packages to '' should cause the default to
-            # be used even if a config file specified something else:
-            sys.argv[1:] = ["--command-packages", "", "build"]
-            d = self.create_distribution([TESTFN])
-            self.assertEqual(d.get_command_packages(), ["distutils.command"])
+        # ensure command line overrides config:
+        sys.argv[1:] = ["--command-packages", "spork", "build"]
+        d = self.create_distribution([TESTFN])
+        self.assertEqual(d.get_command_packages(),
+                         ["distutils.command", "spork"])
 
-        finally:
-            os.unlink(TESTFN)
+        # Setting --command-packages to '' should cause the default to
+        # be used even if a config file specified something else:
+        sys.argv[1:] = ["--command-packages", "", "build"]
+        d = self.create_distribution([TESTFN])
+        self.assertEqual(d.get_command_packages(), ["distutils.command"])
 
     def test_write_pkg_file(self):
         # Check DistributionMetadata handling of Unicode fields
@@ -175,7 +175,7 @@
         finally:
             warnings.warn = old_warn
 
-        self.assertEquals(len(warns), 0)
+        self.assertEqual(len(warns), 0)
 
     def test_finalize_options(self):
 
@@ -186,20 +186,20 @@
         dist.finalize_options()
 
         # finalize_option splits platforms and keywords
-        self.assertEquals(dist.metadata.platforms, ['one', 'two'])
-        self.assertEquals(dist.metadata.keywords, ['one', 'two'])
+        self.assertEqual(dist.metadata.platforms, ['one', 'two'])
+        self.assertEqual(dist.metadata.keywords, ['one', 'two'])
 
     def test_get_command_packages(self):
         dist = Distribution()
-        self.assertEquals(dist.command_packages, None)
+        self.assertEqual(dist.command_packages, None)
         cmds = dist.get_command_packages()
-        self.assertEquals(cmds, ['distutils.command'])
-        self.assertEquals(dist.command_packages,
-                          ['distutils.command'])
+        self.assertEqual(cmds, ['distutils.command'])
+        self.assertEqual(dist.command_packages,
+                         ['distutils.command'])
 
         dist.command_packages = 'one,two'
         cmds = dist.get_command_packages()
-        self.assertEquals(cmds, ['distutils.command', 'one', 'two'])
+        self.assertEqual(cmds, ['distutils.command', 'one', 'two'])
 
 
     def test_announce(self):
@@ -236,7 +236,7 @@
             os.path.expanduser = old_expander
 
         # make sure --no-user-cfg disables the user cfg file
-        self.assertEquals(len(all_files)-1, len(files))
+        self.assertEqual(len(all_files)-1, len(files))
 
 
 class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
@@ -341,8 +341,10 @@
         temp_dir = self.mkdtemp()
         user_filename = os.path.join(temp_dir, user_filename)
         f = open(user_filename, 'w')
-        f.write('.')
-        f.close()
+        try:
+            f.write('.')
+        finally:
+            f.close()
 
         try:
             dist = Distribution()
@@ -366,8 +368,8 @@
     def test_fix_help_options(self):
         help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)]
         fancy_options = fix_help_options(help_tuples)
-        self.assertEquals(fancy_options[0], ('a', 'b', 'c'))
-        self.assertEquals(fancy_options[1], (1, 2, 3))
+        self.assertEqual(fancy_options[0], ('a', 'b', 'c'))
+        self.assertEqual(fancy_options[1], (1, 2, 3))
 
     def test_show_help(self):
         # smoke test, just makes sure some help is displayed
@@ -415,14 +417,14 @@
         PKG_INFO.seek(0)
         metadata.read_pkg_file(PKG_INFO)
 
-        self.assertEquals(metadata.name, "package")
-        self.assertEquals(metadata.version, "1.0")
-        self.assertEquals(metadata.description, "xxx")
-        self.assertEquals(metadata.download_url, 'http://example.com')
-        self.assertEquals(metadata.keywords, ['one', 'two'])
-        self.assertEquals(metadata.platforms, ['UNKNOWN'])
-        self.assertEquals(metadata.obsoletes, None)
-        self.assertEquals(metadata.requires, ['foo'])
+        self.assertEqual(metadata.name, "package")
+        self.assertEqual(metadata.version, "1.0")
+        self.assertEqual(metadata.description, "xxx")
+        self.assertEqual(metadata.download_url, 'http://example.com')
+        self.assertEqual(metadata.keywords, ['one', 'two'])
+        self.assertEqual(metadata.platforms, ['UNKNOWN'])
+        self.assertEqual(metadata.obsoletes, None)
+        self.assertEqual(metadata.requires, ['foo'])
 
 def test_suite():
     suite = unittest.TestSuite()

diff --git a/lib-python/2.7.0/distutils/command/install_lib.py b/lib-python/2.7.0/distutils/command/install_lib.py
--- a/lib-python/2.7.0/distutils/command/install_lib.py
+++ b/lib-python/2.7.0/distutils/command/install_lib.py
@@ -3,7 +3,7 @@
 Implements the Distutils 'install_lib' command
 (install all Python modules)."""
 
-__revision__ = "$Id: install_lib.py 75671 2009-10-24 15:51:30Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 import sys

diff --git a/lib-python/2.7.0/sqlite3/test/dbapi.py b/lib-python/2.7.0/sqlite3/test/dbapi.py
--- a/lib-python/2.7.0/sqlite3/test/dbapi.py
+++ b/lib-python/2.7.0/sqlite3/test/dbapi.py
@@ -44,8 +44,8 @@
                          sqlite.paramstyle)
 
     def CheckWarning(self):
-        self.assert_(issubclass(sqlite.Warning, StandardError),
-                     "Warning is not a subclass of StandardError")
+        self.assertTrue(issubclass(sqlite.Warning, StandardError),
+                        "Warning is not a subclass of StandardError")
 
     def CheckError(self):
         self.assertTrue(issubclass(sqlite.Error, StandardError),

diff --git a/lib-python/2.7.0/test/test_linuxaudiodev.py b/lib-python/2.7.0/test/test_linuxaudiodev.py
--- a/lib-python/2.7.0/test/test_linuxaudiodev.py
+++ b/lib-python/2.7.0/test/test_linuxaudiodev.py
@@ -61,29 +61,29 @@
         try:
             self.dev.setparameters(-1, size, nchannels, fmt)
         except ValueError, err:
-            self.assertEquals(err.args[0], "expected rate >= 0, not -1")
+            self.assertEqual(err.args[0], "expected rate >= 0, not -1")
         try:
             self.dev.setparameters(rate, -2, nchannels, fmt)
         except ValueError, err:
-            self.assertEquals(err.args[0], "expected sample size >= 0, not -2")
+            self.assertEqual(err.args[0], "expected sample size >= 0, not -2")
         try:
             self.dev.setparameters(rate, size, 3, fmt)
         except ValueError, err:
-            self.assertEquals(err.args[0], "nchannels must be 1 or 2, not 3")
+            self.assertEqual(err.args[0], "nchannels must be 1 or 2, not 3")
         try:
             self.dev.setparameters(rate, size, nchannels, 177)
         except ValueError, err:
-            self.assertEquals(err.args[0], "unknown audio encoding: 177")
+            self.assertEqual(err.args[0], "unknown audio encoding: 177")
         try:
             self.dev.setparameters(rate, size, nchannels, linuxaudiodev.AFMT_U16_LE)
         except ValueError, err:
-            self.assertEquals(err.args[0], "for linear unsigned 16-bit little-endian "
-                              "audio, expected sample size 16, not 8")
+            self.assertEqual(err.args[0], "for linear unsigned 16-bit little-endian "
+                             "audio, expected sample size 16, not 8")
         try:
             self.dev.setparameters(rate, 16, nchannels, fmt)
         except ValueError, err:
-            self.assertEquals(err.args[0], "for linear unsigned 8-bit audio, expected "
-                              "sample size 8, not 16")
+            self.assertEqual(err.args[0], "for linear unsigned 8-bit audio, expected "
+                             "sample size 8, not 16")
 
 def test_main():
     try:

diff --git a/lib-python/2.7.0/test/test_socket.py b/lib-python/2.7.0/test/test_socket.py
--- a/lib-python/2.7.0/test/test_socket.py
+++ b/lib-python/2.7.0/test/test_socket.py
@@ -425,8 +425,8 @@
             return  # No inet_aton, nothing to check
         # Test that issue1008086 and issue767150 are fixed.
         # It must return 4 bytes.
-        self.assertEquals('\x00'*4, socket.inet_aton('0.0.0.0'))
-        self.assertEquals('\xff'*4, socket.inet_aton('255.255.255.255'))
+        self.assertEqual('\x00'*4, socket.inet_aton('0.0.0.0'))
+        self.assertEqual('\xff'*4, socket.inet_aton('255.255.255.255'))
 
     def testIPv4toString(self):
         if not hasattr(socket, 'inet_pton'):
@@ -434,16 +434,16 @@
         from socket import inet_aton as f, inet_pton, AF_INET
         g = lambda a: inet_pton(AF_INET, a)
 
-        self.assertEquals('\x00\x00\x00\x00', f('0.0.0.0'))
-        self.assertEquals('\xff\x00\xff\x00', f('255.0.255.0'))
-        self.assertEquals('\xaa\xaa\xaa\xaa', f('170.170.170.170'))
-        self.assertEquals('\x01\x02\x03\x04', f('1.2.3.4'))
-        self.assertEquals('\xff\xff\xff\xff', f('255.255.255.255'))
+        self.assertEqual('\x00\x00\x00\x00', f('0.0.0.0'))
+        self.assertEqual('\xff\x00\xff\x00', f('255.0.255.0'))
+        self.assertEqual('\xaa\xaa\xaa\xaa', f('170.170.170.170'))
+        self.assertEqual('\x01\x02\x03\x04', f('1.2.3.4'))
+        self.assertEqual('\xff\xff\xff\xff', f('255.255.255.255'))
 
-        self.assertEquals('\x00\x00\x00\x00', g('0.0.0.0'))
-        self.assertEquals('\xff\x00\xff\x00', g('255.0.255.0'))
-        self.assertEquals('\xaa\xaa\xaa\xaa', g('170.170.170.170'))
-        self.assertEquals('\xff\xff\xff\xff', g('255.255.255.255'))
+        self.assertEqual('\x00\x00\x00\x00', g('0.0.0.0'))
+        self.assertEqual('\xff\x00\xff\x00', g('255.0.255.0'))
+        self.assertEqual('\xaa\xaa\xaa\xaa', g('170.170.170.170'))
+        self.assertEqual('\xff\xff\xff\xff', g('255.255.255.255'))
 
     def testIPv6toString(self):
         if not hasattr(socket, 'inet_pton'):
@@ -456,10 +456,10 @@
             return
         f = lambda a: inet_pton(AF_INET6, a)
 
-        self.assertEquals('\x00' * 16, f('::'))
-        self.assertEquals('\x00' * 16, f('0::0'))
-        self.assertEquals('\x00\x01' + '\x00' * 14, f('1::'))
-        self.assertEquals(
+        self.assertEqual('\x00' * 16, f('::'))
+        self.assertEqual('\x00' * 16, f('0::0'))
+        self.assertEqual('\x00\x01' + '\x00' * 14, f('1::'))
+        self.assertEqual(
             '\x45\xef\x76\xcb\x00\x1a\x56\xef\xaf\xeb\x0b\xac\x19\x24\xae\xae',
             f('45ef:76cb:1a:56ef:afeb:bac:1924:aeae')
         )
@@ -470,14 +470,14 @@
         from socket import inet_ntoa as f, inet_ntop, AF_INET
         g = lambda a: inet_ntop(AF_INET, a)
 
-        self.assertEquals('1.0.1.0', f('\x01\x00\x01\x00'))
-        self.assertEquals('170.85.170.85', f('\xaa\x55\xaa\x55'))
-        self.assertEquals('255.255.255.255', f('\xff\xff\xff\xff'))
-        self.assertEquals('1.2.3.4', f('\x01\x02\x03\x04'))
+        self.assertEqual('1.0.1.0', f('\x01\x00\x01\x00'))
+        self.assertEqual('170.85.170.85', f('\xaa\x55\xaa\x55'))
+        self.assertEqual('255.255.255.255', f('\xff\xff\xff\xff'))
+        self.assertEqual('1.2.3.4', f('\x01\x02\x03\x04'))
 
-        self.assertEquals('1.0.1.0', g('\x01\x00\x01\x00'))
-        self.assertEquals('170.85.170.85', g('\xaa\x55\xaa\x55'))
-        self.assertEquals('255.255.255.255', g('\xff\xff\xff\xff'))
+        self.assertEqual('1.0.1.0', g('\x01\x00\x01\x00'))
+        self.assertEqual('170.85.170.85', g('\xaa\x55\xaa\x55'))
+        self.assertEqual('255.255.255.255', g('\xff\xff\xff\xff'))
 
     def testStringToIPv6(self):
         if not hasattr(socket, 'inet_ntop'):
@@ -490,9 +490,9 @@
             return
         f = lambda a: inet_ntop(AF_INET6, a)
 
-        self.assertEquals('::', f('\x00' * 16))
-        self.assertEquals('::1', f('\x00' * 15 + '\x01'))
-        self.assertEquals(
+        self.assertEqual('::', f('\x00' * 16))
+        self.assertEqual('::1', f('\x00' * 15 + '\x01'))
+        self.assertEqual(
             'aef:b01:506:1001:ffff:9997:55:170',
             f('\x0a\xef\x0b\x01\x05\x06\x10\x01\xff\xff\x99\x97\x00\x55\x01\x70')
         )
@@ -523,7 +523,11 @@
         # XXX(nnorwitz): http://tinyurl.com/os5jz seems to indicate
         # it reasonable to get the host's addr in addition to 0.0.0.0.
         # At least for eCos.  This is required for the S/390 to pass.
-        my_ip_addr = socket.gethostbyname(socket.gethostname())
+        try:
+            my_ip_addr = socket.gethostbyname(socket.gethostname())
+        except socket.error:
+            # Probably name lookup wasn't set up right; skip this test
+            return
         self.assertIn(name[0], ("0.0.0.0", my_ip_addr), '%s invalid' % name[0])
         self.assertEqual(name[1], port)
 
@@ -1016,8 +1020,8 @@
                 lambda : "",
             ])
         fo = socket._fileobject(mock_sock, **kwargs)
-        self.assertEquals(fo.readline(size), "This is the first line\n")
-        self.assertEquals(fo.readline(size), "And the second line is here\n")
+        self.assertEqual(fo.readline(size), "This is the first line\n")
+        self.assertEqual(fo.readline(size), "And the second line is here\n")
 
     def _test_read(self, size=-1, **kwargs):
         mock_sock = self.MockSocket(recv_funcs=[
@@ -1027,7 +1031,7 @@
                 lambda : "",
             ])
         fo = socket._fileobject(mock_sock, **kwargs)
-        self.assertEquals(fo.read(size), "This is the first line\n"
+        self.assertEqual(fo.read(size), "This is the first line\n"
                           "And the second line is here\n")
 
     def test_default(self):
@@ -1052,8 +1056,8 @@
                 lambda : "",
             ])
         fo = socket._fileobject(mock_sock, bufsize=0)
-        self.assertEquals(fo.readline(size), "aa\n")
-        self.assertEquals(fo.readline(size), "BBbb")
+        self.assertEqual(fo.readline(size), "aa\n")
+        self.assertEqual(fo.readline(size), "BBbb")
 
     def test_no_buffer(self):
         self._test_readline_no_buffer()
@@ -1192,7 +1196,7 @@
             self.addCleanup(self.cli.close)
         finally:
             socket.setdefaulttimeout(None)
-        self.assertEquals(self.cli.gettimeout(), 42)
+        self.assertEqual(self.cli.gettimeout(), 42)
 
     testTimeoutNone = _justAccept
     def _testTimeoutNone(self):

diff --git a/lib-python/2.7.0/sqlite3/test/types.py b/lib-python/2.7.0/sqlite3/test/types.py
--- a/lib-python/2.7.0/sqlite3/test/types.py
+++ b/lib-python/2.7.0/sqlite3/test/types.py
@@ -306,7 +306,7 @@
         no row returned.
         """
         self.cur.execute("select * from test where 0 = 1")
-        self.assert_(self.cur.description[0][0] == "x")
+        self.assertEqual(self.cur.description[0][0], "x")
 
 class ObjectAdaptationTests(unittest.TestCase):
     def cast(obj):

diff --git a/lib-python/2.7.0/distutils/debug.py b/lib-python/2.7.0/distutils/debug.py
--- a/lib-python/2.7.0/distutils/debug.py
+++ b/lib-python/2.7.0/distutils/debug.py
@@ -1,6 +1,6 @@
 import os
 
-__revision__ = "$Id: debug.py 68943 2009-01-25 22:09:10Z tarek.ziade $"
+__revision__ = "$Id$"
 
 # If DISTUTILS_DEBUG is anything other than the empty string, we run in
 # debug mode.

diff --git a/lib-python/2.7.0/test/test_fractions.py b/lib-python/2.7.0/test/test_fractions.py
--- a/lib-python/2.7.0/test/test_fractions.py
+++ b/lib-python/2.7.0/test/test_fractions.py
@@ -91,16 +91,16 @@
 class GcdTest(unittest.TestCase):
 
     def testMisc(self):
-        self.assertEquals(0, gcd(0, 0))
-        self.assertEquals(1, gcd(1, 0))
-        self.assertEquals(-1, gcd(-1, 0))
-        self.assertEquals(1, gcd(0, 1))
-        self.assertEquals(-1, gcd(0, -1))
-        self.assertEquals(1, gcd(7, 1))
-        self.assertEquals(-1, gcd(7, -1))
-        self.assertEquals(1, gcd(-23, 15))
-        self.assertEquals(12, gcd(120, 84))
-        self.assertEquals(-12, gcd(84, -120))
+        self.assertEqual(0, gcd(0, 0))
+        self.assertEqual(1, gcd(1, 0))
+        self.assertEqual(-1, gcd(-1, 0))
+        self.assertEqual(1, gcd(0, 1))
+        self.assertEqual(-1, gcd(0, -1))
+        self.assertEqual(1, gcd(7, 1))
+        self.assertEqual(-1, gcd(7, -1))
+        self.assertEqual(1, gcd(-23, 15))
+        self.assertEqual(12, gcd(120, 84))
+        self.assertEqual(-12, gcd(84, -120))
 
 
 def _components(r):
@@ -111,8 +111,8 @@
 
     def assertTypedEquals(self, expected, actual):
         """Asserts that both the types and values are the same."""
-        self.assertEquals(type(expected), type(actual))
-        self.assertEquals(expected, actual)
+        self.assertEqual(type(expected), type(actual))
+        self.assertEqual(expected, actual)
 
     def assertRaisesMessage(self, exc_type, message,
                             callable, *args, **kwargs):
@@ -120,25 +120,25 @@
         try:
             callable(*args, **kwargs)
         except exc_type, e:
-            self.assertEquals(message, str(e))
+            self.assertEqual(message, str(e))
         else:
             self.fail("%s not raised" % exc_type.__name__)
 
     def testInit(self):
-        self.assertEquals((0, 1), _components(F()))
-        self.assertEquals((7, 1), _components(F(7)))
-        self.assertEquals((7, 3), _components(F(F(7, 3))))
+        self.assertEqual((0, 1), _components(F()))
+        self.assertEqual((7, 1), _components(F(7)))
+        self.assertEqual((7, 3), _components(F(F(7, 3))))
 
-        self.assertEquals((-1, 1), _components(F(-1, 1)))
-        self.assertEquals((-1, 1), _components(F(1, -1)))
-        self.assertEquals((1, 1), _components(F(-2, -2)))
-        self.assertEquals((1, 2), _components(F(5, 10)))
-        self.assertEquals((7, 15), _components(F(7, 15)))
-        self.assertEquals((10**23, 1), _components(F(10**23)))
+        self.assertEqual((-1, 1), _components(F(-1, 1)))
+        self.assertEqual((-1, 1), _components(F(1, -1)))
+        self.assertEqual((1, 1), _components(F(-2, -2)))
+        self.assertEqual((1, 2), _components(F(5, 10)))
+        self.assertEqual((7, 15), _components(F(7, 15)))
+        self.assertEqual((10**23, 1), _components(F(10**23)))
 
-        self.assertEquals((3, 77), _components(F(F(3, 7), 11)))
-        self.assertEquals((-9, 5), _components(F(2, F(-10, 9))))
-        self.assertEquals((2486, 2485), _components(F(F(22, 7), F(355, 113))))
+        self.assertEqual((3, 77), _components(F(F(3, 7), 11)))
+        self.assertEqual((-9, 5), _components(F(2, F(-10, 9))))
+        self.assertEqual((2486, 2485), _components(F(F(22, 7), F(355, 113))))
 
         self.assertRaisesMessage(ZeroDivisionError, "Fraction(12, 0)",
                                  F, 12, 0)
@@ -150,43 +150,43 @@
 
     @requires_IEEE_754
     def testInitFromFloat(self):
-        self.assertEquals((5, 2), _components(F(2.5)))
-        self.assertEquals((0, 1), _components(F(-0.0)))
-        self.assertEquals((3602879701896397, 36028797018963968),
-                          _components(F(0.1)))
+        self.assertEqual((5, 2), _components(F(2.5)))
+        self.assertEqual((0, 1), _components(F(-0.0)))
+        self.assertEqual((3602879701896397, 36028797018963968),
+                         _components(F(0.1)))
         self.assertRaises(TypeError, F, float('nan'))
         self.assertRaises(TypeError, F, float('inf'))
         self.assertRaises(TypeError, F, float('-inf'))
 
     def testInitFromDecimal(self):
-        self.assertEquals((11, 10),
-                          _components(F(Decimal('1.1'))))
-        self.assertEquals((7, 200),
-                          _components(F(Decimal('3.5e-2'))))
-        self.assertEquals((0, 1),
-                          _components(F(Decimal('.000e20'))))
+        self.assertEqual((11, 10),
+                         _components(F(Decimal('1.1'))))
+        self.assertEqual((7, 200),
+                         _components(F(Decimal('3.5e-2'))))
+        self.assertEqual((0, 1),
+                         _components(F(Decimal('.000e20'))))
         self.assertRaises(TypeError, F, Decimal('nan'))
         self.assertRaises(TypeError, F, Decimal('snan'))
         self.assertRaises(TypeError, F, Decimal('inf'))
         self.assertRaises(TypeError, F, Decimal('-inf'))
 
     def testFromString(self):
-        self.assertEquals((5, 1), _components(F("5")))
-        self.assertEquals((3, 2), _components(F("3/2")))
-        self.assertEquals((3, 2), _components(F(" \n  +3/2")))
-        self.assertEquals((-3, 2), _components(F("-3/2  ")))
-        self.assertEquals((13, 2), _components(F("    013/02 \n  ")))
-        self.assertEquals((13, 2), _components(F(u"    013/02 \n  ")))
+        self.assertEqual((5, 1), _components(F("5")))
+        self.assertEqual((3, 2), _components(F("3/2")))
+        self.assertEqual((3, 2), _components(F(" \n  +3/2")))
+        self.assertEqual((-3, 2), _components(F("-3/2  ")))
+        self.assertEqual((13, 2), _components(F("    013/02 \n  ")))
+        self.assertEqual((13, 2), _components(F(u"    013/02 \n  ")))
 
-        self.assertEquals((16, 5), _components(F(" 3.2 ")))
-        self.assertEquals((-16, 5), _components(F(u" -3.2 ")))
-        self.assertEquals((-3, 1), _components(F(u" -3. ")))
-        self.assertEquals((3, 5), _components(F(u" .6 ")))
-        self.assertEquals((1, 3125), _components(F("32.e-5")))
-        self.assertEquals((1000000, 1), _components(F("1E+06")))
-        self.assertEquals((-12300, 1), _components(F("-1.23e4")))
-        self.assertEquals((0, 1), _components(F(" .0e+0\t")))
-        self.assertEquals((0, 1), _components(F("-0.000e0")))
+        self.assertEqual((16, 5), _components(F(" 3.2 ")))
+        self.assertEqual((-16, 5), _components(F(u" -3.2 ")))
+        self.assertEqual((-3, 1), _components(F(u" -3. ")))
+        self.assertEqual((3, 5), _components(F(u" .6 ")))
+        self.assertEqual((1, 3125), _components(F("32.e-5")))
+        self.assertEqual((1000000, 1), _components(F("1E+06")))
+        self.assertEqual((-12300, 1), _components(F("-1.23e4")))
+        self.assertEqual((0, 1), _components(F(" .0e+0\t")))
+        self.assertEqual((0, 1), _components(F("-0.000e0")))
 
 
         self.assertRaisesMessage(
@@ -229,33 +229,33 @@
     def testImmutable(self):
         r = F(7, 3)
         r.__init__(2, 15)
-        self.assertEquals((7, 3), _components(r))
+        self.assertEqual((7, 3), _components(r))
 
         self.assertRaises(AttributeError, setattr, r, 'numerator', 12)
         self.assertRaises(AttributeError, setattr, r, 'denominator', 6)
-        self.assertEquals((7, 3), _components(r))
+        self.assertEqual((7, 3), _components(r))
 
         # But if you _really_ need to:
         r._numerator = 4
         r._denominator = 2
-        self.assertEquals((4, 2), _components(r))
+        self.assertEqual((4, 2), _components(r))
         # Which breaks some important operations:
-        self.assertNotEquals(F(4, 2), r)
+        self.assertNotEqual(F(4, 2), r)
 
     def testFromFloat(self):
         self.assertRaises(TypeError, F.from_float, 3+4j)
-        self.assertEquals((10, 1), _components(F.from_float(10)))
+        self.assertEqual((10, 1), _components(F.from_float(10)))
         bigint = 1234567890123456789
-        self.assertEquals((bigint, 1), _components(F.from_float(bigint)))
-        self.assertEquals((0, 1), _components(F.from_float(-0.0)))
-        self.assertEquals((10, 1), _components(F.from_float(10.0)))
-        self.assertEquals((-5, 2), _components(F.from_float(-2.5)))
-        self.assertEquals((99999999999999991611392, 1),
-                          _components(F.from_float(1e23)))
-        self.assertEquals(float(10**23), float(F.from_float(1e23)))
-        self.assertEquals((3602879701896397, 1125899906842624),
-                          _components(F.from_float(3.2)))
-        self.assertEquals(3.2, float(F.from_float(3.2)))
+        self.assertEqual((bigint, 1), _components(F.from_float(bigint)))
+        self.assertEqual((0, 1), _components(F.from_float(-0.0)))
+        self.assertEqual((10, 1), _components(F.from_float(10.0)))
+        self.assertEqual((-5, 2), _components(F.from_float(-2.5)))
+        self.assertEqual((99999999999999991611392, 1),
+                         _components(F.from_float(1e23)))
+        self.assertEqual(float(10**23), float(F.from_float(1e23)))
+        self.assertEqual((3602879701896397, 1125899906842624),
+                         _components(F.from_float(3.2)))
+        self.assertEqual(3.2, float(F.from_float(3.2)))
 
         inf = 1e1000
         nan = inf - inf
@@ -271,13 +271,13 @@
 
     def testFromDecimal(self):
         self.assertRaises(TypeError, F.from_decimal, 3+4j)
-        self.assertEquals(F(10, 1), F.from_decimal(10))
-        self.assertEquals(F(0), F.from_decimal(Decimal("-0")))
-        self.assertEquals(F(5, 10), F.from_decimal(Decimal("0.5")))
-        self.assertEquals(F(5, 1000), F.from_decimal(Decimal("5e-3")))
-        self.assertEquals(F(5000), F.from_decimal(Decimal("5e3")))
-        self.assertEquals(1 - F(1, 10**30),
-                          F.from_decimal(Decimal("0." + "9" * 30)))
+        self.assertEqual(F(10, 1), F.from_decimal(10))
+        self.assertEqual(F(0), F.from_decimal(Decimal("-0")))
+        self.assertEqual(F(5, 10), F.from_decimal(Decimal("0.5")))
+        self.assertEqual(F(5, 1000), F.from_decimal(Decimal("5e-3")))
+        self.assertEqual(F(5000), F.from_decimal(Decimal("5e3")))
+        self.assertEqual(1 - F(1, 10**30),
+                         F.from_decimal(Decimal("0." + "9" * 30)))
 
         self.assertRaisesMessage(
             TypeError, "Cannot convert Infinity to Fraction.",
@@ -306,29 +306,29 @@
         self.assertTypedEquals(-1, math.trunc(F(-11, 10)))
         self.assertTypedEquals(-1, int(F(-11, 10)))
 
-        self.assertEquals(False, bool(F(0, 1)))
-        self.assertEquals(True, bool(F(3, 2)))
+        self.assertEqual(False, bool(F(0, 1)))
+        self.assertEqual(True, bool(F(3, 2)))
         self.assertTypedEquals(0.1, float(F(1, 10)))
 
         # Check that __float__ isn't implemented by converting the
         # numerator and denominator to float before dividing.
         self.assertRaises(OverflowError, float, long('2'*400+'7'))
-        self.assertAlmostEquals(2.0/3,
+        self.assertAlmostEqual(2.0/3,
                                 float(F(long('2'*400+'7'), long('3'*400+'1'))))
 
         self.assertTypedEquals(0.1+0j, complex(F(1,10)))
 
 
     def testArithmetic(self):
-        self.assertEquals(F(1, 2), F(1, 10) + F(2, 5))
-        self.assertEquals(F(-3, 10), F(1, 10) - F(2, 5))
-        self.assertEquals(F(1, 25), F(1, 10) * F(2, 5))
-        self.assertEquals(F(1, 4), F(1, 10) / F(2, 5))
+        self.assertEqual(F(1, 2), F(1, 10) + F(2, 5))
+        self.assertEqual(F(-3, 10), F(1, 10) - F(2, 5))
+        self.assertEqual(F(1, 25), F(1, 10) * F(2, 5))
+        self.assertEqual(F(1, 4), F(1, 10) / F(2, 5))
         self.assertTypedEquals(2, F(9, 10) // F(2, 5))
         self.assertTypedEquals(10**23, F(10**23, 1) // F(1))
-        self.assertEquals(F(2, 3), F(-7, 3) % F(3, 2))
-        self.assertEquals(F(8, 27), F(2, 3) ** F(3))
-        self.assertEquals(F(27, 8), F(2, 3) ** F(-3))
+        self.assertEqual(F(2, 3), F(-7, 3) % F(3, 2))
+        self.assertEqual(F(8, 27), F(2, 3) ** F(3))
+        self.assertEqual(F(27, 8), F(2, 3) ** F(-3))
         self.assertTypedEquals(2.0, F(4) ** F(1, 2))
         # Will return 1j in 3.0:
         self.assertRaises(ValueError, pow, F(-1), F(1, 2))
@@ -394,7 +394,7 @@
             TypeError,
             "unsupported operand type(s) for +: 'Fraction' and 'Decimal'",
             operator.add, F(3,11), Decimal('3.1415926'))
-        self.assertNotEquals(F(5, 2), Decimal('2.5'))
+        self.assertNotEqual(F(5, 2), Decimal('2.5'))
 
     def testComparisons(self):
         self.assertTrue(F(1, 2) < F(2, 3))
@@ -529,18 +529,18 @@
         self.assertFalse(float('-inf') == F(2, 5))
 
     def testStringification(self):
-        self.assertEquals("Fraction(7, 3)", repr(F(7, 3)))
-        self.assertEquals("Fraction(6283185307, 2000000000)",
-                          repr(F('3.1415926535')))
-        self.assertEquals("Fraction(-1, 100000000000000000000)",
-                          repr(F(1, -10**20)))
-        self.assertEquals("7/3", str(F(7, 3)))
-        self.assertEquals("7", str(F(7, 1)))
+        self.assertEqual("Fraction(7, 3)", repr(F(7, 3)))
+        self.assertEqual("Fraction(6283185307, 2000000000)",
+                         repr(F('3.1415926535')))
+        self.assertEqual("Fraction(-1, 100000000000000000000)",
+                         repr(F(1, -10**20)))
+        self.assertEqual("7/3", str(F(7, 3)))
+        self.assertEqual("7", str(F(7, 1)))
 
     def testHash(self):
-        self.assertEquals(hash(2.5), hash(F(5, 2)))
-        self.assertEquals(hash(10**50), hash(F(10**50)))
-        self.assertNotEquals(hash(float(10**23)), hash(F(10**23)))
+        self.assertEqual(hash(2.5), hash(F(5, 2)))
+        self.assertEqual(hash(10**50), hash(F(10**50)))
+        self.assertNotEqual(hash(float(10**23)), hash(F(10**23)))
 
     def testApproximatePi(self):
         # Algorithm borrowed from
@@ -553,7 +553,7 @@
             d, da = d+da, da+32
             t = (t * n) / d
             s += t
-        self.assertAlmostEquals(math.pi, s)
+        self.assertAlmostEqual(math.pi, s)
 
     def testApproximateCos1(self):
         # Algorithm borrowed from
@@ -567,7 +567,7 @@
             num *= x * x
             sign *= -1
             s += num / fact * sign
-        self.assertAlmostEquals(math.cos(1), s)
+        self.assertAlmostEqual(math.cos(1), s)
 
     def test_copy_deepcopy_pickle(self):
         r = F(13, 7)

diff --git a/lib-python/2.7.0/test/test_glob.py b/lib-python/2.7.0/test/test_glob.py
--- a/lib-python/2.7.0/test/test_glob.py
+++ b/lib-python/2.7.0/test/test_glob.py
@@ -59,8 +59,8 @@
         if set(type(x) for x in tmp) == uniset:
             u1 = glob.glob(u'*')
             u2 = glob.glob(u'./*')
-            self.assertEquals(set(type(r) for r in u1), uniset)
-            self.assertEquals(set(type(r) for r in u2), uniset)
+            self.assertEqual(set(type(r) for r in u1), uniset)
+            self.assertEqual(set(type(r) for r in u2), uniset)
 
     def test_glob_one_directory(self):
         eq = self.assertSequencesEqual_noorder

diff --git a/lib-python/2.7.0/test/test_epoll.py b/lib-python/2.7.0/test/test_epoll.py
--- a/lib-python/2.7.0/test/test_epoll.py
+++ b/lib-python/2.7.0/test/test_epoll.py
@@ -56,7 +56,7 @@
         try:
             client.connect(('127.0.0.1', self.serverSocket.getsockname()[1]))
         except socket.error, e:
-            self.assertEquals(e.args[0], errno.EINPROGRESS)
+            self.assertEqual(e.args[0], errno.EINPROGRESS)
         else:
             raise AssertionError("Connect should have raised EINPROGRESS")
         server, addr = self.serverSocket.accept()
@@ -162,7 +162,7 @@
                     (server.fileno(), select.EPOLLOUT)]
         expected.sort()
 
-        self.assertEquals(events, expected)
+        self.assertEqual(events, expected)
         self.assertFalse(then - now > 0.01, then - now)
 
         now = time.time()
@@ -183,7 +183,7 @@
                     (server.fileno(), select.EPOLLIN | select.EPOLLOUT)]
         expected.sort()
 
-        self.assertEquals(events, expected)
+        self.assertEqual(events, expected)
 
         ep.unregister(client.fileno())
         ep.modify(server.fileno(), select.EPOLLOUT)
@@ -193,7 +193,7 @@
         self.assertFalse(then - now > 0.01)
 
         expected = [(server.fileno(), select.EPOLLOUT)]
-        self.assertEquals(events, expected)
+        self.assertEqual(events, expected)
 
     def test_errors(self):
         self.assertRaises(ValueError, select.epoll, -2)

diff --git a/lib-python/2.7.0/test/test_queue.py b/lib-python/2.7.0/test/test_queue.py
--- a/lib-python/2.7.0/test/test_queue.py
+++ b/lib-python/2.7.0/test/test_queue.py
@@ -95,8 +95,8 @@
                             LifoQueue = [222, 333, 111],
                             PriorityQueue = [111, 222, 333])
         actual_order = [q.get(), q.get(), q.get()]
-        self.assertEquals(actual_order, target_order[q.__class__.__name__],
-                          "Didn't seem to queue the correct data!")
+        self.assertEqual(actual_order, target_order[q.__class__.__name__],
+                         "Didn't seem to queue the correct data!")
         for i in range(QUEUE_SIZE-1):
             q.put(i)
             self.assertTrue(not q.empty(), "Queue should not be empty")
@@ -154,8 +154,8 @@
         for i in xrange(100):
             q.put(i)
         q.join()
-        self.assertEquals(self.cum, sum(range(100)),
-                          "q.join() did not block until all tasks were done")
+        self.assertEqual(self.cum, sum(range(100)),
+                         "q.join() did not block until all tasks were done")
         for i in (0,1):
             q.put(None)         # instruct the threads to close
         q.join()                # verify that you can join twice

diff --git a/lib-python/2.7.0/distutils/command/sdist.py b/lib-python/2.7.0/distutils/command/sdist.py
--- a/lib-python/2.7.0/distutils/command/sdist.py
+++ b/lib-python/2.7.0/distutils/command/sdist.py
@@ -2,7 +2,7 @@
 
 Implements the Distutils 'sdist' command (create a source distribution)."""
 
-__revision__ = "$Id: sdist.py 84713 2010-09-11 15:31:13Z eric.araujo $"
+__revision__ = "$Id$"
 
 import os
 import string

diff --git a/lib-python/2.7.0/distutils/filelist.py b/lib-python/2.7.0/distutils/filelist.py
--- a/lib-python/2.7.0/distutils/filelist.py
+++ b/lib-python/2.7.0/distutils/filelist.py
@@ -4,7 +4,7 @@
 and building lists of files.
 """
 
-__revision__ = "$Id: filelist.py 75196 2009-10-03 00:07:35Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os, re
 import fnmatch

diff --git a/lib-python/2.7.0/distutils/file_util.py b/lib-python/2.7.0/distutils/file_util.py
--- a/lib-python/2.7.0/distutils/file_util.py
+++ b/lib-python/2.7.0/distutils/file_util.py
@@ -3,7 +3,7 @@
 Utility functions for operating on single files.
 """
 
-__revision__ = "$Id: file_util.py 80804 2010-05-05 19:09:31Z ronald.oussoren $"
+__revision__ = "$Id$"
 
 import os
 from distutils.errors import DistutilsFileError
@@ -224,6 +224,8 @@
     sequence of strings without line terminators) to it.
     """
     f = open(filename, "w")
-    for line in contents:
-        f.write(line + "\n")
-    f.close()
+    try:
+        for line in contents:
+            f.write(line + "\n")
+    finally:
+        f.close()

diff --git a/lib-python/2.7.0/test/buffer_tests.py b/lib-python/2.7.0/test/buffer_tests.py
--- a/lib-python/2.7.0/test/buffer_tests.py
+++ b/lib-python/2.7.0/test/buffer_tests.py
@@ -15,32 +15,32 @@
 
     def test_islower(self):
         self.assertFalse(self.marshal(b'').islower())
-        self.assert_(self.marshal(b'a').islower())
+        self.assertTrue(self.marshal(b'a').islower())
         self.assertFalse(self.marshal(b'A').islower())
         self.assertFalse(self.marshal(b'\n').islower())
-        self.assert_(self.marshal(b'abc').islower())
+        self.assertTrue(self.marshal(b'abc').islower())
         self.assertFalse(self.marshal(b'aBc').islower())
-        self.assert_(self.marshal(b'abc\n').islower())
+        self.assertTrue(self.marshal(b'abc\n').islower())
         self.assertRaises(TypeError, self.marshal(b'abc').islower, 42)
 
     def test_isupper(self):
         self.assertFalse(self.marshal(b'').isupper())
         self.assertFalse(self.marshal(b'a').isupper())
-        self.assert_(self.marshal(b'A').isupper())
+        self.assertTrue(self.marshal(b'A').isupper())
         self.assertFalse(self.marshal(b'\n').isupper())
-        self.assert_(self.marshal(b'ABC').isupper())
+        self.assertTrue(self.marshal(b'ABC').isupper())
         self.assertFalse(self.marshal(b'AbC').isupper())
-        self.assert_(self.marshal(b'ABC\n').isupper())
+        self.assertTrue(self.marshal(b'ABC\n').isupper())
         self.assertRaises(TypeError, self.marshal(b'abc').isupper, 42)
 
     def test_istitle(self):
         self.assertFalse(self.marshal(b'').istitle())
         self.assertFalse(self.marshal(b'a').istitle())
-        self.assert_(self.marshal(b'A').istitle())
+        self.assertTrue(self.marshal(b'A').istitle())
         self.assertFalse(self.marshal(b'\n').istitle())
-        self.assert_(self.marshal(b'A Titlecased Line').istitle())
-        self.assert_(self.marshal(b'A\nTitlecased Line').istitle())
-        self.assert_(self.marshal(b'A Titlecased, Line').istitle())
+        self.assertTrue(self.marshal(b'A Titlecased Line').istitle())
+        self.assertTrue(self.marshal(b'A\nTitlecased Line').istitle())
+        self.assertTrue(self.marshal(b'A Titlecased, Line').istitle())
         self.assertFalse(self.marshal(b'Not a capitalized String').istitle())
         self.assertFalse(self.marshal(b'Not\ta Titlecase String').istitle())
         self.assertFalse(self.marshal(b'Not--a Titlecase String').istitle())
@@ -50,31 +50,31 @@
     def test_isspace(self):
         self.assertFalse(self.marshal(b'').isspace())
         self.assertFalse(self.marshal(b'a').isspace())
-        self.assert_(self.marshal(b' ').isspace())
-        self.assert_(self.marshal(b'\t').isspace())
-        self.assert_(self.marshal(b'\r').isspace())
-        self.assert_(self.marshal(b'\n').isspace())
-        self.assert_(self.marshal(b' \t\r\n').isspace())
+        self.assertTrue(self.marshal(b' ').isspace())
+        self.assertTrue(self.marshal(b'\t').isspace())
+        self.assertTrue(self.marshal(b'\r').isspace())
+        self.assertTrue(self.marshal(b'\n').isspace())
+        self.assertTrue(self.marshal(b' \t\r\n').isspace())
         self.assertFalse(self.marshal(b' \t\r\na').isspace())
         self.assertRaises(TypeError, self.marshal(b'abc').isspace, 42)
 
     def test_isalpha(self):
         self.assertFalse(self.marshal(b'').isalpha())
-        self.assert_(self.marshal(b'a').isalpha())
-        self.assert_(self.marshal(b'A').isalpha())
+        self.assertTrue(self.marshal(b'a').isalpha())
+        self.assertTrue(self.marshal(b'A').isalpha())
         self.assertFalse(self.marshal(b'\n').isalpha())
-        self.assert_(self.marshal(b'abc').isalpha())
+        self.assertTrue(self.marshal(b'abc').isalpha())
         self.assertFalse(self.marshal(b'aBc123').isalpha())
         self.assertFalse(self.marshal(b'abc\n').isalpha())
         self.assertRaises(TypeError, self.marshal(b'abc').isalpha, 42)
 
     def test_isalnum(self):
         self.assertFalse(self.marshal(b'').isalnum())
-        self.assert_(self.marshal(b'a').isalnum())
-        self.assert_(self.marshal(b'A').isalnum())
+        self.assertTrue(self.marshal(b'a').isalnum())
+        self.assertTrue(self.marshal(b'A').isalnum())
         self.assertFalse(self.marshal(b'\n').isalnum())
-        self.assert_(self.marshal(b'123abc456').isalnum())
-        self.assert_(self.marshal(b'a1b3c').isalnum())
+        self.assertTrue(self.marshal(b'123abc456').isalnum())
+        self.assertTrue(self.marshal(b'a1b3c').isalnum())
         self.assertFalse(self.marshal(b'aBc000 ').isalnum())
         self.assertFalse(self.marshal(b'abc\n').isalnum())
         self.assertRaises(TypeError, self.marshal(b'abc').isalnum, 42)
@@ -82,8 +82,8 @@
     def test_isdigit(self):
         self.assertFalse(self.marshal(b'').isdigit())
         self.assertFalse(self.marshal(b'a').isdigit())
-        self.assert_(self.marshal(b'0').isdigit())
-        self.assert_(self.marshal(b'0123456789').isdigit())
+        self.assertTrue(self.marshal(b'0').isdigit())
+        self.assertTrue(self.marshal(b'0123456789').isdigit())
         self.assertFalse(self.marshal(b'0123456789a').isdigit())
 
         self.assertRaises(TypeError, self.marshal(b'abc').isdigit, 42)

diff --git a/lib-python/2.7.0/curses/__init__.py b/lib-python/2.7.0/curses/__init__.py
--- a/lib-python/2.7.0/curses/__init__.py
+++ b/lib-python/2.7.0/curses/__init__.py
@@ -10,7 +10,7 @@
 
 """
 
-__revision__ = "$Id: __init__.py 61064 2008-02-25 16:29:58Z andrew.kuchling $"
+__revision__ = "$Id$"
 
 from _curses import *
 from curses.wrapper import wrapper

diff --git a/lib-python/2.7.0/test/test_opcodes.py b/lib-python/2.7.0/test/test_opcodes.py
--- a/lib-python/2.7.0/test/test_opcodes.py
+++ b/lib-python/2.7.0/test/test_opcodes.py
@@ -72,35 +72,35 @@
 
         f = eval('lambda: None')
         g = eval('lambda: None')
-        self.assertNotEquals(f, g)
+        self.assertNotEqual(f, g)
 
         f = eval('lambda a: a')
         g = eval('lambda a: a')
-        self.assertNotEquals(f, g)
+        self.assertNotEqual(f, g)
 
         f = eval('lambda a=1: a')
         g = eval('lambda a=1: a')
-        self.assertNotEquals(f, g)
+        self.assertNotEqual(f, g)
 
         f = eval('lambda: 0')
         g = eval('lambda: 1')
-        self.assertNotEquals(f, g)
+        self.assertNotEqual(f, g)
 
         f = eval('lambda: None')
         g = eval('lambda a: None')
-        self.assertNotEquals(f, g)
+        self.assertNotEqual(f, g)
 
         f = eval('lambda a: None')
         g = eval('lambda b: None')
-        self.assertNotEquals(f, g)
+        self.assertNotEqual(f, g)
 
         f = eval('lambda a: None')
         g = eval('lambda a=None: None')
-        self.assertNotEquals(f, g)
+        self.assertNotEqual(f, g)
 
         f = eval('lambda a=0: None')
         g = eval('lambda a=1: None')
-        self.assertNotEquals(f, g)
+        self.assertNotEqual(f, g)
 
     def test_modulo_of_string_subclasses(self):
         class MyString(str):

diff --git a/lib-python/2.7.0/distutils/tests/test_build.py b/lib-python/2.7.0/distutils/tests/test_build.py
--- a/lib-python/2.7.0/distutils/tests/test_build.py
+++ b/lib-python/2.7.0/distutils/tests/test_build.py
@@ -17,11 +17,11 @@
         cmd.finalize_options()
 
         # if not specified, plat_name gets the current platform
-        self.assertEquals(cmd.plat_name, get_platform())
+        self.assertEqual(cmd.plat_name, get_platform())
 
         # build_purelib is build + lib
         wanted = os.path.join(cmd.build_base, 'lib')
-        self.assertEquals(cmd.build_purelib, wanted)
+        self.assertEqual(cmd.build_purelib, wanted)
 
         # build_platlib is 'build/lib.platform-x.x[-pydebug]'
         # examples:
@@ -31,21 +31,21 @@
             self.assertTrue(cmd.build_platlib.endswith('-pydebug'))
             plat_spec += '-pydebug'
         wanted = os.path.join(cmd.build_base, 'lib' + plat_spec)
-        self.assertEquals(cmd.build_platlib, wanted)
+        self.assertEqual(cmd.build_platlib, wanted)
 
         # by default, build_lib = build_purelib
-        self.assertEquals(cmd.build_lib, cmd.build_purelib)
+        self.assertEqual(cmd.build_lib, cmd.build_purelib)
 
         # build_temp is build/temp.<plat>
         wanted = os.path.join(cmd.build_base, 'temp' + plat_spec)
-        self.assertEquals(cmd.build_temp, wanted)
+        self.assertEqual(cmd.build_temp, wanted)
 
         # build_scripts is build/scripts-x.x
         wanted = os.path.join(cmd.build_base, 'scripts-' +  sys.version[0:3])
-        self.assertEquals(cmd.build_scripts, wanted)
+        self.assertEqual(cmd.build_scripts, wanted)
 
         # executable is os.path.normpath(sys.executable)
-        self.assertEquals(cmd.executable, os.path.normpath(sys.executable))
+        self.assertEqual(cmd.executable, os.path.normpath(sys.executable))
 
 def test_suite():
     return unittest.makeSuite(BuildTestCase)

diff --git a/lib-python/2.7.0/test/test_gdb.py b/lib-python/2.7.0/test/test_gdb.py
--- a/lib-python/2.7.0/test/test_gdb.py
+++ b/lib-python/2.7.0/test/test_gdb.py
@@ -127,7 +127,7 @@
                           '')
 
         # Ensure no unexpected error messages:
-        self.assertEquals(err, '')
+        self.assertEqual(err, '')
 
         return out
 
@@ -155,13 +155,12 @@
 
     def assertEndsWith(self, actual, exp_end):
         '''Ensure that the given "actual" string ends with "exp_end"'''
-        self.assert_(actual.endswith(exp_end),
-                     msg='%r did not end with %r' % (actual, exp_end))
+        self.assertTrue(actual.endswith(exp_end),
+                        msg='%r did not end with %r' % (actual, exp_end))
 
     def assertMultilineMatches(self, actual, pattern):
         m = re.match(pattern, actual, re.DOTALL)
-        self.assert_(m,
-                     msg='%r did not match %r' % (actual, pattern))
+        self.assertTrue(m, msg='%r did not match %r' % (actual, pattern))
 
     def get_sample_script(self):
         return findfile('gdb_sample.py')
@@ -176,7 +175,7 @@
         # matches repr(value) in this process:
         gdb_repr, gdb_output = self.get_gdb_repr('print ' + repr(val),
                                                  cmds_after_breakpoint)
-        self.assertEquals(gdb_repr, repr(val), gdb_output)
+        self.assertEqual(gdb_repr, repr(val), gdb_output)
 
     def test_int(self):
         'Verify the pretty-printing of various "int" values'
@@ -258,7 +257,7 @@
         gdb_repr, gdb_output = self.get_gdb_repr('''s = set(['a','b'])
 s.pop()
 print s''')
-        self.assertEquals(gdb_repr, "set(['b'])")
+        self.assertEqual(gdb_repr, "set(['b'])")
 
     def test_frozensets(self):
         'Verify the pretty-printing of frozensets'
@@ -274,8 +273,8 @@
 except RuntimeError, e:
     print e
 ''')
-        self.assertEquals(gdb_repr,
-                          "exceptions.RuntimeError('I am an error',)")
+        self.assertEqual(gdb_repr,
+                         "exceptions.RuntimeError('I am an error',)")
 
 
         # Test division by zero:
@@ -285,8 +284,8 @@
 except ZeroDivisionError, e:
     print e
 ''')
-        self.assertEquals(gdb_repr,
-                          "exceptions.ZeroDivisionError('integer division or modulo by zero',)")
+        self.assertEqual(gdb_repr,
+                         "exceptions.ZeroDivisionError('integer division or modulo by zero',)")
 
     def test_classic_class(self):
         'Verify the pretty-printing of classic class instances'
@@ -380,7 +379,7 @@
                                                      'backtrace'])
             )
 
-        self.assertEquals(gdb_repr, '0x0')
+        self.assertEqual(gdb_repr, '0x0')
 
     def test_NULL_ob_type(self):
         'Ensure that a PyObject* with NULL ob_type is handled gracefully'
@@ -432,12 +431,12 @@
         gdb_repr, gdb_output = \
             self.get_gdb_repr("a = [3, 4, 5] ; a.append(a) ; print a")
 
-        self.assertEquals(gdb_repr, '[3, 4, 5, [...]]')
+        self.assertEqual(gdb_repr, '[3, 4, 5, [...]]')
 
         gdb_repr, gdb_output = \
             self.get_gdb_repr("a = [3, 4, 5] ; b = [a] ; a.append(b) ; print a")
 
-        self.assertEquals(gdb_repr, '[3, 4, 5, [[...]]]')
+        self.assertEqual(gdb_repr, '[3, 4, 5, [[...]]]')
 
     def test_selfreferential_dict(self):
         '''Ensure that a reference loop involving a dict doesn't lead proxyval
@@ -445,7 +444,7 @@
         gdb_repr, gdb_output = \
             self.get_gdb_repr("a = {} ; b = {'bar':a} ; a['foo'] = b ; print a")
 
-        self.assertEquals(gdb_repr, "{'foo': {'bar': {...}}}")
+        self.assertEqual(gdb_repr, "{'foo': {'bar': {...}}}")
 
     def test_selfreferential_old_style_instance(self):
         gdb_repr, gdb_output = \
@@ -490,34 +489,34 @@
     def test_truncation(self):
         'Verify that very long output is truncated'
         gdb_repr, gdb_output = self.get_gdb_repr('print range(1000)')
-        self.assertEquals(gdb_repr,
-                          "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, "
-                          "14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, "
-                          "27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, "
-                          "40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, "
-                          "53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, "
-                          "66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, "
-                          "79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, "
-                          "92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, "
-                          "104, 105, 106, 107, 108, 109, 110, 111, 112, 113, "
-                          "114, 115, 116, 117, 118, 119, 120, 121, 122, 123, "
-                          "124, 125, 126, 127, 128, 129, 130, 131, 132, 133, "
-                          "134, 135, 136, 137, 138, 139, 140, 141, 142, 143, "
-                          "144, 145, 146, 147, 148, 149, 150, 151, 152, 153, "
-                          "154, 155, 156, 157, 158, 159, 160, 161, 162, 163, "
-                          "164, 165, 166, 167, 168, 169, 170, 171, 172, 173, "
-                          "174, 175, 176, 177, 178, 179, 180, 181, 182, 183, "
-                          "184, 185, 186, 187, 188, 189, 190, 191, 192, 193, "
-                          "194, 195, 196, 197, 198, 199, 200, 201, 202, 203, "
-                          "204, 205, 206, 207, 208, 209, 210, 211, 212, 213, "
-                          "214, 215, 216, 217, 218, 219, 220, 221, 222, 223, "
-                          "224, 225, 226...(truncated)")
-        self.assertEquals(len(gdb_repr),
-                          1024 + len('...(truncated)'))
+        self.assertEqual(gdb_repr,
+                         "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, "
+                         "14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, "
+                         "27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, "
+                         "40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, "
+                         "53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, "
+                         "66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, "
+                         "79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, "
+                         "92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, "
+                         "104, 105, 106, 107, 108, 109, 110, 111, 112, 113, "
+                         "114, 115, 116, 117, 118, 119, 120, 121, 122, 123, "
+                         "124, 125, 126, 127, 128, 129, 130, 131, 132, 133, "
+                         "134, 135, 136, 137, 138, 139, 140, 141, 142, 143, "
+                         "144, 145, 146, 147, 148, 149, 150, 151, 152, 153, "
+                         "154, 155, 156, 157, 158, 159, 160, 161, 162, 163, "
+                         "164, 165, 166, 167, 168, 169, 170, 171, 172, 173, "
+                         "174, 175, 176, 177, 178, 179, 180, 181, 182, 183, "
+                         "184, 185, 186, 187, 188, 189, 190, 191, 192, 193, "
+                         "194, 195, 196, 197, 198, 199, 200, 201, 202, 203, "
+                         "204, 205, 206, 207, 208, 209, 210, 211, 212, 213, "
+                         "214, 215, 216, 217, 218, 219, 220, 221, 222, 223, "
+                         "224, 225, 226...(truncated)")
+        self.assertEqual(len(gdb_repr),
+                         1024 + len('...(truncated)'))
 
     def test_builtin_function(self):
         gdb_repr, gdb_output = self.get_gdb_repr('print len')
-        self.assertEquals(gdb_repr, '<built-in function len>')
+        self.assertEqual(gdb_repr, '<built-in function len>')
 
     def test_builtin_method(self):
         gdb_repr, gdb_output = self.get_gdb_repr('import sys; print sys.stdout.readlines')

diff --git a/lib-python/2.7.0/distutils/tests/test_filelist.py b/lib-python/2.7.0/distutils/tests/test_filelist.py
--- a/lib-python/2.7.0/distutils/tests/test_filelist.py
+++ b/lib-python/2.7.0/distutils/tests/test_filelist.py
@@ -24,15 +24,15 @@
 
     def test_glob_to_re(self):
         # simple cases
-        self.assertEquals(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)')
-        self.assertEquals(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)')
-        self.assertEquals(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)')
+        self.assertEqual(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)')
+        self.assertEqual(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)')
+        self.assertEqual(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)')
 
         # special cases
-        self.assertEquals(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)')
-        self.assertEquals(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)')
-        self.assertEquals(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)')
-        self.assertEquals(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)')
+        self.assertEqual(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)')
+        self.assertEqual(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)')
+        self.assertEqual(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)')
+        self.assertEqual(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)')
 
     def test_process_template_line(self):
         # testing  all MANIFEST.in template patterns
@@ -60,21 +60,21 @@
                   join('global', 'two.txt'), join('f', 'o', 'f.oo'),
                   join('dir', 'graft-one'), join('dir', 'dir2', 'graft2')]
 
-        self.assertEquals(file_list.files, wanted)
+        self.assertEqual(file_list.files, wanted)
 
     def test_debug_print(self):
         file_list = FileList()
         with captured_stdout() as stdout:
             file_list.debug_print('xxx')
         stdout.seek(0)
-        self.assertEquals(stdout.read(), '')
+        self.assertEqual(stdout.read(), '')
 
         debug.DEBUG = True
         try:
             with captured_stdout() as stdout:
                 file_list.debug_print('xxx')
             stdout.seek(0)
-            self.assertEquals(stdout.read(), 'xxx\n')
+            self.assertEqual(stdout.read(), 'xxx\n')
         finally:
             debug.DEBUG = False
 

diff --git a/lib-python/2.7.0/distutils/msvc9compiler.py b/lib-python/2.7.0/distutils/msvc9compiler.py
--- a/lib-python/2.7.0/distutils/msvc9compiler.py
+++ b/lib-python/2.7.0/distutils/msvc9compiler.py
@@ -12,7 +12,7 @@
 #   finding DevStudio (through the registry)
 # ported to VS2005 and VS 2008 by Christian Heimes
 
-__revision__ = "$Id: msvc9compiler.py 82130 2010-06-21 15:27:46Z benjamin.peterson $"
+__revision__ = "$Id$"
 
 import os
 import subprocess
@@ -273,23 +273,27 @@
     popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch),
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
+    try:
+        stdout, stderr = popen.communicate()
+        if popen.wait() != 0:
+            raise DistutilsPlatformError(stderr.decode("mbcs"))
 
-    stdout, stderr = popen.communicate()
-    if popen.wait() != 0:
-        raise DistutilsPlatformError(stderr.decode("mbcs"))
+        stdout = stdout.decode("mbcs")
+        for line in stdout.split("\n"):
+            line = Reg.convert_mbcs(line)
+            if '=' not in line:
+                continue
+            line = line.strip()
+            key, value = line.split('=', 1)
+            key = key.lower()
+            if key in interesting:
+                if value.endswith(os.pathsep):
+                    value = value[:-1]
+                result[key] = removeDuplicates(value)
 
-    stdout = stdout.decode("mbcs")
-    for line in stdout.split("\n"):
-        line = Reg.convert_mbcs(line)
-        if '=' not in line:
-            continue
-        line = line.strip()
-        key, value = line.split('=', 1)
-        key = key.lower()
-        if key in interesting:
-            if value.endswith(os.pathsep):
-                value = value[:-1]
-            result[key] = removeDuplicates(value)
+    finally:
+        popen.stdout.close()
+        popen.stderr.close()
 
     if len(result) != len(interesting):
         raise ValueError(str(list(result.keys())))

diff --git a/lib-python/2.7.0/test/test_kqueue.py b/lib-python/2.7.0/test/test_kqueue.py
--- a/lib-python/2.7.0/test/test_kqueue.py
+++ b/lib-python/2.7.0/test/test_kqueue.py
@@ -90,7 +90,7 @@
         try:
             client.connect(('127.0.0.1', serverSocket.getsockname()[1]))
         except socket.error, e:
-            self.assertEquals(e.args[0], errno.EINPROGRESS)
+            self.assertEqual(e.args[0], errno.EINPROGRESS)
         else:
             #raise AssertionError("Connect should have raised EINPROGRESS")
             pass # FreeBSD doesn't raise an exception here
@@ -124,7 +124,7 @@
         events = kq.control(None, 4, 1)
         events = [(e.ident, e.filter, e.flags) for e in events]
         events.sort()
-        self.assertEquals(events, [
+        self.assertEqual(events, [
             (client.fileno(), select.KQ_FILTER_WRITE, flags),
             (server.fileno(), select.KQ_FILTER_WRITE, flags)])
 
@@ -143,7 +143,7 @@
         events = [(e.ident, e.filter, e.flags) for e in events]
         events.sort()
 
-        self.assertEquals(events, [
+        self.assertEqual(events, [
             (client.fileno(), select.KQ_FILTER_WRITE, flags),
             (client.fileno(), select.KQ_FILTER_READ, flags),
             (server.fileno(), select.KQ_FILTER_WRITE, flags),
@@ -166,7 +166,7 @@
         events = kq.control([], 4, 0.99)
         events = [(e.ident, e.filter, e.flags) for e in events]
         events.sort()
-        self.assertEquals(events, [
+        self.assertEqual(events, [
             (server.fileno(), select.KQ_FILTER_WRITE, flags)])
 
         client.close()
@@ -183,7 +183,7 @@
         r = kq.control([event1, event2], 1, 1)
         self.assertTrue(r)
         self.assertFalse(r[0].flags & select.KQ_EV_ERROR)
-        self.assertEquals(b.recv(r[0].data), b'foo')
+        self.assertEqual(b.recv(r[0].data), b'foo')
 
         a.close()
         b.close()

diff --git a/lib-python/2.7.0/test/test_sysconfig.py b/lib-python/2.7.0/test/test_sysconfig.py
--- a/lib-python/2.7.0/test/test_sysconfig.py
+++ b/lib-python/2.7.0/test/test_sysconfig.py
@@ -87,7 +87,7 @@
             shutil.rmtree(path)
 
     def test_get_path_names(self):
-        self.assertEquals(get_path_names(), sysconfig._SCHEME_KEYS)
+        self.assertEqual(get_path_names(), sysconfig._SCHEME_KEYS)
 
     def test_get_paths(self):
         scheme = get_paths()
@@ -97,7 +97,7 @@
         wanted.sort()
         scheme = scheme.items()
         scheme.sort()
-        self.assertEquals(scheme, wanted)
+        self.assertEqual(scheme, wanted)
 
     def test_get_path(self):
         # xxx make real tests here
@@ -116,21 +116,21 @@
         sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) '
                        '[MSC v.1310 32 bit (Intel)]')
         sys.platform = 'win32'
-        self.assertEquals(get_platform(), 'win32')
+        self.assertEqual(get_platform(), 'win32')
 
         # windows XP, amd64
         os.name = 'nt'
         sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) '
                        '[MSC v.1310 32 bit (Amd64)]')
         sys.platform = 'win32'
-        self.assertEquals(get_platform(), 'win-amd64')
+        self.assertEqual(get_platform(), 'win-amd64')
 
         # windows XP, itanium
         os.name = 'nt'
         sys.version = ('2.4.4 (#71, Oct 18 2006, 08:34:43) '
                        '[MSC v.1310 32 bit (Itanium)]')
         sys.platform = 'win32'
-        self.assertEquals(get_platform(), 'win-ia64')
+        self.assertEqual(get_platform(), 'win-ia64')
 
         # macbook
         os.name = 'posix'
@@ -149,9 +149,9 @@
         maxint = sys.maxint
         try:
             sys.maxint = 2147483647
-            self.assertEquals(get_platform(), 'macosx-10.3-ppc')
+            self.assertEqual(get_platform(), 'macosx-10.3-ppc')
             sys.maxint = 9223372036854775807
-            self.assertEquals(get_platform(), 'macosx-10.3-ppc64')
+            self.assertEqual(get_platform(), 'macosx-10.3-ppc64')
         finally:
             sys.maxint = maxint
 
@@ -169,9 +169,9 @@
         maxint = sys.maxint
         try:
             sys.maxint = 2147483647
-            self.assertEquals(get_platform(), 'macosx-10.3-i386')
+            self.assertEqual(get_platform(), 'macosx-10.3-i386')
             sys.maxint = 9223372036854775807
-            self.assertEquals(get_platform(), 'macosx-10.3-x86_64')
+            self.assertEqual(get_platform(), 'macosx-10.3-x86_64')
         finally:
             sys.maxint = maxint
 
@@ -182,33 +182,33 @@
                                        '-fno-strict-aliasing -fno-common '
                                        '-dynamic -DNDEBUG -g -O3')
 
-        self.assertEquals(get_platform(), 'macosx-10.4-fat')
+        self.assertEqual(get_platform(), 'macosx-10.4-fat')
 
         get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch i386 -isysroot '
                                        '/Developer/SDKs/MacOSX10.4u.sdk  '
                                        '-fno-strict-aliasing -fno-common '
                                        '-dynamic -DNDEBUG -g -O3')
 
-        self.assertEquals(get_platform(), 'macosx-10.4-intel')
+        self.assertEqual(get_platform(), 'macosx-10.4-intel')
 
         get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc -arch i386 -isysroot '
                                        '/Developer/SDKs/MacOSX10.4u.sdk  '
                                        '-fno-strict-aliasing -fno-common '
                                        '-dynamic -DNDEBUG -g -O3')
-        self.assertEquals(get_platform(), 'macosx-10.4-fat3')
+        self.assertEqual(get_platform(), 'macosx-10.4-fat3')
 
         get_config_vars()['CFLAGS'] = ('-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot '
                                        '/Developer/SDKs/MacOSX10.4u.sdk  '
                                        '-fno-strict-aliasing -fno-common '
                                        '-dynamic -DNDEBUG -g -O3')
-        self.assertEquals(get_platform(), 'macosx-10.4-universal')
+        self.assertEqual(get_platform(), 'macosx-10.4-universal')
 
         get_config_vars()['CFLAGS'] = ('-arch x86_64 -arch ppc64 -isysroot '
                                        '/Developer/SDKs/MacOSX10.4u.sdk  '
                                        '-fno-strict-aliasing -fno-common '
                                        '-dynamic -DNDEBUG -g -O3')
 
-        self.assertEquals(get_platform(), 'macosx-10.4-fat64')
+        self.assertEqual(get_platform(), 'macosx-10.4-fat64')
 
         for arch in ('ppc', 'i386', 'x86_64', 'ppc64'):
             get_config_vars()['CFLAGS'] = ('-arch %s -isysroot '
@@ -216,7 +216,7 @@
                                            '-fno-strict-aliasing -fno-common '
                                            '-dynamic -DNDEBUG -g -O3'%(arch,))
 
-            self.assertEquals(get_platform(), 'macosx-10.4-%s'%(arch,))
+            self.assertEqual(get_platform(), 'macosx-10.4-%s'%(arch,))
 
         # linux debian sarge
         os.name = 'posix'
@@ -226,7 +226,7 @@
         self._set_uname(('Linux', 'aglae', '2.6.21.1dedibox-r7',
                     '#1 Mon Apr 30 17:25:38 CEST 2007', 'i686'))
 
-        self.assertEquals(get_platform(), 'linux-i686')
+        self.assertEqual(get_platform(), 'linux-i686')
 
         # XXX more platforms to tests here
 
@@ -237,7 +237,7 @@
     def test_get_scheme_names(self):
         wanted = ('nt', 'nt_user', 'os2', 'os2_home', 'osx_framework_user',
                   'posix_home', 'posix_prefix', 'posix_user')
-        self.assertEquals(get_scheme_names(), wanted)
+        self.assertEqual(get_scheme_names(), wanted)
 
     def test_symlink(self):
         # Issue 7880
@@ -263,7 +263,7 @@
         for name in ('stdlib', 'platstdlib', 'purelib', 'platlib'):
             global_path = get_path(name, 'posix_prefix')
             user_path = get_path(name, 'posix_user')
-            self.assertEquals(user_path, global_path.replace(base, user))
+            self.assertEqual(user_path, global_path.replace(base, user))
 
 def test_main():
     run_unittest(TestSysConfig)

diff --git a/lib-python/2.7.0/test/test_textwrap.py b/lib-python/2.7.0/test/test_textwrap.py
--- a/lib-python/2.7.0/test/test_textwrap.py
+++ b/lib-python/2.7.0/test/test_textwrap.py
@@ -5,7 +5,7 @@
 # Converted to PyUnit by Peter Hansen <peter at engcorp.com>.
 # Currently maintained by Greg Ward.
 #
-# $Id: test_textwrap.py 77727 2010-01-24 16:58:36Z ezio.melotti $
+# $Id$
 #
 
 import unittest
@@ -29,7 +29,7 @@
 
 
     def check(self, result, expect):
-        self.assertEquals(result, expect,
+        self.assertEqual(result, expect,
             'expected:\n%s\nbut got:\n%s' % (
                 self.show(expect), self.show(result)))
 
@@ -39,9 +39,9 @@
 
     def check_split(self, text, expect):
         result = self.wrapper._split(text)
-        self.assertEquals(result, expect,
-                          "\nexpected %r\n"
-                          "but got  %r" % (expect, result))
+        self.assertEqual(result, expect,
+                         "\nexpected %r\n"
+                         "but got  %r" % (expect, result))
 
 
 class WrapTestCase(BaseTestCase):
@@ -504,7 +504,7 @@
 
     def assertUnchanged(self, text):
         """assert that dedent() has no effect on 'text'"""
-        self.assertEquals(text, dedent(text))
+        self.assertEqual(text, dedent(text))
 
     def test_dedent_nomargin(self):
         # No lines indented.
@@ -527,17 +527,17 @@
         # All lines indented by two spaces.
         text = "  Hello there.\n  How are ya?\n  Oh good."
         expect = "Hello there.\nHow are ya?\nOh good."
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
         # Same, with blank lines.
         text = "  Hello there.\n\n  How are ya?\n  Oh good.\n"
         expect = "Hello there.\n\nHow are ya?\nOh good.\n"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
         # Now indent one of the blank lines.
         text = "  Hello there.\n  \n  How are ya?\n  Oh good.\n"
         expect = "Hello there.\n\nHow are ya?\nOh good.\n"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
     def test_dedent_uneven(self):
         # Lines indented unevenly.
@@ -551,27 +551,27 @@
     while 1:
         return foo
 '''
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
         # Uneven indentation with a blank line.
         text = "  Foo\n    Bar\n\n   Baz\n"
         expect = "Foo\n  Bar\n\n Baz\n"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
         # Uneven indentation with a whitespace-only line.
         text = "  Foo\n    Bar\n \n   Baz\n"
         expect = "Foo\n  Bar\n\n Baz\n"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
     # dedent() should not mangle internal tabs
     def test_dedent_preserve_internal_tabs(self):
         text = "  hello\tthere\n  how are\tyou?"
         expect = "hello\tthere\nhow are\tyou?"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
         # make sure that it preserves tabs when it's not making any
         # changes at all
-        self.assertEquals(expect, dedent(expect))
+        self.assertEqual(expect, dedent(expect))
 
     # dedent() should not mangle tabs in the margin (i.e.
     # tabs and spaces both count as margin, but are *not*
@@ -587,17 +587,17 @@
         # dedent() only removes whitespace that can be uniformly removed!
         text = "\thello there\n\thow are you?"
         expect = "hello there\nhow are you?"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
         text = "  \thello there\n  \thow are you?"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
         text = "  \t  hello there\n  \t  how are you?"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
         text = "  \thello there\n  \t  how are you?"
         expect = "hello there\n  how are you?"
-        self.assertEquals(expect, dedent(text))
+        self.assertEqual(expect, dedent(text))
 
 
 def test_main():

diff --git a/lib-python/2.7.0/distutils/tests/test_cmd.py b/lib-python/2.7.0/distutils/tests/test_cmd.py
--- a/lib-python/2.7.0/distutils/tests/test_cmd.py
+++ b/lib-python/2.7.0/distutils/tests/test_cmd.py
@@ -44,7 +44,7 @@
 
         # making sure execute gets called properly
         def _execute(func, args, exec_msg, level):
-            self.assertEquals(exec_msg, 'generating out from in')
+            self.assertEqual(exec_msg, 'generating out from in')
         cmd.force = True
         cmd.execute = _execute
         cmd.make_file(infiles='in', outfile='out', func='func', args=())
@@ -63,7 +63,7 @@
 
         wanted = ["command options for 'MyCmd':", '  option1 = 1',
                   '  option2 = 1']
-        self.assertEquals(msgs, wanted)
+        self.assertEqual(msgs, wanted)
 
     def test_ensure_string(self):
         cmd = self.cmd
@@ -81,7 +81,7 @@
         cmd = self.cmd
         cmd.option1 = 'ok,dok'
         cmd.ensure_string_list('option1')
-        self.assertEquals(cmd.option1, ['ok', 'dok'])
+        self.assertEqual(cmd.option1, ['ok', 'dok'])
 
         cmd.option2 = ['xxx', 'www']
         cmd.ensure_string_list('option2')
@@ -109,14 +109,14 @@
         with captured_stdout() as stdout:
             cmd.debug_print('xxx')
         stdout.seek(0)
-        self.assertEquals(stdout.read(), '')
+        self.assertEqual(stdout.read(), '')
 
         debug.DEBUG = True
         try:
             with captured_stdout() as stdout:
                 cmd.debug_print('xxx')
             stdout.seek(0)
-            self.assertEquals(stdout.read(), 'xxx\n')
+            self.assertEqual(stdout.read(), 'xxx\n')
         finally:
             debug.DEBUG = False
 

diff --git a/lib-python/2.7.0/json/tests/test_pass2.py b/lib-python/2.7.0/json/tests/test_pass2.py
--- a/lib-python/2.7.0/json/tests/test_pass2.py
+++ b/lib-python/2.7.0/json/tests/test_pass2.py
@@ -11,4 +11,4 @@
         # test in/out equivalence and parsing
         res = json.loads(JSON)
         out = json.dumps(res)
-        self.assertEquals(res, json.loads(out))
+        self.assertEqual(res, json.loads(out))

diff --git a/lib-python/2.7.0/distutils/command/check.py b/lib-python/2.7.0/distutils/command/check.py
--- a/lib-python/2.7.0/distutils/command/check.py
+++ b/lib-python/2.7.0/distutils/command/check.py
@@ -2,7 +2,7 @@
 
 Implements the Distutils 'check' command.
 """
-__revision__ = "$Id: check.py 75266 2009-10-05 22:32:48Z andrew.kuchling $"
+__revision__ = "$Id$"
 
 from distutils.core import Command
 from distutils.errors import DistutilsSetupError

diff --git a/lib-python/2.7.0/distutils/tests/test_config.py b/lib-python/2.7.0/distutils/tests/test_config.py
--- a/lib-python/2.7.0/distutils/tests/test_config.py
+++ b/lib-python/2.7.0/distutils/tests/test_config.py
@@ -90,7 +90,7 @@
         waited = [('password', 'secret'), ('realm', 'pypi'),
                   ('repository', 'http://pypi.python.org/pypi'),
                   ('server', 'server1'), ('username', 'me')]
-        self.assertEquals(config, waited)
+        self.assertEqual(config, waited)
 
         # old format
         self.write_file(self.rc, PYPIRC_OLD)
@@ -100,7 +100,7 @@
         waited = [('password', 'secret'), ('realm', 'pypi'),
                   ('repository', 'http://pypi.python.org/pypi'),
                   ('server', 'server-login'), ('username', 'tarek')]
-        self.assertEquals(config, waited)
+        self.assertEqual(config, waited)
 
     def test_server_empty_registration(self):
         cmd = self._cmd(self.dist)
@@ -108,8 +108,12 @@
         self.assertTrue(not os.path.exists(rc))
         cmd._store_pypirc('tarek', 'xxx')
         self.assertTrue(os.path.exists(rc))
-        content = open(rc).read()
-        self.assertEquals(content, WANTED)
+        f = open(rc)
+        try:
+            content = f.read()
+            self.assertEqual(content, WANTED)
+        finally:
+            f.close()
 
 def test_suite():
     return unittest.makeSuite(PyPIRCCommandTestCase)

diff --git a/lib-python/2.7.0/test/test_deque.py b/lib-python/2.7.0/test/test_deque.py
--- a/lib-python/2.7.0/test/test_deque.py
+++ b/lib-python/2.7.0/test/test_deque.py
@@ -234,7 +234,7 @@
             d = deque(data[:i])
             r = d.reverse()
             self.assertEqual(list(d), list(reversed(data[:i])))
-            self.assert_(r is None)
+            self.assertIs(r, None)
             d.reverse()
             self.assertEqual(list(d), data[:i])
         self.assertRaises(TypeError, d.reverse, 1)          # Arity is zero

diff --git a/lib-python/2.7.0/pydoc.py b/lib-python/2.7.0/pydoc.py
--- a/lib-python/2.7.0/pydoc.py
+++ b/lib-python/2.7.0/pydoc.py
@@ -37,7 +37,7 @@
 __author__ = "Ka-Ping Yee <ping at lfw.org>"
 __date__ = "26 February 2001"
 
-__version__ = "$Revision: 84174 $"
+__version__ = "$Revision$"
 __credits__ = """Guido van Rossum, for an excellent programming language.
 Tommy Burnette, the original creator of manpy.
 Paul Prescod, for all his work on onlinehelp.

diff --git a/lib-python/2.7.0/test/test__locale.py b/lib-python/2.7.0/test/test__locale.py
--- a/lib-python/2.7.0/test/test__locale.py
+++ b/lib-python/2.7.0/test/test__locale.py
@@ -59,7 +59,7 @@
         known_value = known_numerics.get(used_locale,
                                     ('', ''))[data_type == 'thousands_sep']
         if known_value and calc_value:
-            self.assertEquals(calc_value, known_value,
+            self.assertEqual(calc_value, known_value,
                                 self.lc_numeric_err_msg % (
                                     calc_value, known_value,
                                     calc_type, data_type, set_locale,
@@ -103,7 +103,7 @@
                     set_locale = setlocale(LC_NUMERIC)
                 except Error:
                     set_locale = "<not able to determine>"
-                self.assertEquals(nl_radixchar, li_radixchar,
+                self.assertEqual(nl_radixchar, li_radixchar,
                                 "%s (nl_langinfo) != %s (localeconv) "
                                 "(set to %s, using %s)" % (
                                                 nl_radixchar, li_radixchar,
@@ -122,9 +122,9 @@
             if loc == 'eu_ES' and localeconv()['decimal_point'] == "' ":
                 continue
 
-            self.assertEquals(int(eval('3.14') * 100), 314,
+            self.assertEqual(int(eval('3.14') * 100), 314,
                                 "using eval('3.14') failed for %s" % loc)
-            self.assertEquals(int(float('3.14') * 100), 314,
+            self.assertEqual(int(float('3.14') * 100), 314,
                                 "using float('3.14') failed for %s" % loc)
             if localeconv()['decimal_point'] != '.':
                 self.assertRaises(ValueError, float,

diff --git a/lib-python/2.7.0/distutils/command/bdist_dumb.py b/lib-python/2.7.0/distutils/command/bdist_dumb.py
--- a/lib-python/2.7.0/distutils/command/bdist_dumb.py
+++ b/lib-python/2.7.0/distutils/command/bdist_dumb.py
@@ -4,7 +4,7 @@
 distribution -- i.e., just an archive to be unpacked under $prefix or
 $exec_prefix)."""
 
-__revision__ = "$Id: bdist_dumb.py 77761 2010-01-26 22:46:15Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 

diff --git a/lib-python/2.7.0/tarfile.py b/lib-python/2.7.0/tarfile.py
--- a/lib-python/2.7.0/tarfile.py
+++ b/lib-python/2.7.0/tarfile.py
@@ -30,13 +30,13 @@
 """Read from and write to tar format archives.
 """
 
-__version__ = "$Revision: 85213 $"
+__version__ = "$Revision$"
 # $Source$
 
 version     = "0.9.0"
 __author__  = "Lars Gust&#65533;bel (lars at gustaebel.de)"
-__date__    = "$Date: 2010-10-04 17:37:53 +0200 (Mon, 04 Oct 2010) $"
-__cvsid__   = "$Id: tarfile.py 85213 2010-10-04 15:37:53Z lars.gustaebel $"
+__date__    = "$Date$"
+__cvsid__   = "$Id$"
 __credits__ = "Gustavo Niemeyer, Niels Gust&#65533;bel, Richard Townsend."
 
 #---------

diff --git a/lib-python/2.7.0/json/tests/test_recursion.py b/lib-python/2.7.0/json/tests/test_recursion.py
--- a/lib-python/2.7.0/json/tests/test_recursion.py
+++ b/lib-python/2.7.0/json/tests/test_recursion.py
@@ -57,7 +57,7 @@
 
     def test_defaultrecursion(self):
         enc = RecursiveJSONEncoder()
-        self.assertEquals(enc.encode(JSONTestObject), '"JSONTestObject"')
+        self.assertEqual(enc.encode(JSONTestObject), '"JSONTestObject"')
         enc.recurse = True
         try:
             enc.encode(JSONTestObject)

diff --git a/lib-python/2.7.0/test/test_codecs.py b/lib-python/2.7.0/test/test_codecs.py
--- a/lib-python/2.7.0/test/test_codecs.py
+++ b/lib-python/2.7.0/test/test_codecs.py
@@ -267,7 +267,7 @@
         # try to read it back
         s = StringIO.StringIO(d)
         f = reader(s)
-        self.assertEquals(f.read(), u"spamspam")
+        self.assertEqual(f.read(), u"spamspam")
 
     def test_badbom(self):
         s = StringIO.StringIO(4*"\xff")
@@ -425,7 +425,7 @@
         # try to read it back
         s = StringIO.StringIO(d)
         f = reader(s)
-        self.assertEquals(f.read(), u"spamspam")
+        self.assertEqual(f.read(), u"spamspam")
 
     def test_badbom(self):
         s = StringIO.StringIO("\xff\xff")
@@ -673,7 +673,7 @@
 
 class EscapeDecodeTest(unittest.TestCase):
     def test_empty(self):
-        self.assertEquals(codecs.escape_decode(""), ("", 0))
+        self.assertEqual(codecs.escape_decode(""), ("", 0))
 
 class RecodingTest(unittest.TestCase):
     def test_recoding(self):
@@ -800,11 +800,11 @@
             # code produces only lower case. Converting just puny to
             # lower is also insufficient, since some of the input characters
             # are upper case.
-            self.assertEquals(uni.encode("punycode").lower(), puny.lower())
+            self.assertEqual(uni.encode("punycode").lower(), puny.lower())
 
     def test_decode(self):
         for uni, puny in punycode_testcases:
-            self.assertEquals(uni, puny.decode("punycode"))
+            self.assertEqual(uni, puny.decode("punycode"))
 
 class UnicodeInternalTest(unittest.TestCase):
     def test_bug1251300(self):
@@ -826,7 +826,7 @@
             for internal, uni in ok:
                 if sys.byteorder == "little":
                     internal = "".join(reversed(internal))
-                self.assertEquals(uni, internal.decode("unicode_internal"))
+                self.assertEqual(uni, internal.decode("unicode_internal"))
             for internal in not_ok:
                 if sys.byteorder == "little":
                     internal = "".join(reversed(internal))
@@ -838,10 +838,10 @@
             try:
                 "\x00\x00\x00\x00\x00\x11\x11\x00".decode("unicode_internal")
             except UnicodeDecodeError, ex:
-                self.assertEquals("unicode_internal", ex.encoding)
-                self.assertEquals("\x00\x00\x00\x00\x00\x11\x11\x00", ex.object)
-                self.assertEquals(4, ex.start)
-                self.assertEquals(8, ex.end)
+                self.assertEqual("unicode_internal", ex.encoding)
+                self.assertEqual("\x00\x00\x00\x00\x00\x11\x11\x00", ex.object)
+                self.assertEqual(4, ex.start)
+                self.assertEqual(8, ex.end)
             else:
                 self.fail()
 
@@ -852,16 +852,16 @@
             ab = u"ab".encode("unicode_internal")
             ignored = decoder("%s\x22\x22\x22\x22%s" % (ab[:4], ab[4:]),
                 "UnicodeInternalTest")
-            self.assertEquals((u"ab", 12), ignored)
+            self.assertEqual((u"ab", 12), ignored)
 
     def test_encode_length(self):
         # Issue 3739
         encoder = codecs.getencoder("unicode_internal")
-        self.assertEquals(encoder(u"a")[1], 1)
-        self.assertEquals(encoder(u"\xe9\u0142")[1], 2)
+        self.assertEqual(encoder(u"a")[1], 1)
+        self.assertEqual(encoder(u"\xe9\u0142")[1], 2)
 
         encoder = codecs.getencoder("string-escape")
-        self.assertEquals(encoder(r'\x00')[1], 4)
+        self.assertEqual(encoder(r'\x00')[1], 4)
 
 # From http://www.gnu.org/software/libidn/draft-josefsson-idn-test-vectors.html
 nameprep_tests = [
@@ -1032,102 +1032,102 @@
             else:
                 prepped = unicode(prepped, "utf-8")
                 try:
-                    self.assertEquals(nameprep(orig), prepped)
+                    self.assertEqual(nameprep(orig), prepped)
                 except Exception,e:
                     raise test_support.TestFailed("Test 3.%d: %s" % (pos+1, str(e)))
 
 class IDNACodecTest(unittest.TestCase):
     def test_builtin_decode(self):
-        self.assertEquals(unicode("python.org", "idna"), u"python.org")
-        self.assertEquals(unicode("python.org.", "idna"), u"python.org.")
-        self.assertEquals(unicode("xn--pythn-mua.org", "idna"), u"pyth\xf6n.org")
-        self.assertEquals(unicode("xn--pythn-mua.org.", "idna"), u"pyth\xf6n.org.")
+        self.assertEqual(unicode("python.org", "idna"), u"python.org")
+        self.assertEqual(unicode("python.org.", "idna"), u"python.org.")
+        self.assertEqual(unicode("xn--pythn-mua.org", "idna"), u"pyth\xf6n.org")
+        self.assertEqual(unicode("xn--pythn-mua.org.", "idna"), u"pyth\xf6n.org.")
 
     def test_builtin_encode(self):
-        self.assertEquals(u"python.org".encode("idna"), "python.org")
-        self.assertEquals("python.org.".encode("idna"), "python.org.")
-        self.assertEquals(u"pyth\xf6n.org".encode("idna"), "xn--pythn-mua.org")
-        self.assertEquals(u"pyth\xf6n.org.".encode("idna"), "xn--pythn-mua.org.")
+        self.assertEqual(u"python.org".encode("idna"), "python.org")
+        self.assertEqual("python.org.".encode("idna"), "python.org.")
+        self.assertEqual(u"pyth\xf6n.org".encode("idna"), "xn--pythn-mua.org")
+        self.assertEqual(u"pyth\xf6n.org.".encode("idna"), "xn--pythn-mua.org.")
 
     def test_stream(self):
         import StringIO
         r = codecs.getreader("idna")(StringIO.StringIO("abc"))
         r.read(3)
-        self.assertEquals(r.read(), u"")
+        self.assertEqual(r.read(), u"")
 
     def test_incremental_decode(self):
-        self.assertEquals(
+        self.assertEqual(
             "".join(codecs.iterdecode("python.org", "idna")),
             u"python.org"
         )
-        self.assertEquals(
+        self.assertEqual(
             "".join(codecs.iterdecode("python.org.", "idna")),
             u"python.org."
         )
-        self.assertEquals(
+        self.assertEqual(
             "".join(codecs.iterdecode("xn--pythn-mua.org.", "idna")),
             u"pyth\xf6n.org."
         )
-        self.assertEquals(
+        self.assertEqual(
             "".join(codecs.iterdecode("xn--pythn-mua.org.", "idna")),
             u"pyth\xf6n.org."
         )
 
         decoder = codecs.getincrementaldecoder("idna")()
-        self.assertEquals(decoder.decode("xn--xam", ), u"")
-        self.assertEquals(decoder.decode("ple-9ta.o", ), u"\xe4xample.")
-        self.assertEquals(decoder.decode(u"rg"), u"")
-        self.assertEquals(decoder.decode(u"", True), u"org")
+        self.assertEqual(decoder.decode("xn--xam", ), u"")
+        self.assertEqual(decoder.decode("ple-9ta.o", ), u"\xe4xample.")
+        self.assertEqual(decoder.decode(u"rg"), u"")
+        self.assertEqual(decoder.decode(u"", True), u"org")
 
         decoder.reset()
-        self.assertEquals(decoder.decode("xn--xam", ), u"")
-        self.assertEquals(decoder.decode("ple-9ta.o", ), u"\xe4xample.")
-        self.assertEquals(decoder.decode("rg."), u"org.")
-        self.assertEquals(decoder.decode("", True), u"")
+        self.assertEqual(decoder.decode("xn--xam", ), u"")
+        self.assertEqual(decoder.decode("ple-9ta.o", ), u"\xe4xample.")
+        self.assertEqual(decoder.decode("rg."), u"org.")
+        self.assertEqual(decoder.decode("", True), u"")
 
     def test_incremental_encode(self):
-        self.assertEquals(
+        self.assertEqual(
             "".join(codecs.iterencode(u"python.org", "idna")),
             "python.org"
         )
-        self.assertEquals(
+        self.assertEqual(
             "".join(codecs.iterencode(u"python.org.", "idna")),
             "python.org."
         )
-        self.assertEquals(
+        self.assertEqual(
             "".join(codecs.iterencode(u"pyth\xf6n.org.", "idna")),
             "xn--pythn-mua.org."
         )
-        self.assertEquals(
+        self.assertEqual(
             "".join(codecs.iterencode(u"pyth\xf6n.org.", "idna")),
             "xn--pythn-mua.org."
         )
 
         encoder = codecs.getincrementalencoder("idna")()
-        self.assertEquals(encoder.encode(u"\xe4x"), "")
-        self.assertEquals(encoder.encode(u"ample.org"), "xn--xample-9ta.")
-        self.assertEquals(encoder.encode(u"", True), "org")
+        self.assertEqual(encoder.encode(u"\xe4x"), "")
+        self.assertEqual(encoder.encode(u"ample.org"), "xn--xample-9ta.")
+        self.assertEqual(encoder.encode(u"", True), "org")
 
         encoder.reset()
-        self.assertEquals(encoder.encode(u"\xe4x"), "")
-        self.assertEquals(encoder.encode(u"ample.org."), "xn--xample-9ta.org.")
-        self.assertEquals(encoder.encode(u"", True), "")
+        self.assertEqual(encoder.encode(u"\xe4x"), "")
+        self.assertEqual(encoder.encode(u"ample.org."), "xn--xample-9ta.org.")
+        self.assertEqual(encoder.encode(u"", True), "")
 
 class CodecsModuleTest(unittest.TestCase):
 
     def test_decode(self):
-        self.assertEquals(codecs.decode('\xe4\xf6\xfc', 'latin-1'),
+        self.assertEqual(codecs.decode('\xe4\xf6\xfc', 'latin-1'),
                           u'\xe4\xf6\xfc')
         self.assertRaises(TypeError, codecs.decode)
-        self.assertEquals(codecs.decode('abc'), u'abc')
+        self.assertEqual(codecs.decode('abc'), u'abc')
         self.assertRaises(UnicodeDecodeError, codecs.decode, '\xff', 'ascii')
 
     def test_encode(self):
-        self.assertEquals(codecs.encode(u'\xe4\xf6\xfc', 'latin-1'),
+        self.assertEqual(codecs.encode(u'\xe4\xf6\xfc', 'latin-1'),
                           '\xe4\xf6\xfc')
         self.assertRaises(TypeError, codecs.encode)
         self.assertRaises(LookupError, codecs.encode, "foo", "__spam__")
-        self.assertEquals(codecs.encode(u'abc'), 'abc')
+        self.assertEqual(codecs.encode(u'abc'), 'abc')
         self.assertRaises(UnicodeEncodeError, codecs.encode, u'\xffff', 'ascii')
 
     def test_register(self):
@@ -1163,19 +1163,19 @@
 
     def test_readlines(self):
         f = self.reader(self.stream)
-        self.assertEquals(f.readlines(), [u'\ud55c\n', u'\uae00'])
+        self.assertEqual(f.readlines(), [u'\ud55c\n', u'\uae00'])
 
 class EncodedFileTest(unittest.TestCase):
 
     def test_basic(self):
         f = StringIO.StringIO('\xed\x95\x9c\n\xea\xb8\x80')
         ef = codecs.EncodedFile(f, 'utf-16-le', 'utf-8')
-        self.assertEquals(ef.read(), '\\\xd5\n\x00\x00\xae')
+        self.assertEqual(ef.read(), '\\\xd5\n\x00\x00\xae')
 
         f = StringIO.StringIO()
         ef = codecs.EncodedFile(f, 'utf-8', 'latin1')
         ef.write('\xc3\xbc')
-        self.assertEquals(f.getvalue(), '\xfc')
+        self.assertEqual(f.getvalue(), '\xfc')
 
 class Str2StrTest(unittest.TestCase):
 
@@ -1478,33 +1478,33 @@
 
 class CharmapTest(unittest.TestCase):
     def test_decode_with_string_map(self):
-        self.assertEquals(
+        self.assertEqual(
             codecs.charmap_decode("\x00\x01\x02", "strict", u"abc"),
             (u"abc", 3)
         )
 
-        self.assertEquals(
+        self.assertEqual(
             codecs.charmap_decode("\x00\x01\x02", "replace", u"ab"),
             (u"ab\ufffd", 3)
         )
 
-        self.assertEquals(
+        self.assertEqual(
             codecs.charmap_decode("\x00\x01\x02", "replace", u"ab\ufffe"),
             (u"ab\ufffd", 3)
         )
 
-        self.assertEquals(
+        self.assertEqual(
             codecs.charmap_decode("\x00\x01\x02", "ignore", u"ab"),
             (u"ab", 3)
         )
 
-        self.assertEquals(
+        self.assertEqual(
             codecs.charmap_decode("\x00\x01\x02", "ignore", u"ab\ufffe"),
             (u"ab", 3)
         )
 
         allbytes = "".join(chr(i) for i in xrange(256))
-        self.assertEquals(
+        self.assertEqual(
             codecs.charmap_decode(allbytes, "ignore", u""),
             (u"", len(allbytes))
         )
@@ -1513,14 +1513,14 @@
     def test_encodedfile(self):
         f = StringIO.StringIO("\xc3\xbc")
         with codecs.EncodedFile(f, "latin-1", "utf-8") as ef:
-            self.assertEquals(ef.read(), "\xfc")
+            self.assertEqual(ef.read(), "\xfc")
 
     def test_streamreaderwriter(self):
         f = StringIO.StringIO("\xc3\xbc")
         info = codecs.lookup("utf-8")
         with codecs.StreamReaderWriter(f, info.streamreader,
                                        info.streamwriter, 'strict') as srw:
-            self.assertEquals(srw.read(), u"\xfc")
+            self.assertEqual(srw.read(), u"\xfc")
 
 
 class BomTest(unittest.TestCase):
@@ -1538,27 +1538,27 @@
                 f.write(data)
                 f.write(data)
                 f.seek(0)
-                self.assertEquals(f.read(), data * 2)
+                self.assertEqual(f.read(), data * 2)
                 f.seek(0)
-                self.assertEquals(f.read(), data * 2)
+                self.assertEqual(f.read(), data * 2)
 
             # Check that the BOM is written after a seek(0)
             with codecs.open(test_support.TESTFN, 'w+', encoding=encoding) as f:
                 f.write(data[0])
-                self.assertNotEquals(f.tell(), 0)
+                self.assertNotEqual(f.tell(), 0)
                 f.seek(0)
                 f.write(data)
                 f.seek(0)
-                self.assertEquals(f.read(), data)
+                self.assertEqual(f.read(), data)
 
             # (StreamWriter) Check that the BOM is written after a seek(0)
             with codecs.open(test_support.TESTFN, 'w+', encoding=encoding) as f:
                 f.writer.write(data[0])
-                self.assertNotEquals(f.writer.tell(), 0)
+                self.assertNotEqual(f.writer.tell(), 0)
                 f.writer.seek(0)
                 f.writer.write(data)
                 f.seek(0)
-                self.assertEquals(f.read(), data)
+                self.assertEqual(f.read(), data)
 
             # Check that the BOM is not written after a seek() at a position
             # different than the start
@@ -1567,7 +1567,7 @@
                 f.seek(f.tell())
                 f.write(data)
                 f.seek(0)
-                self.assertEquals(f.read(), data * 2)
+                self.assertEqual(f.read(), data * 2)
 
             # (StreamWriter) Check that the BOM is not written after a seek()
             # at a position different than the start
@@ -1576,7 +1576,7 @@
                 f.writer.seek(f.writer.tell())
                 f.writer.write(data)
                 f.seek(0)
-                self.assertEquals(f.read(), data * 2)
+                self.assertEqual(f.read(), data * 2)
 
 
 def test_main():

diff --git a/lib-python/2.7.0/test/test_shutil.py b/lib-python/2.7.0/test/test_shutil.py
--- a/lib-python/2.7.0/test/test_shutil.py
+++ b/lib-python/2.7.0/test/test_shutil.py
@@ -431,7 +431,7 @@
 
         self.assertTrue(os.path.exists(tarball2))
         # let's compare both tarballs
-        self.assertEquals(self._tarinfo(tarball), self._tarinfo(tarball2))
+        self.assertEqual(self._tarinfo(tarball), self._tarinfo(tarball2))
 
         # trying an uncompressed one
         base_name = os.path.join(tmpdir2, 'archive')
@@ -469,6 +469,7 @@
 
         # check if the compressed tarball was created
         tarball = base_name + '.zip'
+        self.assertTrue(os.path.exists(tarball))
 
 
     def test_make_archive(self):
@@ -524,8 +525,8 @@
         archive = tarfile.open(archive_name)
         try:
             for member in archive.getmembers():
-                self.assertEquals(member.uid, 0)
-                self.assertEquals(member.gid, 0)
+                self.assertEqual(member.uid, 0)
+                self.assertEqual(member.gid, 0)
         finally:
             archive.close()
 
@@ -540,7 +541,7 @@
                 make_archive('xxx', 'xxx', root_dir=self.mkdtemp())
             except Exception:
                 pass
-            self.assertEquals(os.getcwd(), current_dir)
+            self.assertEqual(os.getcwd(), current_dir)
         finally:
             unregister_archive_format('xxx')
 

diff --git a/lib-python/2.7.0/bsddb/dbtables.py b/lib-python/2.7.0/bsddb/dbtables.py
--- a/lib-python/2.7.0/bsddb/dbtables.py
+++ b/lib-python/2.7.0/bsddb/dbtables.py
@@ -15,7 +15,7 @@
 # This provides a simple database table interface built on top of
 # the Python Berkeley DB 3 interface.
 #
-_cvsid = '$Id: dbtables.py 79285 2010-03-22 14:22:26Z jesus.cea $'
+_cvsid = '$Id$'
 
 import re
 import sys

diff --git a/lib-python/2.7.0/distutils/emxccompiler.py b/lib-python/2.7.0/distutils/emxccompiler.py
--- a/lib-python/2.7.0/distutils/emxccompiler.py
+++ b/lib-python/2.7.0/distutils/emxccompiler.py
@@ -19,7 +19,7 @@
 #
 # * EMX gcc 2.81/EMX 0.9d fix03
 
-__revision__ = "$Id: emxccompiler.py 78666 2010-03-05 00:16:02Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os,sys,copy
 from distutils.ccompiler import gen_preprocess_options, gen_lib_options
@@ -272,8 +272,10 @@
         # It would probably better to read single lines to search.
         # But we do this only once, and it is fast enough
         f = open(fn)
-        s = f.read()
-        f.close()
+        try:
+            s = f.read()
+        finally:
+            f.close()
 
     except IOError, exc:
         # if we can't read this file, we cannot say it is wrong
@@ -300,8 +302,10 @@
     gcc_exe = find_executable('gcc')
     if gcc_exe:
         out = os.popen(gcc_exe + ' -dumpversion','r')
-        out_string = out.read()
-        out.close()
+        try:
+            out_string = out.read()
+        finally:
+            out.close()
         result = re.search('(\d+\.\d+\.\d+)',out_string)
         if result:
             gcc_version = StrictVersion(result.group(1))

diff --git a/lib-python/2.7.0/distutils/archive_util.py b/lib-python/2.7.0/distutils/archive_util.py
--- a/lib-python/2.7.0/distutils/archive_util.py
+++ b/lib-python/2.7.0/distutils/archive_util.py
@@ -3,7 +3,7 @@
 Utility functions for creating archive files (tarballs, zip files,
 that sort of thing)."""
 
-__revision__ = "$Id: archive_util.py 75659 2009-10-24 13:29:44Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 from warnings import warn

diff --git a/lib-python/2.7.0/distutils/bcppcompiler.py b/lib-python/2.7.0/distutils/bcppcompiler.py
--- a/lib-python/2.7.0/distutils/bcppcompiler.py
+++ b/lib-python/2.7.0/distutils/bcppcompiler.py
@@ -11,7 +11,7 @@
 # someone should sit down and factor out the common code as
 # WindowsCCompiler!  --GPW
 
-__revision__ = "$Id: bcppcompiler.py 76956 2009-12-21 01:22:46Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 

diff --git a/lib-python/2.7.0/test/test_signal.py b/lib-python/2.7.0/test/test_signal.py
--- a/lib-python/2.7.0/test/test_signal.py
+++ b/lib-python/2.7.0/test/test_signal.py
@@ -203,10 +203,10 @@
 
     def test_getsignal(self):
         hup = signal.signal(signal.SIGHUP, self.trivial_signal_handler)
-        self.assertEquals(signal.getsignal(signal.SIGHUP),
-                          self.trivial_signal_handler)
+        self.assertEqual(signal.getsignal(signal.SIGHUP),
+                         self.trivial_signal_handler)
         signal.signal(signal.SIGHUP, hup)
-        self.assertEquals(signal.getsignal(signal.SIGHUP), hup)
+        self.assertEqual(signal.getsignal(signal.SIGHUP), hup)
 
 
 @unittest.skipUnless(sys.platform == "win32", "Windows specific")
@@ -456,9 +456,9 @@
                           "high")
 
         # virtual itimer should be (0.0, 0.0) now
-        self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))
+        self.assertEqual(signal.getitimer(self.itimer), (0.0, 0.0))
         # and the handler should have been called
-        self.assertEquals(self.hndl_called, True)
+        self.assertEqual(self.hndl_called, True)
 
     # Issue 3864. Unknown if this affects earlier versions of freebsd also.
     @unittest.skipIf(sys.platform=='freebsd6',
@@ -479,7 +479,7 @@
                           "high")
 
         # profiling itimer should be (0.0, 0.0) now
-        self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))
+        self.assertEqual(signal.getitimer(self.itimer), (0.0, 0.0))
         # and the handler should have been called
         self.assertEqual(self.hndl_called, True)
 

diff --git a/lib-python/2.7.0/idlelib/idle.bat b/lib-python/2.7.0/idlelib/idle.bat
--- a/lib-python/2.7.0/idlelib/idle.bat
+++ b/lib-python/2.7.0/idlelib/idle.bat
@@ -1,3 +1,4 @@
 @echo off
-rem Working IDLE bat for Windows - uses start instead of absolute pathname
-start idle.pyw %1 %2 %3 %4 %5 %6 %7 %8 %9
+rem Start IDLE using the appropriate Python interpreter
+set CURRDIR=%~dp0
+start "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9

diff --git a/lib-python/2.7.0/idlelib/idlever.py b/lib-python/2.7.0/idlelib/idlever.py
--- a/lib-python/2.7.0/idlelib/idlever.py
+++ b/lib-python/2.7.0/idlelib/idlever.py
@@ -1,1 +1,1 @@
-IDLE_VERSION = "2.7.1a0"
+IDLE_VERSION = "2.7.1"

diff --git a/lib-python/2.7.0/bsddb/test/test_cursor_pget_bug.py b/lib-python/2.7.0/bsddb/test/test_cursor_pget_bug.py
--- a/lib-python/2.7.0/bsddb/test/test_cursor_pget_bug.py
+++ b/lib-python/2.7.0/bsddb/test/test_cursor_pget_bug.py
@@ -37,12 +37,12 @@
     def test_pget(self):
         cursor = self.secondary_db.cursor()
 
-        self.assertEquals(('eggs', 'salad', 'eggs'), cursor.pget(key='eggs', flags=db.DB_SET))
-        self.assertEquals(('eggs', 'omelet', 'eggs'), cursor.pget(db.DB_NEXT_DUP))
-        self.assertEquals(None, cursor.pget(db.DB_NEXT_DUP))
+        self.assertEqual(('eggs', 'salad', 'eggs'), cursor.pget(key='eggs', flags=db.DB_SET))
+        self.assertEqual(('eggs', 'omelet', 'eggs'), cursor.pget(db.DB_NEXT_DUP))
+        self.assertEqual(None, cursor.pget(db.DB_NEXT_DUP))
 
-        self.assertEquals(('ham', 'spam', 'ham'), cursor.pget('ham', 'spam', flags=db.DB_SET))
-        self.assertEquals(None, cursor.pget(db.DB_NEXT_DUP))
+        self.assertEqual(('ham', 'spam', 'ham'), cursor.pget('ham', 'spam', flags=db.DB_SET))
+        self.assertEqual(None, cursor.pget(db.DB_NEXT_DUP))
 
         cursor.close()
 

diff --git a/lib-python/2.7.0/distutils/tests/test_install_lib.py b/lib-python/2.7.0/distutils/tests/test_install_lib.py
--- a/lib-python/2.7.0/distutils/tests/test_install_lib.py
+++ b/lib-python/2.7.0/distutils/tests/test_install_lib.py
@@ -18,8 +18,8 @@
         cmd = install_lib(dist)
 
         cmd.finalize_options()
-        self.assertEquals(cmd.compile, 1)
-        self.assertEquals(cmd.optimize, 0)
+        self.assertEqual(cmd.compile, 1)
+        self.assertEqual(cmd.optimize, 0)
 
         # optimize must be 0, 1, or 2
         cmd.optimize = 'foo'
@@ -29,7 +29,7 @@
 
         cmd.optimize = '2'
         cmd.finalize_options()
-        self.assertEquals(cmd.optimize, 2)
+        self.assertEqual(cmd.optimize, 2)
 
     def _setup_byte_compile(self):
         pkg_dir, dist = self.create_dist()
@@ -81,7 +81,7 @@
         cmd.distribution.script_name = 'setup.py'
 
         # get_input should return 2 elements
-        self.assertEquals(len(cmd.get_inputs()), 2)
+        self.assertEqual(len(cmd.get_inputs()), 2)
 
     def test_dont_write_bytecode(self):
         # makes sure byte_compile is not used

diff --git a/lib-python/2.7.0/test/test_array.py b/lib-python/2.7.0/test/test_array.py
--- a/lib-python/2.7.0/test/test_array.py
+++ b/lib-python/2.7.0/test/test_array.py
@@ -628,11 +628,11 @@
                     data.reverse()
                     L[start:stop:step] = data
                     a[start:stop:step] = array.array(self.typecode, data)
-                    self.assertEquals(a, array.array(self.typecode, L))
+                    self.assertEqual(a, array.array(self.typecode, L))
 
                     del L[start:stop:step]
                     del a[start:stop:step]
-                    self.assertEquals(a, array.array(self.typecode, L))
+                    self.assertEqual(a, array.array(self.typecode, L))
 
     def test_index(self):
         example = 2*self.example

diff --git a/lib-python/2.7.0/distutils/tests/test_bdist_dumb.py b/lib-python/2.7.0/distutils/tests/test_bdist_dumb.py
--- a/lib-python/2.7.0/distutils/tests/test_bdist_dumb.py
+++ b/lib-python/2.7.0/distutils/tests/test_bdist_dumb.py
@@ -78,7 +78,7 @@
             base = base.replace(':', '-')
 
         wanted = ['%s.zip' % base]
-        self.assertEquals(dist_created, wanted)
+        self.assertEqual(dist_created, wanted)
 
         # now let's check what we have in the zip file
         # XXX to be done
@@ -87,16 +87,16 @@
         pkg_dir, dist = self.create_dist()
         os.chdir(pkg_dir)
         cmd = bdist_dumb(dist)
-        self.assertEquals(cmd.bdist_dir, None)
+        self.assertEqual(cmd.bdist_dir, None)
         cmd.finalize_options()
 
         # bdist_dir is initialized to bdist_base/dumb if not set
         base = cmd.get_finalized_command('bdist').bdist_base
-        self.assertEquals(cmd.bdist_dir, os.path.join(base, 'dumb'))
+        self.assertEqual(cmd.bdist_dir, os.path.join(base, 'dumb'))
 
         # the format is set to a default value depending on the os.name
         default = cmd.default_format[os.name]
-        self.assertEquals(cmd.format, default)
+        self.assertEqual(cmd.format, default)
 
 def test_suite():
     return unittest.makeSuite(BuildDumbTestCase)

diff --git a/lib-python/2.7.0/distutils/tests/test_build_py.py b/lib-python/2.7.0/distutils/tests/test_build_py.py
--- a/lib-python/2.7.0/distutils/tests/test_build_py.py
+++ b/lib-python/2.7.0/distutils/tests/test_build_py.py
@@ -19,11 +19,15 @@
     def _setup_package_data(self):
         sources = self.mkdtemp()
         f = open(os.path.join(sources, "__init__.py"), "w")
-        f.write("# Pretend this is a package.")
-        f.close()
+        try:
+            f.write("# Pretend this is a package.")
+        finally:
+            f.close()
         f = open(os.path.join(sources, "README.txt"), "w")
-        f.write("Info about this package")
-        f.close()
+        try:
+            f.write("Info about this package")
+        finally:
+            f.close()
 
         destination = self.mkdtemp()
 

diff --git a/lib-python/2.7.0/distutils/tests/test_check.py b/lib-python/2.7.0/distutils/tests/test_check.py
--- a/lib-python/2.7.0/distutils/tests/test_check.py
+++ b/lib-python/2.7.0/distutils/tests/test_check.py
@@ -26,7 +26,7 @@
         # by default, check is checking the metadata
         # should have some warnings
         cmd = self._run()
-        self.assertEquals(cmd._warnings, 2)
+        self.assertEqual(cmd._warnings, 2)
 
         # now let's add the required fields
         # and run it again, to make sure we don't get
@@ -35,7 +35,7 @@
                     'author_email': 'xxx',
                     'name': 'xxx', 'version': 'xxx'}
         cmd = self._run(metadata)
-        self.assertEquals(cmd._warnings, 0)
+        self.assertEqual(cmd._warnings, 0)
 
         # now with the strict mode, we should
         # get an error if there are missing metadata
@@ -43,7 +43,7 @@
 
         # and of course, no error when all metadata are present
         cmd = self._run(metadata, strict=1)
-        self.assertEquals(cmd._warnings, 0)
+        self.assertEqual(cmd._warnings, 0)
 
     def test_check_document(self):
         if not HAS_DOCUTILS: # won't test without docutils
@@ -54,12 +54,12 @@
         # let's see if it detects broken rest
         broken_rest = 'title\n===\n\ntest'
         msgs = cmd._check_rst_data(broken_rest)
-        self.assertEquals(len(msgs), 1)
+        self.assertEqual(len(msgs), 1)
 
         # and non-broken rest
         rest = 'title\n=====\n\ntest'
         msgs = cmd._check_rst_data(rest)
-        self.assertEquals(len(msgs), 0)
+        self.assertEqual(len(msgs), 0)
 
     def test_check_restructuredtext(self):
         if not HAS_DOCUTILS: # won't test without docutils
@@ -69,7 +69,7 @@
         pkg_info, dist = self.create_dist(long_description=broken_rest)
         cmd = check(dist)
         cmd.check_restructuredtext()
-        self.assertEquals(cmd._warnings, 1)
+        self.assertEqual(cmd._warnings, 1)
 
         # let's see if we have an error with strict=1
         metadata = {'url': 'xxx', 'author': 'xxx',
@@ -82,7 +82,7 @@
         # and non-broken rest
         metadata['long_description'] = 'title\n=====\n\ntest'
         cmd = self._run(metadata, strict=1, restructuredtext=1)
-        self.assertEquals(cmd._warnings, 0)
+        self.assertEqual(cmd._warnings, 0)
 
     def test_check_all(self):
 

diff --git a/lib-python/2.7.0/bsddb/test/test_compat.py b/lib-python/2.7.0/bsddb/test/test_compat.py
--- a/lib-python/2.7.0/bsddb/test/test_compat.py
+++ b/lib-python/2.7.0/bsddb/test/test_compat.py
@@ -119,7 +119,7 @@
             if verbose:
                 print rec
 
-        self.assert_(f.has_key('f'), 'Error, missing key!')
+        self.assertTrue(f.has_key('f'), 'Error, missing key!')
 
         # test that set_location() returns the next nearest key, value
         # on btree databases and raises KeyError on others.

diff --git a/lib-python/2.7.0/distutils/command/install_data.py b/lib-python/2.7.0/distutils/command/install_data.py
--- a/lib-python/2.7.0/distutils/command/install_data.py
+++ b/lib-python/2.7.0/distutils/command/install_data.py
@@ -5,7 +5,7 @@
 
 # contributed by Bastian Kleineidam
 
-__revision__ = "$Id: install_data.py 76849 2009-12-15 06:29:19Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 from distutils.core import Command

diff --git a/lib-python/2.7.0/test/test_imaplib.py b/lib-python/2.7.0/test/test_imaplib.py
--- a/lib-python/2.7.0/test/test_imaplib.py
+++ b/lib-python/2.7.0/test/test_imaplib.py
@@ -10,7 +10,7 @@
 import SocketServer
 import time
 
-from test_support import reap_threads, verbose
+from test_support import reap_threads, verbose, transient_internet
 import unittest
 
 try:
@@ -112,7 +112,7 @@
 
         if verbose: print "creating server"
         server = MyServer(addr, hdlr)
-        self.assertEquals(server.server_address, server.socket.getsockname())
+        self.assertEqual(server.server_address, server.socket.getsockname())
 
         if verbose:
             print "server created"
@@ -178,8 +178,46 @@
     imap_class = IMAP4_SSL
 
 
+class RemoteIMAPTest(unittest.TestCase):
+    host = 'cyrus.andrew.cmu.edu'
+    port = 143
+    username = 'anonymous'
+    password = 'pass'
+    imap_class = imaplib.IMAP4
+
+    def setUp(self):
+        with transient_internet(self.host):
+            self.server = self.imap_class(self.host, self.port)
+
+    def tearDown(self):
+        if self.server is not None:
+            self.server.logout()
+
+    def test_logincapa(self):
+        self.assertTrue('LOGINDISABLED' in self.server.capabilities)
+
+    def test_anonlogin(self):
+        self.assertTrue('AUTH=ANONYMOUS' in self.server.capabilities)
+        rs = self.server.login(self.username, self.password)
+        self.assertEqual(rs[0], 'OK')
+
+    def test_logout(self):
+        rs = self.server.logout()
+        self.server = None
+        self.assertEqual(rs[0], 'BYE')
+
+
+ at unittest.skipUnless(ssl, "SSL not available")
+class RemoteIMAP_SSLTest(RemoteIMAPTest):
+    port = 993
+    imap_class = IMAP4_SSL
+
+    def test_logincapa(self):
+        self.assertFalse('LOGINDISABLED' in self.server.capabilities)
+        self.assertTrue('AUTH=PLAIN' in self.server.capabilities)
+
+
 def test_main():
-
     tests = [TestImaplib]
 
     if support.is_resource_enabled('network'):
@@ -189,7 +227,10 @@
                                     "keycert.pem")
             if not os.path.exists(CERTFILE):
                 raise support.TestFailed("Can't read certificate files!")
-        tests.extend([ThreadedNetworkedTests, ThreadedNetworkedTestsSSL])
+        tests.extend([
+            ThreadedNetworkedTests, ThreadedNetworkedTestsSSL,
+            RemoteIMAPTest, RemoteIMAP_SSLTest,
+        ])
 
     support.run_unittest(*tests)
 

diff --git a/lib-python/2.7.0/distutils/util.py b/lib-python/2.7.0/distutils/util.py
--- a/lib-python/2.7.0/distutils/util.py
+++ b/lib-python/2.7.0/distutils/util.py
@@ -4,7 +4,7 @@
 one of the other *util.py modules.
 """
 
-__revision__ = "$Id: util.py 82791 2010-07-11 08:52:52Z ronald.oussoren $"
+__revision__ = "$Id$"
 
 import sys, os, string, re
 from distutils.errors import DistutilsPlatformError
@@ -116,13 +116,15 @@
                 # behaviour.
                 pass
             else:
-                m = re.search(
-                        r'<key>ProductUserVisibleVersion</key>\s*' +
-                        r'<string>(.*?)</string>', f.read())
-                f.close()
-                if m is not None:
-                    macrelease = '.'.join(m.group(1).split('.')[:2])
-                # else: fall back to the default behaviour
+                try:
+                    m = re.search(
+                            r'<key>ProductUserVisibleVersion</key>\s*' +
+                            r'<string>(.*?)</string>', f.read())
+                    if m is not None:
+                        macrelease = '.'.join(m.group(1).split('.')[:2])
+                    # else: fall back to the default behaviour
+                finally:
+                    f.close()
 
         if not macver:
             macver = macrelease

diff --git a/lib-python/2.7.0/bsddb/test/test_get_none.py b/lib-python/2.7.0/bsddb/test/test_get_none.py
--- a/lib-python/2.7.0/bsddb/test/test_get_none.py
+++ b/lib-python/2.7.0/bsddb/test/test_get_none.py
@@ -76,7 +76,7 @@
                 break
 
         self.assertNotEqual(rec, None)
-        self.assert_(exceptionHappened)
+        self.assertTrue(exceptionHappened)
         self.assertEqual(count, len(string.letters))
 
         c.close()

diff --git a/lib-python/2.7.0/json/tests/test_indent.py b/lib-python/2.7.0/json/tests/test_indent.py
--- a/lib-python/2.7.0/json/tests/test_indent.py
+++ b/lib-python/2.7.0/json/tests/test_indent.py
@@ -36,6 +36,6 @@
         h1 = json.loads(d1)
         h2 = json.loads(d2)
 
-        self.assertEquals(h1, h)
-        self.assertEquals(h2, h)
-        self.assertEquals(d2, expect)
+        self.assertEqual(h1, h)
+        self.assertEqual(h2, h)
+        self.assertEqual(d2, expect)

diff --git a/lib-python/2.7.0/distutils/command/__init__.py b/lib-python/2.7.0/distutils/command/__init__.py
--- a/lib-python/2.7.0/distutils/command/__init__.py
+++ b/lib-python/2.7.0/distutils/command/__init__.py
@@ -3,7 +3,7 @@
 Package containing implementation of all the standard Distutils
 commands."""
 
-__revision__ = "$Id: __init__.py 71473 2009-04-11 14:55:07Z tarek.ziade $"
+__revision__ = "$Id$"
 
 __all__ = ['build',
            'build_py',

diff --git a/lib-python/2.7.0/test/test_macos.py b/lib-python/2.7.0/test/test_macos.py
--- a/lib-python/2.7.0/test/test_macos.py
+++ b/lib-python/2.7.0/test/test_macos.py
@@ -23,8 +23,8 @@
                         test_support.TESTFN])
 
             cr, tp = MacOS.GetCreatorAndType(test_support.TESTFN)
-            self.assertEquals(tp, 'ABCD')
-            self.assertEquals(cr, 'EFGH')
+            self.assertEqual(tp, 'ABCD')
+            self.assertEqual(cr, 'EFGH')
 
         finally:
             os.unlink(test_support.TESTFN)
@@ -42,8 +42,8 @@
                     'ABCD', 'EFGH')
 
             cr, tp = MacOS.GetCreatorAndType(test_support.TESTFN)
-            self.assertEquals(cr, 'ABCD')
-            self.assertEquals(tp, 'EFGH')
+            self.assertEqual(cr, 'ABCD')
+            self.assertEqual(tp, 'EFGH')
 
             data = subprocess.Popen(["/Developer/Tools/GetFileInfo", test_support.TESTFN],
                     stdout=subprocess.PIPE).communicate()[0]
@@ -56,8 +56,8 @@
                 if ln.startswith('creator:'):
                     cr = ln.split()[-1][1:-1]
 
-            self.assertEquals(cr, 'ABCD')
-            self.assertEquals(tp, 'EFGH')
+            self.assertEqual(cr, 'ABCD')
+            self.assertEqual(tp, 'EFGH')
 
         finally:
             os.unlink(test_support.TESTFN)
@@ -77,14 +77,14 @@
             fp = open(test_support.TESTFN, 'r')
             data = fp.read()
             fp.close()
-            self.assertEquals(data, 'hello world\n')
+            self.assertEqual(data, 'hello world\n')
 
             rfp = MacOS.openrf(test_support.TESTFN, '*rb')
             data = rfp.read(100)
             data2 = rfp.read(100)
             rfp.close()
-            self.assertEquals(data, 'goodbye world\n')
-            self.assertEquals(data2, '')
+            self.assertEqual(data, 'goodbye world\n')
+            self.assertEqual(data2, '')
 
 
         finally:

diff --git a/lib-python/2.7.0/json/tests/test_decode.py b/lib-python/2.7.0/json/tests/test_decode.py
--- a/lib-python/2.7.0/json/tests/test_decode.py
+++ b/lib-python/2.7.0/json/tests/test_decode.py
@@ -9,19 +9,19 @@
     def test_decimal(self):
         rval = json.loads('1.1', parse_float=decimal.Decimal)
         self.assertTrue(isinstance(rval, decimal.Decimal))
-        self.assertEquals(rval, decimal.Decimal('1.1'))
+        self.assertEqual(rval, decimal.Decimal('1.1'))
 
     def test_float(self):
         rval = json.loads('1', parse_int=float)
         self.assertTrue(isinstance(rval, float))
-        self.assertEquals(rval, 1.0)
+        self.assertEqual(rval, 1.0)
 
     def test_decoder_optimizations(self):
         # Several optimizations were made that skip over calls to
         # the whitespace regex, so this test is designed to try and
         # exercise the uncommon cases. The array cases are already covered.
         rval = json.loads('{   "key"    :    "value"    ,  "k":"v"    }')
-        self.assertEquals(rval, {"key":"value", "k":"v"})
+        self.assertEqual(rval, {"key":"value", "k":"v"})
 
     def test_object_pairs_hook(self):
         s = '{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}'

diff --git a/lib-python/2.7.0/distutils/command/install_headers.py b/lib-python/2.7.0/distutils/command/install_headers.py
--- a/lib-python/2.7.0/distutils/command/install_headers.py
+++ b/lib-python/2.7.0/distutils/command/install_headers.py
@@ -3,7 +3,7 @@
 Implements the Distutils 'install_headers' command, to install C/C++ header
 files to the Python include directory."""
 
-__revision__ = "$Id: install_headers.py 70891 2009-03-31 20:55:21Z tarek.ziade $"
+__revision__ = "$Id$"
 
 from distutils.core import Command
 

diff --git a/lib-python/2.7.0/bsddb/test/test_misc.py b/lib-python/2.7.0/bsddb/test/test_misc.py
--- a/lib-python/2.7.0/bsddb/test/test_misc.py
+++ b/lib-python/2.7.0/bsddb/test/test_misc.py
@@ -32,7 +32,7 @@
     def test02_db_home(self):
         env = db.DBEnv()
         # check for crash fixed when db_home is used before open()
-        self.assert_(env.db_home is None)
+        self.assertTrue(env.db_home is None)
         env.open(self.homeDir, db.DB_CREATE)
         if sys.version_info[0] < 3 :
             self.assertEqual(self.homeDir, env.db_home)
@@ -43,7 +43,7 @@
         db = hashopen(self.filename)
         db.close()
         rp = repr(db)
-        self.assertEquals(rp, "{}")
+        self.assertEqual(rp, "{}")
 
     def test04_repr_db(self) :
         db = hashopen(self.filename)
@@ -54,7 +54,7 @@
         db.close()
         db = hashopen(self.filename)
         rp = repr(db)
-        self.assertEquals(rp, repr(d))
+        self.assertEqual(rp, repr(d))
         db.close()
 
     # http://sourceforge.net/tracker/index.php?func=detail&aid=1708868&group_id=13900&atid=313900

diff --git a/lib-python/2.7.0/distutils/tests/test_install_headers.py b/lib-python/2.7.0/distutils/tests/test_install_headers.py
--- a/lib-python/2.7.0/distutils/tests/test_install_headers.py
+++ b/lib-python/2.7.0/distutils/tests/test_install_headers.py
@@ -23,7 +23,7 @@
 
         pkg_dir, dist = self.create_dist(headers=headers)
         cmd = install_headers(dist)
-        self.assertEquals(cmd.get_inputs(), headers)
+        self.assertEqual(cmd.get_inputs(), headers)
 
         # let's run the command
         cmd.install_dir = os.path.join(pkg_dir, 'inst')
@@ -31,7 +31,7 @@
         cmd.run()
 
         # let's check the results
-        self.assertEquals(len(cmd.get_outputs()), 2)
+        self.assertEqual(len(cmd.get_outputs()), 2)
 
 def test_suite():
     return unittest.makeSuite(InstallHeadersTestCase)

diff --git a/lib-python/2.7.0/test/test_telnetlib.py b/lib-python/2.7.0/test/test_telnetlib.py
--- a/lib-python/2.7.0/test/test_telnetlib.py
+++ b/lib-python/2.7.0/test/test_telnetlib.py
@@ -38,6 +38,7 @@
         pass
     finally:
         serv.close()
+        conn.close()
         evt.set()
 
 class GeneralTests(TestCase):

diff --git a/lib-python/2.7.0/test/test_logging.py b/lib-python/2.7.0/test/test_logging.py
--- a/lib-python/2.7.0/test/test_logging.py
+++ b/lib-python/2.7.0/test/test_logging.py
@@ -120,13 +120,13 @@
         except AttributeError:
             # StringIO.StringIO lacks a reset() method.
             actual_lines = stream.getvalue().splitlines()
-        self.assertEquals(len(actual_lines), len(expected_values))
+        self.assertEqual(len(actual_lines), len(expected_values))
         for actual, expected in zip(actual_lines, expected_values):
             match = pat.search(actual)
             if not match:
                 self.fail("Log line does not match expected pattern:\n" +
                             actual)
-            self.assertEquals(tuple(match.groups()), expected)
+            self.assertEqual(tuple(match.groups()), expected)
         s = stream.read()
         if s:
             self.fail("Remaining output at end of log stream:\n" + s)
@@ -692,7 +692,7 @@
             except RuntimeError:
                 logging.exception("just testing")
             sys.stdout.seek(0)
-            self.assertEquals(output.getvalue(),
+            self.assertEqual(output.getvalue(),
                 "ERROR:root:just testing\nGot a [RuntimeError]\n")
             # Original logger output is empty
             self.assert_log_lines([])
@@ -811,7 +811,7 @@
         logger = logging.getLogger("tcp")
         logger.error("spam")
         logger.debug("eggs")
-        self.assertEquals(self.get_output(), "spam\neggs\n")
+        self.assertEqual(self.get_output(), "spam\neggs\n")
 
 
 class MemoryTest(BaseTest):
@@ -1527,7 +1527,7 @@
             except RuntimeError:
                 logging.exception("just testing")
             sys.stdout.seek(0)
-            self.assertEquals(output.getvalue(),
+            self.assertEqual(output.getvalue(),
                 "ERROR:root:just testing\nGot a [RuntimeError]\n")
             # Original logger output is empty
             self.assert_log_lines([])
@@ -1542,7 +1542,7 @@
             except RuntimeError:
                 logging.exception("just testing")
             sys.stdout.seek(0)
-            self.assertEquals(output.getvalue(),
+            self.assertEqual(output.getvalue(),
                 "ERROR:root:just testing\nGot a [RuntimeError]\n")
             # Original logger output is empty
             self.assert_log_lines([])

diff --git a/lib-python/2.7.0/distutils/__init__.py b/lib-python/2.7.0/distutils/__init__.py
--- a/lib-python/2.7.0/distutils/__init__.py
+++ b/lib-python/2.7.0/distutils/__init__.py
@@ -8,12 +8,12 @@
    setup (...)
 """
 
-__revision__ = "$Id: __init__.py 82506 2010-07-03 14:51:25Z benjamin.peterson $"
+__revision__ = "$Id$"
 
 # Distutils version
 #
 # Updated automatically by the Python release process.
 #
 #--start constants--
-__version__ = "2.7.1a0"
+__version__ = "2.7.1"
 #--end constants--

diff --git a/lib-python/2.7.0/distutils/tests/test_sysconfig.py b/lib-python/2.7.0/distutils/tests/test_sysconfig.py
--- a/lib-python/2.7.0/distutils/tests/test_sysconfig.py
+++ b/lib-python/2.7.0/distutils/tests/test_sysconfig.py
@@ -36,7 +36,7 @@
                             sysconfig.get_python_lib(prefix=TESTFN))
         _sysconfig = __import__('sysconfig')
         res = sysconfig.get_python_lib(True, True)
-        self.assertEquals(_sysconfig.get_path('platstdlib'), res)
+        self.assertEqual(_sysconfig.get_path('platstdlib'), res)
 
     def test_get_python_inc(self):
         inc_dir = sysconfig.get_python_inc()
@@ -50,22 +50,26 @@
     def test_parse_makefile_base(self):
         self.makefile = test.test_support.TESTFN
         fd = open(self.makefile, 'w')
-        fd.write(r"CONFIG_ARGS=  '--arg1=optarg1' 'ENV=LIB'" '\n')
-        fd.write('VAR=$OTHER\nOTHER=foo')
-        fd.close()
+        try:
+            fd.write(r"CONFIG_ARGS=  '--arg1=optarg1' 'ENV=LIB'" '\n')
+            fd.write('VAR=$OTHER\nOTHER=foo')
+        finally:
+            fd.close()
         d = sysconfig.parse_makefile(self.makefile)
-        self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'",
-                              'OTHER': 'foo'})
+        self.assertEqual(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'",
+                             'OTHER': 'foo'})
 
     def test_parse_makefile_literal_dollar(self):
         self.makefile = test.test_support.TESTFN
         fd = open(self.makefile, 'w')
-        fd.write(r"CONFIG_ARGS=  '--arg1=optarg1' 'ENV=\$$LIB'" '\n')
-        fd.write('VAR=$OTHER\nOTHER=foo')
-        fd.close()
+        try:
+            fd.write(r"CONFIG_ARGS=  '--arg1=optarg1' 'ENV=\$$LIB'" '\n')
+            fd.write('VAR=$OTHER\nOTHER=foo')
+        finally:
+            fd.close()
         d = sysconfig.parse_makefile(self.makefile)
-        self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'",
-                              'OTHER': 'foo'})
+        self.assertEqual(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'",
+                             'OTHER': 'foo'})
 
 
 def test_suite():

diff --git a/lib-python/2.7.0/test/test_code.py b/lib-python/2.7.0/test/test_code.py
--- a/lib-python/2.7.0/test/test_code.py
+++ b/lib-python/2.7.0/test/test_code.py
@@ -106,9 +106,9 @@
 
     def test_newempty(self):
         co = _testcapi.code_newempty("filename", "funcname", 15)
-        self.assertEquals(co.co_filename, "filename")
-        self.assertEquals(co.co_name, "funcname")
-        self.assertEquals(co.co_firstlineno, 15)
+        self.assertEqual(co.co_filename, "filename")
+        self.assertEqual(co.co_name, "funcname")
+        self.assertEqual(co.co_firstlineno, 15)
 
 
 class CodeWeakRefTest(unittest.TestCase):

diff --git a/lib-python/2.7.0/test/test_compiler.py b/lib-python/2.7.0/test/test_compiler.py
--- a/lib-python/2.7.0/test/test_compiler.py
+++ b/lib-python/2.7.0/test/test_compiler.py
@@ -81,8 +81,8 @@
                              "<string>", "exec")
         dct = {}
         exec c in dct
-        self.assertEquals(dct.get('e'), 1)
-        self.assertEquals(dct.get('f'), 1)
+        self.assertEqual(dct.get('e'), 1)
+        self.assertEqual(dct.get('f'), 1)
 
     def testDefaultArgs(self):
         self.assertRaises(SyntaxError, compiler.parse, "def foo(a=1, b): pass")
@@ -93,7 +93,7 @@
         c = compiler.compile('def f():\n "doc"', '<string>', 'exec')
         g = {}
         exec c in g
-        self.assertEquals(g['f'].__doc__, "doc")
+        self.assertEqual(g['f'].__doc__, "doc")
 
     def testLineNo(self):
         # Test that all nodes except Module have a correct lineno attribute.
@@ -120,8 +120,8 @@
             self.check_lineno(child)
 
     def testFlatten(self):
-        self.assertEquals(flatten([1, [2]]), [1, 2])
-        self.assertEquals(flatten((1, (2,))), [1, 2])
+        self.assertEqual(flatten([1, [2]]), [1, 2])
+        self.assertEqual(flatten((1, (2,))), [1, 2])
 
     def testNestedScope(self):
         c = compiler.compile('def g():\n'
@@ -133,44 +133,44 @@
                              'exec')
         dct = {}
         exec c in dct
-        self.assertEquals(dct.get('result'), 3)
+        self.assertEqual(dct.get('result'), 3)
 
     def testGenExp(self):
         c = compiler.compile('list((i,j) for i in range(3) if i < 3'
                              '           for j in range(4) if j > 2)',
                              '<string>',
                              'eval')
-        self.assertEquals(eval(c), [(0, 3), (1, 3), (2, 3)])
+        self.assertEqual(eval(c), [(0, 3), (1, 3), (2, 3)])
 
     def testSetLiteral(self):
         c = compiler.compile('{1, 2, 3}', '<string>', 'eval')
-        self.assertEquals(eval(c), {1,2,3})
+        self.assertEqual(eval(c), {1,2,3})
         c = compiler.compile('{1, 2, 3,}', '<string>', 'eval')
-        self.assertEquals(eval(c), {1,2,3})
+        self.assertEqual(eval(c), {1,2,3})
 
     def testDictLiteral(self):
         c = compiler.compile('{1:2, 2:3, 3:4}', '<string>', 'eval')
-        self.assertEquals(eval(c), {1:2, 2:3, 3:4})
+        self.assertEqual(eval(c), {1:2, 2:3, 3:4})
         c = compiler.compile('{1:2, 2:3, 3:4,}', '<string>', 'eval')
-        self.assertEquals(eval(c), {1:2, 2:3, 3:4})
+        self.assertEqual(eval(c), {1:2, 2:3, 3:4})
 
     def testSetComp(self):
         c = compiler.compile('{x for x in range(1, 4)}', '<string>', 'eval')
-        self.assertEquals(eval(c), {1, 2, 3})
+        self.assertEqual(eval(c), {1, 2, 3})
         c = compiler.compile('{x * y for x in range(3) if x != 0'
                              '       for y in range(4) if y != 0}',
                              '<string>',
                              'eval')
-        self.assertEquals(eval(c), {1, 2, 3, 4, 6})
+        self.assertEqual(eval(c), {1, 2, 3, 4, 6})
 
     def testDictComp(self):
         c = compiler.compile('{x:x+1 for x in range(1, 4)}', '<string>', 'eval')
-        self.assertEquals(eval(c), {1:2, 2:3, 3:4})
+        self.assertEqual(eval(c), {1:2, 2:3, 3:4})
         c = compiler.compile('{(x, y) : y for x in range(2) if x != 0'
                              '            for y in range(3) if y != 0}',
                              '<string>',
                              'eval')
-        self.assertEquals(eval(c), {(1, 2): 2, (1, 1): 1})
+        self.assertEqual(eval(c), {(1, 2): 2, (1, 1): 1})
 
     def testWith(self):
         # SF bug 1638243
@@ -183,7 +183,7 @@
                              'exec' )
         dct = {'TrivialContext': TrivialContext}
         exec c in dct
-        self.assertEquals(dct.get('result'), 1)
+        self.assertEqual(dct.get('result'), 1)
 
     def testWithAss(self):
         c = compiler.compile('from __future__ import with_statement\n'
@@ -195,7 +195,7 @@
                              'exec' )
         dct = {'TrivialContext': TrivialContext}
         exec c in dct
-        self.assertEquals(dct.get('result'), 1)
+        self.assertEqual(dct.get('result'), 1)
 
     def testWithMult(self):
         events = []
@@ -215,8 +215,8 @@
                              'exec' )
         dct = {'Ctx': Ctx}
         exec c in dct
-        self.assertEquals(dct.get('result'), 1)
-        self.assertEquals(events, [1, 2])
+        self.assertEqual(dct.get('result'), 1)
+        self.assertEqual(events, [1, 2])
 
     def testGlobal(self):
         code = compiler.compile('global x\nx=1', '<string>', 'exec')
@@ -224,7 +224,7 @@
         d2 = {}
         exec code in d1, d2
         # x should be in the globals dict
-        self.assertEquals(d1.get('x'), 1)
+        self.assertEqual(d1.get('x'), 1)
 
     def testPrintFunction(self):
         c = compiler.compile('from __future__ import print_function\n'
@@ -234,14 +234,14 @@
                              'exec' )
         dct = {'output': StringIO()}
         exec c in dct
-        self.assertEquals(dct['output'].getvalue(), 'a**b++')
+        self.assertEqual(dct['output'].getvalue(), 'a**b++')
 
     def _testErrEnc(self, src, text, offset):
         try:
             compile(src, "", "exec")
         except SyntaxError, e:
-            self.assertEquals(e.offset, offset)
-            self.assertEquals(e.text, text)
+            self.assertEqual(e.offset, offset)
+            self.assertEqual(e.text, text)
 
     def testSourceCodeEncodingsError(self):
         # Test SyntaxError with encoding definition

diff --git a/lib-python/2.7.0/test/test_profile.py b/lib-python/2.7.0/test/test_profile.py
--- a/lib-python/2.7.0/test/test_profile.py
+++ b/lib-python/2.7.0/test/test_profile.py
@@ -93,7 +93,7 @@
 # Don't remove this comment. Everything below it is auto-generated.
 #--cut--------------------------------------------------------------------------
 ProfileTest.expected_output['print_stats'] = """\
-         127 function calls (107 primitive calls) in 999.749 CPU seconds
+         127 function calls (107 primitive calls) in 999.749 seconds
 
    Ordered by: standard name
 

diff --git a/lib-python/2.7.0/test/test_threadedtempfile.py b/lib-python/2.7.0/test/test_threadedtempfile.py
--- a/lib-python/2.7.0/test/test_threadedtempfile.py
+++ b/lib-python/2.7.0/test/test_threadedtempfile.py
@@ -68,8 +68,8 @@
 
         msg = "Errors: errors %d ok %d\n%s" % (len(errors), ok,
             '\n'.join(errors))
-        self.assertEquals(errors, [], msg)
-        self.assertEquals(ok, NUM_THREADS * FILES_PER_THREAD)
+        self.assertEqual(errors, [], msg)
+        self.assertEqual(ok, NUM_THREADS * FILES_PER_THREAD)
 
 def test_main():
     run_unittest(ThreadedTempFileTest)

diff --git a/lib-python/2.7.0/test/test_argparse.py b/lib-python/2.7.0/test/test_argparse.py
--- a/lib-python/2.7.0/test/test_argparse.py
+++ b/lib-python/2.7.0/test/test_argparse.py
@@ -2709,18 +2709,18 @@
 
     def test_empty(self):
         ns = argparse.Namespace()
-        self.assertEquals('' in ns, False)
-        self.assertEquals('' not in ns, True)
-        self.assertEquals('x' in ns, False)
+        self.assertEqual('' in ns, False)
+        self.assertEqual('' not in ns, True)
+        self.assertEqual('x' in ns, False)
 
     def test_non_empty(self):
         ns = argparse.Namespace(x=1, y=2)
-        self.assertEquals('x' in ns, True)
-        self.assertEquals('x' not in ns, False)
-        self.assertEquals('y' in ns, True)
-        self.assertEquals('' in ns, False)
-        self.assertEquals('xx' in ns, False)
-        self.assertEquals('z' in ns, False)
+        self.assertEqual('x' in ns, True)
+        self.assertEqual('x' not in ns, False)
+        self.assertEqual('y' in ns, True)
+        self.assertEqual('' in ns, False)
+        self.assertEqual('xx' in ns, False)
+        self.assertEqual('z' in ns, False)
 
 # =====================
 # Help formatting tests

diff --git a/lib-python/2.7.0/test/test_marshal.py b/lib-python/2.7.0/test/test_marshal.py
--- a/lib-python/2.7.0/test/test_marshal.py
+++ b/lib-python/2.7.0/test/test_marshal.py
@@ -210,8 +210,8 @@
 
     def test_version_argument(self):
         # Python 2.4.0 crashes for any call to marshal.dumps(x, y)
-        self.assertEquals(marshal.loads(marshal.dumps(5, 0)), 5)
-        self.assertEquals(marshal.loads(marshal.dumps(5, 1)), 5)
+        self.assertEqual(marshal.loads(marshal.dumps(5, 0)), 5)
+        self.assertEqual(marshal.loads(marshal.dumps(5, 1)), 5)
 
     def test_fuzz(self):
         # simple test that it's at least not *totally* trivial to

diff --git a/lib-python/2.7.0/test/test_charmapcodec.py b/lib-python/2.7.0/test/test_charmapcodec.py
--- a/lib-python/2.7.0/test/test_charmapcodec.py
+++ b/lib-python/2.7.0/test/test_charmapcodec.py
@@ -27,24 +27,24 @@
 
 class CharmapCodecTest(unittest.TestCase):
     def test_constructorx(self):
-        self.assertEquals(unicode('abc', codecname), u'abc')
-        self.assertEquals(unicode('xdef', codecname), u'abcdef')
-        self.assertEquals(unicode('defx', codecname), u'defabc')
-        self.assertEquals(unicode('dxf', codecname), u'dabcf')
-        self.assertEquals(unicode('dxfx', codecname), u'dabcfabc')
+        self.assertEqual(unicode('abc', codecname), u'abc')
+        self.assertEqual(unicode('xdef', codecname), u'abcdef')
+        self.assertEqual(unicode('defx', codecname), u'defabc')
+        self.assertEqual(unicode('dxf', codecname), u'dabcf')
+        self.assertEqual(unicode('dxfx', codecname), u'dabcfabc')
 
     def test_encodex(self):
-        self.assertEquals(u'abc'.encode(codecname), 'abc')
-        self.assertEquals(u'xdef'.encode(codecname), 'abcdef')
-        self.assertEquals(u'defx'.encode(codecname), 'defabc')
-        self.assertEquals(u'dxf'.encode(codecname), 'dabcf')
-        self.assertEquals(u'dxfx'.encode(codecname), 'dabcfabc')
+        self.assertEqual(u'abc'.encode(codecname), 'abc')
+        self.assertEqual(u'xdef'.encode(codecname), 'abcdef')
+        self.assertEqual(u'defx'.encode(codecname), 'defabc')
+        self.assertEqual(u'dxf'.encode(codecname), 'dabcf')
+        self.assertEqual(u'dxfx'.encode(codecname), 'dabcfabc')
 
     def test_constructory(self):
-        self.assertEquals(unicode('ydef', codecname), u'def')
-        self.assertEquals(unicode('defy', codecname), u'def')
-        self.assertEquals(unicode('dyf', codecname), u'df')
-        self.assertEquals(unicode('dyfy', codecname), u'df')
+        self.assertEqual(unicode('ydef', codecname), u'def')
+        self.assertEqual(unicode('defy', codecname), u'def')
+        self.assertEqual(unicode('dyf', codecname), u'df')
+        self.assertEqual(unicode('dyfy', codecname), u'df')
 
     def test_maptoundefined(self):
         self.assertRaises(UnicodeError, unicode, 'abc\001', codecname)

diff --git a/lib-python/2.7.0/json/tests/test_speedups.py b/lib-python/2.7.0/json/tests/test_speedups.py
--- a/lib-python/2.7.0/json/tests/test_speedups.py
+++ b/lib-python/2.7.0/json/tests/test_speedups.py
@@ -5,11 +5,11 @@
 
 class TestSpeedups(TestCase):
     def test_scanstring(self):
-        self.assertEquals(decoder.scanstring.__module__, "_json")
+        self.assertEqual(decoder.scanstring.__module__, "_json")
         self.assertTrue(decoder.scanstring is decoder.c_scanstring)
 
     def test_encode_basestring_ascii(self):
-        self.assertEquals(encoder.encode_basestring_ascii.__module__, "_json")
+        self.assertEqual(encoder.encode_basestring_ascii.__module__, "_json")
         self.assertTrue(encoder.encode_basestring_ascii is
                           encoder.c_encode_basestring_ascii)
 

diff --git a/lib-python/2.7.0/lib-tk/Tkinter.py b/lib-python/2.7.0/lib-tk/Tkinter.py
--- a/lib-python/2.7.0/lib-tk/Tkinter.py
+++ b/lib-python/2.7.0/lib-tk/Tkinter.py
@@ -30,7 +30,7 @@
 tk.mainloop()
 """
 
-__version__ = "$Revision: 81008 $"
+__version__ = "$Revision$"
 
 import sys
 if sys.platform == "win32":

diff --git a/lib-python/2.7.0/test/test_augassign.py b/lib-python/2.7.0/test/test_augassign.py
--- a/lib-python/2.7.0/test/test_augassign.py
+++ b/lib-python/2.7.0/test/test_augassign.py
@@ -19,10 +19,10 @@
         x /= 2
         if 1/2 == 0:
             # classic division
-            self.assertEquals(x, 3)
+            self.assertEqual(x, 3)
         else:
             # new-style division (with -Qnew)
-            self.assertEquals(x, 3.0)
+            self.assertEqual(x, 3.0)
 
     def test_with_unpacking(self):
         self.assertRaises(SyntaxError, compile, "x, b += 3", "<test>", "exec")
@@ -40,9 +40,9 @@
         x[0] ^= 1
         x[0] /= 2
         if 1/2 == 0:
-            self.assertEquals(x[0], 3)
+            self.assertEqual(x[0], 3)
         else:
-            self.assertEquals(x[0], 3.0)
+            self.assertEqual(x[0], 3.0)
 
     def testInDict(self):
         x = {0: 2}
@@ -57,23 +57,23 @@
         x[0] ^= 1
         x[0] /= 2
         if 1/2 == 0:
-            self.assertEquals(x[0], 3)
+            self.assertEqual(x[0], 3)
         else:
-            self.assertEquals(x[0], 3.0)
+            self.assertEqual(x[0], 3.0)
 
     def testSequences(self):
         x = [1,2]
         x += [3,4]
         x *= 2
 
-        self.assertEquals(x, [1, 2, 3, 4, 1, 2, 3, 4])
+        self.assertEqual(x, [1, 2, 3, 4, 1, 2, 3, 4])
 
         x = [1, 2, 3]
         y = x
         x[1:2] *= 2
         y[1:2] += [1]
 
-        self.assertEquals(x, [1, 2, 1, 2, 3])
+        self.assertEqual(x, [1, 2, 1, 2, 3])
         self.assertTrue(x is y)
 
     def testCustomMethods1(self):
@@ -101,14 +101,14 @@
 
         self.assertIsInstance(x, aug_test)
         self.assertTrue(y is not x)
-        self.assertEquals(x.val, 11)
+        self.assertEqual(x.val, 11)
 
         x = aug_test2(2)
         y = x
         x += 10
 
         self.assertTrue(y is x)
-        self.assertEquals(x.val, 12)
+        self.assertEqual(x.val, 12)
 
         x = aug_test3(3)
         y = x
@@ -116,7 +116,7 @@
 
         self.assertIsInstance(x, aug_test3)
         self.assertTrue(y is not x)
-        self.assertEquals(x.val, 13)
+        self.assertEqual(x.val, 13)
 
 
     def testCustomMethods2(test_self):
@@ -284,7 +284,7 @@
         1 << x
         x <<= 1
 
-        test_self.assertEquals(output, '''\
+        test_self.assertEqual(output, '''\
 __add__ called
 __radd__ called
 __iadd__ called

diff --git a/lib-python/2.7.0/distutils/tests/test_install_data.py b/lib-python/2.7.0/distutils/tests/test_install_data.py
--- a/lib-python/2.7.0/distutils/tests/test_install_data.py
+++ b/lib-python/2.7.0/distutils/tests/test_install_data.py
@@ -27,14 +27,14 @@
         self.write_file(two, 'xxx')
 
         cmd.data_files = [one, (inst2, [two])]
-        self.assertEquals(cmd.get_inputs(), [one, (inst2, [two])])
+        self.assertEqual(cmd.get_inputs(), [one, (inst2, [two])])
 
         # let's run the command
         cmd.ensure_finalized()
         cmd.run()
 
         # let's check the result
-        self.assertEquals(len(cmd.get_outputs()), 2)
+        self.assertEqual(len(cmd.get_outputs()), 2)
         rtwo = os.path.split(two)[-1]
         self.assertTrue(os.path.exists(os.path.join(inst2, rtwo)))
         rone = os.path.split(one)[-1]
@@ -47,7 +47,7 @@
         cmd.run()
 
         # let's check the result
-        self.assertEquals(len(cmd.get_outputs()), 2)
+        self.assertEqual(len(cmd.get_outputs()), 2)
         self.assertTrue(os.path.exists(os.path.join(inst2, rtwo)))
         self.assertTrue(os.path.exists(os.path.join(inst, rone)))
         cmd.outfiles = []
@@ -65,7 +65,7 @@
         cmd.run()
 
         # let's check the result
-        self.assertEquals(len(cmd.get_outputs()), 4)
+        self.assertEqual(len(cmd.get_outputs()), 4)
         self.assertTrue(os.path.exists(os.path.join(inst2, rtwo)))
         self.assertTrue(os.path.exists(os.path.join(inst, rone)))
 

diff --git a/lib-python/2.7.0/distutils/tests/test_sdist.py b/lib-python/2.7.0/distutils/tests/test_sdist.py
--- a/lib-python/2.7.0/distutils/tests/test_sdist.py
+++ b/lib-python/2.7.0/distutils/tests/test_sdist.py
@@ -127,7 +127,7 @@
         # now let's check what we have
         dist_folder = join(self.tmp_dir, 'dist')
         files = os.listdir(dist_folder)
-        self.assertEquals(files, ['fake-1.0.zip'])
+        self.assertEqual(files, ['fake-1.0.zip'])
 
         zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip'))
         try:
@@ -136,7 +136,7 @@
             zip_file.close()
 
         # making sure everything has been pruned correctly
-        self.assertEquals(len(content), 4)
+        self.assertEqual(len(content), 4)
 
     @unittest.skipUnless(zlib, "requires zlib")
     def test_make_distribution(self):
@@ -158,8 +158,7 @@
         dist_folder = join(self.tmp_dir, 'dist')
         result = os.listdir(dist_folder)
         result.sort()
-        self.assertEquals(result,
-                          ['fake-1.0.tar', 'fake-1.0.tar.gz'] )
+        self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz'] )
 
         os.remove(join(dist_folder, 'fake-1.0.tar'))
         os.remove(join(dist_folder, 'fake-1.0.tar.gz'))
@@ -172,8 +171,7 @@
 
         result = os.listdir(dist_folder)
         result.sort()
-        self.assertEquals(result,
-                ['fake-1.0.tar', 'fake-1.0.tar.gz'])
+        self.assertEqual(result, ['fake-1.0.tar', 'fake-1.0.tar.gz'])
 
     @unittest.skipUnless(zlib, "requires zlib")
     def test_add_defaults(self):
@@ -222,7 +220,7 @@
         # now let's check what we have
         dist_folder = join(self.tmp_dir, 'dist')
         files = os.listdir(dist_folder)
-        self.assertEquals(files, ['fake-1.0.zip'])
+        self.assertEqual(files, ['fake-1.0.zip'])
 
         zip_file = zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip'))
         try:
@@ -231,11 +229,15 @@
             zip_file.close()
 
         # making sure everything was added
-        self.assertEquals(len(content), 11)
+        self.assertEqual(len(content), 11)
 
         # checking the MANIFEST
-        manifest = open(join(self.tmp_dir, 'MANIFEST')).read()
-        self.assertEquals(manifest, MANIFEST % {'sep': os.sep})
+        f = open(join(self.tmp_dir, 'MANIFEST'))
+        try:
+            manifest = f.read()
+            self.assertEqual(manifest, MANIFEST % {'sep': os.sep})
+        finally:
+            f.close()
 
     @unittest.skipUnless(zlib, "requires zlib")
     def test_metadata_check_option(self):
@@ -247,7 +249,7 @@
         cmd.ensure_finalized()
         cmd.run()
         warnings = self.get_logs(WARN)
-        self.assertEquals(len(warnings), 2)
+        self.assertEqual(len(warnings), 2)
 
         # trying with a complete set of metadata
         self.clear_logs()
@@ -256,7 +258,7 @@
         cmd.metadata_check = 0
         cmd.run()
         warnings = self.get_logs(WARN)
-        self.assertEquals(len(warnings), 0)
+        self.assertEqual(len(warnings), 0)
 
     def test_check_metadata_deprecated(self):
         # makes sure make_metadata is deprecated
@@ -264,7 +266,7 @@
         with check_warnings() as w:
             warnings.simplefilter("always")
             cmd.check_metadata()
-            self.assertEquals(len(w.warnings), 1)
+            self.assertEqual(len(w.warnings), 1)
 
     def test_show_formats(self):
         with captured_stdout() as stdout:
@@ -274,7 +276,7 @@
         num_formats = len(ARCHIVE_FORMATS.keys())
         output = [line for line in stdout.getvalue().split('\n')
                   if line.strip().startswith('--formats=')]
-        self.assertEquals(len(output), num_formats)
+        self.assertEqual(len(output), num_formats)
 
     def test_finalize_options(self):
 
@@ -282,9 +284,9 @@
         cmd.finalize_options()
 
         # default options set by finalize
-        self.assertEquals(cmd.manifest, 'MANIFEST')
-        self.assertEquals(cmd.template, 'MANIFEST.in')
-        self.assertEquals(cmd.dist_dir, 'dist')
+        self.assertEqual(cmd.manifest, 'MANIFEST')
+        self.assertEqual(cmd.template, 'MANIFEST.in')
+        self.assertEqual(cmd.dist_dir, 'dist')
 
         # formats has to be a string splitable on (' ', ',') or
         # a stringlist
@@ -321,8 +323,8 @@
         archive = tarfile.open(archive_name)
         try:
             for member in archive.getmembers():
-                self.assertEquals(member.uid, 0)
-                self.assertEquals(member.gid, 0)
+                self.assertEqual(member.uid, 0)
+                self.assertEqual(member.gid, 0)
         finally:
             archive.close()
 
@@ -343,7 +345,7 @@
         # rights (see #7408)
         try:
             for member in archive.getmembers():
-                self.assertEquals(member.uid, os.getuid())
+                self.assertEqual(member.uid, os.getuid())
         finally:
             archive.close()
 
@@ -365,7 +367,7 @@
         finally:
             f.close()
 
-        self.assertEquals(len(manifest), 5)
+        self.assertEqual(len(manifest), 5)
 
         # adding a file
         self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#')
@@ -385,7 +387,7 @@
             f.close()
 
         # do we have the new file in MANIFEST ?
-        self.assertEquals(len(manifest2), 6)
+        self.assertEqual(len(manifest2), 6)
         self.assertIn('doc2.txt', manifest2[-1])
 
     def test_manifest_marker(self):

diff --git a/lib-python/2.7.0/distutils/command/build.py b/lib-python/2.7.0/distutils/command/build.py
--- a/lib-python/2.7.0/distutils/command/build.py
+++ b/lib-python/2.7.0/distutils/command/build.py
@@ -2,7 +2,7 @@
 
 Implements the Distutils 'build' command."""
 
-__revision__ = "$Id: build.py 77761 2010-01-26 22:46:15Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys, os
 

diff --git a/lib-python/2.7.0/test/test_io.py b/lib-python/2.7.0/test/test_io.py
--- a/lib-python/2.7.0/test/test_io.py
+++ b/lib-python/2.7.0/test/test_io.py
@@ -606,7 +606,7 @@
         rawio = self.MockRawIO()
         bufio = self.tp(rawio)
 
-        self.assertEquals(42, bufio.fileno())
+        self.assertEqual(42, bufio.fileno())
 
     def test_no_fileno(self):
         # XXX will we always have fileno() function? If so, kill
@@ -711,36 +711,36 @@
         bufio.__init__(rawio)
         bufio.__init__(rawio, buffer_size=1024)
         bufio.__init__(rawio, buffer_size=16)
-        self.assertEquals(b"abc", bufio.read())
+        self.assertEqual(b"abc", bufio.read())
         self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
         self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
         self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
         rawio = self.MockRawIO([b"abc"])
         bufio.__init__(rawio)
-        self.assertEquals(b"abc", bufio.read())
+        self.assertEqual(b"abc", bufio.read())
 
     def test_read(self):
         for arg in (None, 7):
             rawio = self.MockRawIO((b"abc", b"d", b"efg"))
             bufio = self.tp(rawio)
-            self.assertEquals(b"abcdefg", bufio.read(arg))
+            self.assertEqual(b"abcdefg", bufio.read(arg))
         # Invalid args
         self.assertRaises(ValueError, bufio.read, -2)
 
     def test_read1(self):
         rawio = self.MockRawIO((b"abc", b"d", b"efg"))
         bufio = self.tp(rawio)
-        self.assertEquals(b"a", bufio.read(1))
-        self.assertEquals(b"b", bufio.read1(1))
-        self.assertEquals(rawio._reads, 1)
-        self.assertEquals(b"c", bufio.read1(100))
-        self.assertEquals(rawio._reads, 1)
-        self.assertEquals(b"d", bufio.read1(100))
-        self.assertEquals(rawio._reads, 2)
-        self.assertEquals(b"efg", bufio.read1(100))
-        self.assertEquals(rawio._reads, 3)
-        self.assertEquals(b"", bufio.read1(100))
-        self.assertEquals(rawio._reads, 4)
+        self.assertEqual(b"a", bufio.read(1))
+        self.assertEqual(b"b", bufio.read1(1))
+        self.assertEqual(rawio._reads, 1)
+        self.assertEqual(b"c", bufio.read1(100))
+        self.assertEqual(rawio._reads, 1)
+        self.assertEqual(b"d", bufio.read1(100))
+        self.assertEqual(rawio._reads, 2)
+        self.assertEqual(b"efg", bufio.read1(100))
+        self.assertEqual(rawio._reads, 3)
+        self.assertEqual(b"", bufio.read1(100))
+        self.assertEqual(rawio._reads, 4)
         # Invalid args
         self.assertRaises(ValueError, bufio.read1, -1)
 
@@ -748,24 +748,24 @@
         rawio = self.MockRawIO((b"abc", b"d", b"efg"))
         bufio = self.tp(rawio)
         b = bytearray(2)
-        self.assertEquals(bufio.readinto(b), 2)
-        self.assertEquals(b, b"ab")
-        self.assertEquals(bufio.readinto(b), 2)
-        self.assertEquals(b, b"cd")
-        self.assertEquals(bufio.readinto(b), 2)
-        self.assertEquals(b, b"ef")
-        self.assertEquals(bufio.readinto(b), 1)
-        self.assertEquals(b, b"gf")
-        self.assertEquals(bufio.readinto(b), 0)
-        self.assertEquals(b, b"gf")
+        self.assertEqual(bufio.readinto(b), 2)
+        self.assertEqual(b, b"ab")
+        self.assertEqual(bufio.readinto(b), 2)
+        self.assertEqual(b, b"cd")
+        self.assertEqual(bufio.readinto(b), 2)
+        self.assertEqual(b, b"ef")
+        self.assertEqual(bufio.readinto(b), 1)
+        self.assertEqual(b, b"gf")
+        self.assertEqual(bufio.readinto(b), 0)
+        self.assertEqual(b, b"gf")
 
     def test_readlines(self):
         def bufio():
             rawio = self.MockRawIO((b"abc\n", b"d\n", b"ef"))
             return self.tp(rawio)
-        self.assertEquals(bufio().readlines(), [b"abc\n", b"d\n", b"ef"])
-        self.assertEquals(bufio().readlines(5), [b"abc\n", b"d\n"])
-        self.assertEquals(bufio().readlines(None), [b"abc\n", b"d\n", b"ef"])
+        self.assertEqual(bufio().readlines(), [b"abc\n", b"d\n", b"ef"])
+        self.assertEqual(bufio().readlines(5), [b"abc\n", b"d\n"])
+        self.assertEqual(bufio().readlines(None), [b"abc\n", b"d\n", b"ef"])
 
     def test_buffering(self):
         data = b"abcdefghi"
@@ -782,34 +782,34 @@
             bufio = self.tp(rawio, buffer_size=bufsize)
             pos = 0
             for nbytes in buf_read_sizes:
-                self.assertEquals(bufio.read(nbytes), data[pos:pos+nbytes])
+                self.assertEqual(bufio.read(nbytes), data[pos:pos+nbytes])
                 pos += nbytes
             # this is mildly implementation-dependent
-            self.assertEquals(rawio.read_history, raw_read_sizes)
+            self.assertEqual(rawio.read_history, raw_read_sizes)
 
     def test_read_non_blocking(self):
         # Inject some None's in there to simulate EWOULDBLOCK
         rawio = self.MockRawIO((b"abc", b"d", None, b"efg", None, None, None))
         bufio = self.tp(rawio)
 
-        self.assertEquals(b"abcd", bufio.read(6))
-        self.assertEquals(b"e", bufio.read(1))
-        self.assertEquals(b"fg", bufio.read())
-        self.assertEquals(b"", bufio.peek(1))
+        self.assertEqual(b"abcd", bufio.read(6))
+        self.assertEqual(b"e", bufio.read(1))
+        self.assertEqual(b"fg", bufio.read())
+        self.assertEqual(b"", bufio.peek(1))
         self.assertTrue(None is bufio.read())
-        self.assertEquals(b"", bufio.read())
+        self.assertEqual(b"", bufio.read())
 
     def test_read_past_eof(self):
         rawio = self.MockRawIO((b"abc", b"d", b"efg"))
         bufio = self.tp(rawio)
 
-        self.assertEquals(b"abcdefg", bufio.read(9000))
+        self.assertEqual(b"abcdefg", bufio.read(9000))
 
     def test_read_all(self):
         rawio = self.MockRawIO((b"abc", b"d", b"efg"))
         bufio = self.tp(rawio)
 
-        self.assertEquals(b"abcdefg", bufio.read())
+        self.assertEqual(b"abcdefg", bufio.read())
 
     @unittest.skipUnless(threading, 'Threading required for this test.')
     @support.requires_resource('cpu')
@@ -936,15 +936,15 @@
         bufio.__init__(rawio)
         bufio.__init__(rawio, buffer_size=1024)
         bufio.__init__(rawio, buffer_size=16)
-        self.assertEquals(3, bufio.write(b"abc"))
+        self.assertEqual(3, bufio.write(b"abc"))
         bufio.flush()
         self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
         self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
         self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
         bufio.__init__(rawio)
-        self.assertEquals(3, bufio.write(b"ghi"))
+        self.assertEqual(3, bufio.write(b"ghi"))
         bufio.flush()
-        self.assertEquals(b"".join(rawio._write_stack), b"abcghi")
+        self.assertEqual(b"".join(rawio._write_stack), b"abcghi")
 
     def test_detach_flush(self):
         raw = self.MockRawIO()
@@ -986,11 +986,11 @@
         sizes = gen_sizes()
         while n < len(contents):
             size = min(next(sizes), len(contents) - n)
-            self.assertEquals(bufio.write(contents[n:n+size]), size)
+            self.assertEqual(bufio.write(contents[n:n+size]), size)
             intermediate_func(bufio)
             n += size
         bufio.flush()
-        self.assertEquals(contents,
+        self.assertEqual(contents,
             b"".join(writer._write_stack))
 
     def test_writes(self):
@@ -1020,11 +1020,11 @@
         raw = self.MockNonBlockWriterIO()
         bufio = self.tp(raw, 8)
 
-        self.assertEquals(bufio.write(b"abcd"), 4)
-        self.assertEquals(bufio.write(b"efghi"), 5)
+        self.assertEqual(bufio.write(b"abcd"), 4)
+        self.assertEqual(bufio.write(b"efghi"), 5)
         # 1 byte will be written, the rest will be buffered
         raw.block_on(b"k")
-        self.assertEquals(bufio.write(b"jklmn"), 5)
+        self.assertEqual(bufio.write(b"jklmn"), 5)
 
         # 8 bytes will be written, 8 will be buffered and the rest will be lost
         raw.block_on(b"0")
@@ -1034,11 +1034,11 @@
             written = e.characters_written
         else:
             self.fail("BlockingIOError should have been raised")
-        self.assertEquals(written, 16)
-        self.assertEquals(raw.pop_written(),
+        self.assertEqual(written, 16)
+        self.assertEqual(raw.pop_written(),
             b"abcdefghijklmnopqrwxyz")
 
-        self.assertEquals(bufio.write(b"ABCDEFGHI"), 9)
+        self.assertEqual(bufio.write(b"ABCDEFGHI"), 9)
         s = raw.pop_written()
         # Previously buffered bytes were flushed
         self.assertTrue(s.startswith(b"01234567A"), s)
@@ -1061,7 +1061,7 @@
         bufio = self.tp(writer, 8)
         bufio.write(b"abc")
         bufio.flush()
-        self.assertEquals(b"abc", writer._write_stack[0])
+        self.assertEqual(b"abc", writer._write_stack[0])
 
     def test_destructor(self):
         writer = self.MockRawIO()
@@ -1069,7 +1069,7 @@
         bufio.write(b"abc")
         del bufio
         support.gc_collect()
-        self.assertEquals(b"abc", writer._write_stack[0])
+        self.assertEqual(b"abc", writer._write_stack[0])
 
     def test_truncate(self):
         # Truncate implicitly flushes the buffer.
@@ -1128,7 +1128,7 @@
             with self.open(support.TESTFN, "rb") as f:
                 s = f.read()
             for i in range(256):
-                self.assertEquals(s.count(bytes([i])), N)
+                self.assertEqual(s.count(bytes([i])), N)
         finally:
             support.unlink(support.TESTFN)
 
@@ -1329,45 +1329,45 @@
         rw.write(b"eee")
         self.assertFalse(raw._write_stack) # Buffer writes
         self.assertEqual(b"ghjk", rw.read())
-        self.assertEquals(b"dddeee", raw._write_stack[0])
+        self.assertEqual(b"dddeee", raw._write_stack[0])
 
     def test_seek_and_tell(self):
         raw = self.BytesIO(b"asdfghjkl")
         rw = self.tp(raw)
 
-        self.assertEquals(b"as", rw.read(2))
-        self.assertEquals(2, rw.tell())
+        self.assertEqual(b"as", rw.read(2))
+        self.assertEqual(2, rw.tell())
         rw.seek(0, 0)
-        self.assertEquals(b"asdf", rw.read(4))
+        self.assertEqual(b"asdf", rw.read(4))
 
         rw.write(b"asdf")
         rw.seek(0, 0)
-        self.assertEquals(b"asdfasdfl", rw.read())
-        self.assertEquals(9, rw.tell())
+        self.assertEqual(b"asdfasdfl", rw.read())
+        self.assertEqual(9, rw.tell())
         rw.seek(-4, 2)
-        self.assertEquals(5, rw.tell())
+        self.assertEqual(5, rw.tell())
         rw.seek(2, 1)
-        self.assertEquals(7, rw.tell())
-        self.assertEquals(b"fl", rw.read(11))
+        self.assertEqual(7, rw.tell())
+        self.assertEqual(b"fl", rw.read(11))
         self.assertRaises(TypeError, rw.seek, 0.0)
 
     def check_flush_and_read(self, read_func):
         raw = self.BytesIO(b"abcdefghi")
         bufio = self.tp(raw)
 
-        self.assertEquals(b"ab", read_func(bufio, 2))
+        self.assertEqual(b"ab", read_func(bufio, 2))
         bufio.write(b"12")
-        self.assertEquals(b"ef", read_func(bufio, 2))
-        self.assertEquals(6, bufio.tell())
+        self.assertEqual(b"ef", read_func(bufio, 2))
+        self.assertEqual(6, bufio.tell())
         bufio.flush()
-        self.assertEquals(6, bufio.tell())
-        self.assertEquals(b"ghi", read_func(bufio))
+        self.assertEqual(6, bufio.tell())
+        self.assertEqual(b"ghi", read_func(bufio))
         raw.seek(0, 0)
         raw.write(b"XYZ")
         # flush() resets the read buffer
         bufio.flush()
         bufio.seek(0, 0)
-        self.assertEquals(b"XYZ", read_func(bufio, 3))
+        self.assertEqual(b"XYZ", read_func(bufio, 3))
 
     def test_flush_and_read(self):
         self.check_flush_and_read(lambda bufio, *args: bufio.read(*args))
@@ -1399,8 +1399,8 @@
         bufio.write(b"45")
         bufio.flush()
         bufio.seek(0, 0)
-        self.assertEquals(b"12345fghi", raw.getvalue())
-        self.assertEquals(b"12345fghi", bufio.read())
+        self.assertEqual(b"12345fghi", raw.getvalue())
+        self.assertEqual(b"12345fghi", bufio.read())
 
     def test_threads(self):
         BufferedReaderTest.test_threads(self)
@@ -1625,12 +1625,12 @@
         # Try a few one-shot test cases.
         for input, eof, output in self.test_cases:
             d = StatefulIncrementalDecoder()
-            self.assertEquals(d.decode(input, eof), output)
+            self.assertEqual(d.decode(input, eof), output)
 
         # Also test an unfinished decode, followed by forcing EOF.
         d = StatefulIncrementalDecoder()
-        self.assertEquals(d.decode(b'oiabcd'), '')
-        self.assertEquals(d.decode(b'', 1), 'abcd.')
+        self.assertEqual(d.decode(b'oiabcd'), '')
+        self.assertEqual(d.decode(b'', 1), 'abcd.')
 
 class TextIOWrapperTest(unittest.TestCase):
 
@@ -1647,12 +1647,12 @@
         b = self.BufferedReader(r, 1000)
         t = self.TextIOWrapper(b)
         t.__init__(b, encoding="latin1", newline="\r\n")
-        self.assertEquals(t.encoding, "latin1")
-        self.assertEquals(t.line_buffering, False)
+        self.assertEqual(t.encoding, "latin1")
+        self.assertEqual(t.line_buffering, False)
         t.__init__(b, encoding="utf8", line_buffering=True)
-        self.assertEquals(t.encoding, "utf8")
-        self.assertEquals(t.line_buffering, True)
-        self.assertEquals("\xe9\n", t.readline())
+        self.assertEqual(t.encoding, "utf8")
+        self.assertEqual(t.line_buffering, True)
+        self.assertEqual("\xe9\n", t.readline())
         self.assertRaises(TypeError, t.__init__, b, newline=42)
         self.assertRaises(ValueError, t.__init__, b, newline='xyzzy')
 
@@ -1688,11 +1688,11 @@
         b = self.BufferedWriter(r, 1000)
         t = self.TextIOWrapper(b, newline="\n", line_buffering=True)
         t.write("X")
-        self.assertEquals(r.getvalue(), b"")  # No flush happened
+        self.assertEqual(r.getvalue(), b"")  # No flush happened
         t.write("Y\nZ")
-        self.assertEquals(r.getvalue(), b"XY\nZ")  # All got flushed
+        self.assertEqual(r.getvalue(), b"XY\nZ")  # All got flushed
         t.write("A\rB")
-        self.assertEquals(r.getvalue(), b"XY\nZA\rB")
+        self.assertEqual(r.getvalue(), b"XY\nZA\rB")
 
     def test_encoding(self):
         # Check the encoding attribute is always set, and valid
@@ -1715,11 +1715,11 @@
         # (3) ignore
         b = self.BytesIO(b"abc\n\xff\n")
         t = self.TextIOWrapper(b, encoding="ascii", errors="ignore")
-        self.assertEquals(t.read(), "abc\n\n")
+        self.assertEqual(t.read(), "abc\n\n")
         # (4) replace
         b = self.BytesIO(b"abc\n\xff\n")
         t = self.TextIOWrapper(b, encoding="ascii", errors="replace")
-        self.assertEquals(t.read(), "abc\n\ufffd\n")
+        self.assertEqual(t.read(), "abc\n\ufffd\n")
 
     def test_encoding_errors_writing(self):
         # (1) default
@@ -1736,14 +1736,14 @@
                              newline="\n")
         t.write("abc\xffdef\n")
         t.flush()
-        self.assertEquals(b.getvalue(), b"abcdef\n")
+        self.assertEqual(b.getvalue(), b"abcdef\n")
         # (4) replace
         b = self.BytesIO()
         t = self.TextIOWrapper(b, encoding="ascii", errors="replace",
                              newline="\n")
         t.write("abc\xffdef\n")
         t.flush()
-        self.assertEquals(b.getvalue(), b"abc?def\n")
+        self.assertEqual(b.getvalue(), b"abc?def\n")
 
     def test_newlines(self):
         input_lines = [ "unix\n", "windows\r\n", "os9\r", "last\n", "nonl" ]
@@ -1778,14 +1778,14 @@
                                 c2 = textio.read(2)
                                 if c2 == '':
                                     break
-                                self.assertEquals(len(c2), 2)
+                                self.assertEqual(len(c2), 2)
                                 got_lines.append(c2 + textio.readline())
                         else:
                             got_lines = list(textio)
 
                         for got_line, exp_line in zip(got_lines, exp_lines):
-                            self.assertEquals(got_line, exp_line)
-                        self.assertEquals(len(got_lines), len(exp_lines))
+                            self.assertEqual(got_line, exp_line)
+                        self.assertEqual(len(got_lines), len(exp_lines))
 
     def test_newlines_input(self):
         testdata = b"AAA\nBB\x00B\nCCC\rDDD\rEEE\r\nFFF\r\nGGG"
@@ -1799,9 +1799,9 @@
             ]:
             buf = self.BytesIO(testdata)
             txt = self.TextIOWrapper(buf, encoding="ascii", newline=newline)
-            self.assertEquals(txt.readlines(), expected)
+            self.assertEqual(txt.readlines(), expected)
             txt.seek(0)
-            self.assertEquals(txt.read(), "".join(expected))
+            self.assertEqual(txt.read(), "".join(expected))
 
     def test_newlines_output(self):
         testdict = {
@@ -1818,8 +1818,8 @@
             txt.write("BB\nCCC\n")
             txt.write("X\rY\r\nZ")
             txt.flush()
-            self.assertEquals(buf.closed, False)
-            self.assertEquals(buf.getvalue(), expected)
+            self.assertEqual(buf.closed, False)
+            self.assertEqual(buf.getvalue(), expected)
 
     def test_destructor(self):
         l = []
@@ -1833,7 +1833,7 @@
         t.write("abc")
         del t
         support.gc_collect()
-        self.assertEquals([b"abc"], l)
+        self.assertEqual([b"abc"], l)
 
     def test_override_destructor(self):
         record = []
@@ -1880,26 +1880,26 @@
             for enc in "ascii", "latin1", "utf8" :# , "utf-16-be", "utf-16-le":
                 f = self.open(support.TESTFN, "w+", encoding=enc)
                 f._CHUNK_SIZE = chunksize
-                self.assertEquals(f.write("abc"), 3)
+                self.assertEqual(f.write("abc"), 3)
                 f.close()
                 f = self.open(support.TESTFN, "r+", encoding=enc)
                 f._CHUNK_SIZE = chunksize
-                self.assertEquals(f.tell(), 0)
-                self.assertEquals(f.read(), "abc")
+                self.assertEqual(f.tell(), 0)
+                self.assertEqual(f.read(), "abc")
                 cookie = f.tell()
-                self.assertEquals(f.seek(0), 0)
-                self.assertEquals(f.read(None), "abc")
+                self.assertEqual(f.seek(0), 0)
+                self.assertEqual(f.read(None), "abc")
                 f.seek(0)
-                self.assertEquals(f.read(2), "ab")
-                self.assertEquals(f.read(1), "c")
-                self.assertEquals(f.read(1), "")
-                self.assertEquals(f.read(), "")
-                self.assertEquals(f.tell(), cookie)
-                self.assertEquals(f.seek(0), 0)
-                self.assertEquals(f.seek(0, 2), cookie)
-                self.assertEquals(f.write("def"), 3)
-                self.assertEquals(f.seek(cookie), cookie)
-                self.assertEquals(f.read(), "def")
+                self.assertEqual(f.read(2), "ab")
+                self.assertEqual(f.read(1), "c")
+                self.assertEqual(f.read(1), "")
+                self.assertEqual(f.read(), "")
+                self.assertEqual(f.tell(), cookie)
+                self.assertEqual(f.seek(0), 0)
+                self.assertEqual(f.seek(0, 2), cookie)
+                self.assertEqual(f.write("def"), 3)
+                self.assertEqual(f.seek(cookie), cookie)
+                self.assertEqual(f.read(), "def")
                 if enc.startswith("utf"):
                     self.multi_line_test(f, enc)
                 f.close()
@@ -1924,7 +1924,7 @@
             if not line:
                 break
             rlines.append((pos, line))
-        self.assertEquals(rlines, wlines)
+        self.assertEqual(rlines, wlines)
 
     def test_telling(self):
         f = self.open(support.TESTFN, "w+", encoding="utf8")
@@ -1934,16 +1934,16 @@
         f.write("\xff\n")
         p2 = f.tell()
         f.seek(0)
-        self.assertEquals(f.tell(), p0)
-        self.assertEquals(f.readline(), "\xff\n")
-        self.assertEquals(f.tell(), p1)
-        self.assertEquals(f.readline(), "\xff\n")
-        self.assertEquals(f.tell(), p2)
+        self.assertEqual(f.tell(), p0)
+        self.assertEqual(f.readline(), "\xff\n")
+        self.assertEqual(f.tell(), p1)
+        self.assertEqual(f.readline(), "\xff\n")
+        self.assertEqual(f.tell(), p2)
         f.seek(0)
         for line in f:
-            self.assertEquals(line, "\xff\n")
+            self.assertEqual(line, "\xff\n")
             self.assertRaises(IOError, f.tell)
-        self.assertEquals(f.tell(), p2)
+        self.assertEqual(f.tell(), p2)
         f.close()
 
     def test_seeking(self):
@@ -1951,7 +1951,7 @@
         prefix_size = chunk_size - 2
         u_prefix = "a" * prefix_size
         prefix = bytes(u_prefix.encode("utf-8"))
-        self.assertEquals(len(u_prefix), len(prefix))
+        self.assertEqual(len(u_prefix), len(prefix))
         u_suffix = "\u8888\n"
         suffix = bytes(u_suffix.encode("utf-8"))
         line = prefix + suffix
@@ -1960,9 +1960,9 @@
         f.close()
         f = self.open(support.TESTFN, "r", encoding="utf-8")
         s = f.read(prefix_size)
-        self.assertEquals(s, prefix.decode("ascii"))
-        self.assertEquals(f.tell(), prefix_size)
-        self.assertEquals(f.readline(), u_suffix)
+        self.assertEqual(s, prefix.decode("ascii"))
+        self.assertEqual(f.tell(), prefix_size)
+        self.assertEqual(f.readline(), u_suffix)
 
     def test_seeking_too(self):
         # Regression test for a specific bug
@@ -1995,11 +1995,11 @@
             for i in range(min_pos, len(decoded) + 1): # seek positions
                 for j in [1, 5, len(decoded) - i]: # read lengths
                     f = self.open(support.TESTFN, encoding='test_decoder')
-                    self.assertEquals(f.read(i), decoded[:i])
+                    self.assertEqual(f.read(i), decoded[:i])
                     cookie = f.tell()
-                    self.assertEquals(f.read(j), decoded[i:i + j])
+                    self.assertEqual(f.read(j), decoded[i:i + j])
                     f.seek(cookie)
-                    self.assertEquals(f.read(), decoded[i:])
+                    self.assertEqual(f.read(), decoded[i:])
                     f.close()
 
         # Enable the test decoder.
@@ -2038,10 +2038,10 @@
             f.write(data)
             f.write(data)
             f.seek(0)
-            self.assertEquals(f.read(), data * 2)
+            self.assertEqual(f.read(), data * 2)
             f.seek(0)
-            self.assertEquals(f.read(), data * 2)
-            self.assertEquals(buf.getvalue(), (data * 2).encode(encoding))
+            self.assertEqual(f.read(), data * 2)
+            self.assertEqual(buf.getvalue(), (data * 2).encode(encoding))
 
     def test_unreadable(self):
         class UnReadable(self.BytesIO):
@@ -2058,7 +2058,7 @@
             if not c:
                 break
             reads += c
-        self.assertEquals(reads, "AA\nBB")
+        self.assertEqual(reads, "AA\nBB")
 
     def test_readlines(self):
         txt = self.TextIOWrapper(self.BytesIO(b"AA\nBB\nCC"))
@@ -2078,7 +2078,7 @@
             if not c:
                 break
             reads += c
-        self.assertEquals(reads, "A"*127+"\nB")
+        self.assertEqual(reads, "A"*127+"\nB")
 
     def test_issue1395_1(self):
         txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
@@ -2090,7 +2090,7 @@
             if not c:
                 break
             reads += c
-        self.assertEquals(reads, self.normalized)
+        self.assertEqual(reads, self.normalized)
 
     def test_issue1395_2(self):
         txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
@@ -2102,7 +2102,7 @@
             if not c:
                 break
             reads += c
-        self.assertEquals(reads, self.normalized)
+        self.assertEqual(reads, self.normalized)
 
     def test_issue1395_3(self):
         txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
@@ -2113,7 +2113,7 @@
         reads += txt.readline()
         reads += txt.readline()
         reads += txt.readline()
-        self.assertEquals(reads, self.normalized)
+        self.assertEqual(reads, self.normalized)
 
     def test_issue1395_4(self):
         txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
@@ -2121,7 +2121,7 @@
 
         reads = txt.read(4)
         reads += txt.read()
-        self.assertEquals(reads, self.normalized)
+        self.assertEqual(reads, self.normalized)
 
     def test_issue1395_5(self):
         txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
@@ -2131,7 +2131,7 @@
         pos = txt.tell()
         txt.seek(0)
         txt.seek(pos)
-        self.assertEquals(txt.read(4), "BBB\n")
+        self.assertEqual(txt.read(4), "BBB\n")
 
     def test_issue2282(self):
         buffer = self.BytesIO(self.testdata)
@@ -2147,12 +2147,12 @@
                 f.write('aaa')
                 pos = f.tell()
             with self.open(filename, 'rb') as f:
-                self.assertEquals(f.read(), 'aaa'.encode(charset))
+                self.assertEqual(f.read(), 'aaa'.encode(charset))
 
             with self.open(filename, 'a', encoding=charset) as f:
                 f.write('xxx')
             with self.open(filename, 'rb') as f:
-                self.assertEquals(f.read(), 'aaaxxx'.encode(charset))
+                self.assertEqual(f.read(), 'aaaxxx'.encode(charset))
 
     def test_seek_bom(self):
         # Same test, but when seeking manually
@@ -2167,7 +2167,7 @@
                 f.seek(0)
                 f.write('bbb')
             with self.open(filename, 'rb') as f:
-                self.assertEquals(f.read(), 'bbbzzz'.encode(charset))
+                self.assertEqual(f.read(), 'bbbzzz'.encode(charset))
 
     def test_errors_property(self):
         with self.open(support.TESTFN, "w") as f:
@@ -2195,7 +2195,7 @@
         with self.open(support.TESTFN) as f:
             content = f.read()
             for n in range(20):
-                self.assertEquals(content.count("Thread%03d\n" % n), 1)
+                self.assertEqual(content.count("Thread%03d\n" % n), 1)
 
     def test_flush_error_on_close(self):
         txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
@@ -2249,9 +2249,9 @@
         def _check_decode(b, s, **kwargs):
             # We exercise getstate() / setstate() as well as decode()
             state = decoder.getstate()
-            self.assertEquals(decoder.decode(b, **kwargs), s)
+            self.assertEqual(decoder.decode(b, **kwargs), s)
             decoder.setstate(state)
-            self.assertEquals(decoder.decode(b, **kwargs), s)
+            self.assertEqual(decoder.decode(b, **kwargs), s)
 
         _check_decode(b'\xe8\xa2\x88', "\u8888")
 
@@ -2300,24 +2300,24 @@
                 # Decode one char at a time
                 for c in s:
                     result.append(decoder.decode(c))
-        self.assertEquals(decoder.newlines, None)
+        self.assertEqual(decoder.newlines, None)
         _decode_bytewise("abc\n\r")
-        self.assertEquals(decoder.newlines, '\n')
+        self.assertEqual(decoder.newlines, '\n')
         _decode_bytewise("\nabc")
-        self.assertEquals(decoder.newlines, ('\n', '\r\n'))
+        self.assertEqual(decoder.newlines, ('\n', '\r\n'))
         _decode_bytewise("abc\r")
-        self.assertEquals(decoder.newlines, ('\n', '\r\n'))
+        self.assertEqual(decoder.newlines, ('\n', '\r\n'))
         _decode_bytewise("abc")
-        self.assertEquals(decoder.newlines, ('\r', '\n', '\r\n'))
+        self.assertEqual(decoder.newlines, ('\r', '\n', '\r\n'))
         _decode_bytewise("abc\r")
-        self.assertEquals("".join(result), "abc\n\nabcabc\nabcabc")
+        self.assertEqual("".join(result), "abc\n\nabcabc\nabcabc")
         decoder.reset()
         input = "abc"
         if encoder is not None:
             encoder.reset()
             input = encoder.encode(input)
-        self.assertEquals(decoder.decode(input), "abc")
-        self.assertEquals(decoder.newlines, None)
+        self.assertEqual(decoder.decode(input), "abc")
+        self.assertEqual(decoder.newlines, None)
 
     def test_newline_decoder(self):
         encodings = (
@@ -2338,11 +2338,11 @@
     def test_newline_bytes(self):
         # Issue 5433: Excessive optimization in IncrementalNewlineDecoder
         def _check(dec):
-            self.assertEquals(dec.newlines, None)
-            self.assertEquals(dec.decode("\u0D00"), "\u0D00")
-            self.assertEquals(dec.newlines, None)
-            self.assertEquals(dec.decode("\u0A00"), "\u0A00")
-            self.assertEquals(dec.newlines, None)
+            self.assertEqual(dec.newlines, None)
+            self.assertEqual(dec.decode("\u0D00"), "\u0D00")
+            self.assertEqual(dec.newlines, None)
+            self.assertEqual(dec.decode("\u0A00"), "\u0A00")
+            self.assertEqual(dec.newlines, None)
         dec = self.IncrementalNewlineDecoder(None, translate=False)
         _check(dec)
         dec = self.IncrementalNewlineDecoder(None, translate=True)
@@ -2375,28 +2375,28 @@
 
     def test_attributes(self):
         f = self.open(support.TESTFN, "wb", buffering=0)
-        self.assertEquals(f.mode, "wb")
+        self.assertEqual(f.mode, "wb")
         f.close()
 
         f = self.open(support.TESTFN, "U")
-        self.assertEquals(f.name,            support.TESTFN)
-        self.assertEquals(f.buffer.name,     support.TESTFN)
-        self.assertEquals(f.buffer.raw.name, support.TESTFN)
-        self.assertEquals(f.mode,            "U")
-        self.assertEquals(f.buffer.mode,     "rb")
-        self.assertEquals(f.buffer.raw.mode, "rb")
+        self.assertEqual(f.name,            support.TESTFN)
+        self.assertEqual(f.buffer.name,     support.TESTFN)
+        self.assertEqual(f.buffer.raw.name, support.TESTFN)
+        self.assertEqual(f.mode,            "U")
+        self.assertEqual(f.buffer.mode,     "rb")
+        self.assertEqual(f.buffer.raw.mode, "rb")
         f.close()
 
         f = self.open(support.TESTFN, "w+")
-        self.assertEquals(f.mode,            "w+")
-        self.assertEquals(f.buffer.mode,     "rb+") # Does it really matter?
-        self.assertEquals(f.buffer.raw.mode, "rb+")
+        self.assertEqual(f.mode,            "w+")
+        self.assertEqual(f.buffer.mode,     "rb+") # Does it really matter?
+        self.assertEqual(f.buffer.raw.mode, "rb+")
 
         g = self.open(f.fileno(), "wb", closefd=False)
-        self.assertEquals(g.mode,     "wb")
-        self.assertEquals(g.raw.mode, "wb")
-        self.assertEquals(g.name,     f.fileno())
-        self.assertEquals(g.raw.name, f.fileno())
+        self.assertEqual(g.mode,     "wb")
+        self.assertEqual(g.raw.mode, "wb")
+        self.assertEqual(g.name,     f.fileno())
+        self.assertEqual(g.raw.name, f.fileno())
         f.close()
         g.close()
 

diff --git a/lib-python/2.7.0/distutils/tests/test_install_scripts.py b/lib-python/2.7.0/distutils/tests/test_install_scripts.py
--- a/lib-python/2.7.0/distutils/tests/test_install_scripts.py
+++ b/lib-python/2.7.0/distutils/tests/test_install_scripts.py
@@ -42,8 +42,10 @@
         def write_script(name, text):
             expected.append(name)
             f = open(os.path.join(source, name), "w")
-            f.write(text)
-            f.close()
+            try:
+                f.write(text)
+            finally:
+                f.close()
 
         write_script("script1.py", ("#! /usr/bin/env python2.3\n"
                                     "# bogus script w/ Python sh-bang\n"

diff --git a/lib-python/2.7.0/bsddb/test/test_recno.py b/lib-python/2.7.0/bsddb/test/test_recno.py
--- a/lib-python/2.7.0/bsddb/test/test_recno.py
+++ b/lib-python/2.7.0/bsddb/test/test_recno.py
@@ -18,7 +18,7 @@
         def assertFalse(self, expr, msg=None) :
             return self.failIf(expr,msg=msg)
         def assertTrue(self, expr, msg=None) :
-            return self.assert_(expr, msg=msg)
+            return self.assertTrue(expr, msg=msg)
 
     if (sys.version_info < (2, 7)) or ((sys.version_info >= (3, 0)) and
             (sys.version_info < (3, 2))) :

diff --git a/lib-python/2.7.0/test/test_parser.py b/lib-python/2.7.0/test/test_parser.py
--- a/lib-python/2.7.0/test/test_parser.py
+++ b/lib-python/2.7.0/test/test_parser.py
@@ -19,8 +19,8 @@
         except parser.ParserError, why:
             self.fail("could not roundtrip %r: %s" % (s, why))
 
-        self.assertEquals(t, st2.totuple(),
-                          "could not re-generate syntax tree")
+        self.assertEqual(t, st2.totuple(),
+                         "could not re-generate syntax tree")
 
     def check_expr(self, s):
         self.roundtrip(parser.expr, s)
@@ -547,14 +547,14 @@
     def test_compile_expr(self):
         st = parser.expr('2 + 3')
         code = parser.compilest(st)
-        self.assertEquals(eval(code), 5)
+        self.assertEqual(eval(code), 5)
 
     def test_compile_suite(self):
         st = parser.suite('x = 2; y = x + 3')
         code = parser.compilest(st)
         globs = {}
         exec code in globs
-        self.assertEquals(globs['y'], 5)
+        self.assertEqual(globs['y'], 5)
 
     def test_compile_error(self):
         st = parser.suite('1 = 3 + 4')

diff --git a/lib-python/2.7.0/distutils/cmd.py b/lib-python/2.7.0/distutils/cmd.py
--- a/lib-python/2.7.0/distutils/cmd.py
+++ b/lib-python/2.7.0/distutils/cmd.py
@@ -4,7 +4,7 @@
 in the distutils.command package.
 """
 
-__revision__ = "$Id: cmd.py 75192 2009-10-02 23:49:48Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys, os, re
 from distutils.errors import DistutilsOptionError

diff --git a/lib-python/2.7.0/bsddb/test/test_basics.py b/lib-python/2.7.0/bsddb/test/test_basics.py
--- a/lib-python/2.7.0/bsddb/test/test_basics.py
+++ b/lib-python/2.7.0/bsddb/test/test_basics.py
@@ -612,7 +612,7 @@
 
         d.put("abcde", "ABCDE");
         num = d.truncate()
-        self.assert_(num >= 1, "truncate returned <= 0 on non-empty database")
+        self.assertTrue(num >= 1, "truncate returned <= 0 on non-empty database")
         num = d.truncate()
         self.assertEqual(num, 0,
                 "truncate on empty DB returned nonzero (%r)" % (num,))
@@ -631,9 +631,9 @@
     if db.version() >= (4, 6):
         def test08_exists(self) :
             self.d.put("abcde", "ABCDE")
-            self.assert_(self.d.exists("abcde") == True,
+            self.assertTrue(self.d.exists("abcde") == True,
                     "DB->exists() returns wrong value")
-            self.assert_(self.d.exists("x") == False,
+            self.assertTrue(self.d.exists("x") == False,
                     "DB->exists() returns wrong value")
 
     #----------------------------------------
@@ -806,9 +806,9 @@
             self.d.put("abcde", "ABCDE", txn=txn)
             txn.commit()
             txn = self.env.txn_begin()
-            self.assert_(self.d.exists("abcde", txn=txn) == True,
+            self.assertTrue(self.d.exists("abcde", txn=txn) == True,
                     "DB->exists() returns wrong value")
-            self.assert_(self.d.exists("x", txn=txn) == False,
+            self.assertTrue(self.d.exists("x", txn=txn) == False,
                     "DB->exists() returns wrong value")
             txn.abort()
 
@@ -823,7 +823,7 @@
         d.put("abcde", "ABCDE");
         txn = self.env.txn_begin()
         num = d.truncate(txn)
-        self.assert_(num >= 1, "truncate returned <= 0 on non-empty database")
+        self.assertTrue(num >= 1, "truncate returned <= 0 on non-empty database")
         num = d.truncate(txn)
         self.assertEqual(num, 0,
                 "truncate on empty DB returned nonzero (%r)" % (num,))

diff --git a/lib-python/2.7.0/test/test_posix.py b/lib-python/2.7.0/test/test_posix.py
--- a/lib-python/2.7.0/test/test_posix.py
+++ b/lib-python/2.7.0/test/test_posix.py
@@ -103,7 +103,7 @@
             try:
                 posix.initgroups(name, 13)
             except OSError as e:
-                self.assertEquals(e.errno, errno.EPERM)
+                self.assertEqual(e.errno, errno.EPERM)
             else:
                 self.fail("Expected OSError to be raised by initgroups")
 

diff --git a/lib-python/2.7.0/distutils/command/bdist.py b/lib-python/2.7.0/distutils/command/bdist.py
--- a/lib-python/2.7.0/distutils/command/bdist.py
+++ b/lib-python/2.7.0/distutils/command/bdist.py
@@ -3,7 +3,7 @@
 Implements the Distutils 'bdist' command (create a built [binary]
 distribution)."""
 
-__revision__ = "$Id: bdist.py 77761 2010-01-26 22:46:15Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 

diff --git a/lib-python/2.7.0/md5.py b/lib-python/2.7.0/md5.py
--- a/lib-python/2.7.0/md5.py
+++ b/lib-python/2.7.0/md5.py
@@ -1,4 +1,4 @@
-# $Id: md5.py 58064 2007-09-09 20:25:00Z gregory.p.smith $
+# $Id$
 #
 #  Copyright (C) 2005   Gregory P. Smith (greg at krypto.org)
 #  Licensed to PSF under a Contributor Agreement.

diff --git a/lib-python/2.7.0/distutils/tests/test_dir_util.py b/lib-python/2.7.0/distutils/tests/test_dir_util.py
--- a/lib-python/2.7.0/distutils/tests/test_dir_util.py
+++ b/lib-python/2.7.0/distutils/tests/test_dir_util.py
@@ -37,18 +37,18 @@
 
         mkpath(self.target, verbose=0)
         wanted = []
-        self.assertEquals(self._logs, wanted)
+        self.assertEqual(self._logs, wanted)
         remove_tree(self.root_target, verbose=0)
 
         mkpath(self.target, verbose=1)
         wanted = ['creating %s' % self.root_target,
                   'creating %s' % self.target]
-        self.assertEquals(self._logs, wanted)
+        self.assertEqual(self._logs, wanted)
         self._logs = []
 
         remove_tree(self.root_target, verbose=1)
         wanted = ["removing '%s' (and everything under it)" % self.root_target]
-        self.assertEquals(self._logs, wanted)
+        self.assertEqual(self._logs, wanted)
 
     @unittest.skipIf(sys.platform.startswith('win'),
                         "This test is only appropriate for POSIX-like systems.")
@@ -66,12 +66,12 @@
     def test_create_tree_verbosity(self):
 
         create_tree(self.root_target, ['one', 'two', 'three'], verbose=0)
-        self.assertEquals(self._logs, [])
+        self.assertEqual(self._logs, [])
         remove_tree(self.root_target, verbose=0)
 
         wanted = ['creating %s' % self.root_target]
         create_tree(self.root_target, ['one', 'two', 'three'], verbose=1)
-        self.assertEquals(self._logs, wanted)
+        self.assertEqual(self._logs, wanted)
 
         remove_tree(self.root_target, verbose=0)
 
@@ -81,30 +81,32 @@
         mkpath(self.target, verbose=0)
 
         copy_tree(self.target, self.target2, verbose=0)
-        self.assertEquals(self._logs, [])
+        self.assertEqual(self._logs, [])
 
         remove_tree(self.root_target, verbose=0)
 
         mkpath(self.target, verbose=0)
         a_file = os.path.join(self.target, 'ok.txt')
         f = open(a_file, 'w')
-        f.write('some content')
-        f.close()
+        try:
+            f.write('some content')
+        finally:
+            f.close()
 
         wanted = ['copying %s -> %s' % (a_file, self.target2)]
         copy_tree(self.target, self.target2, verbose=1)
-        self.assertEquals(self._logs, wanted)
+        self.assertEqual(self._logs, wanted)
 
         remove_tree(self.root_target, verbose=0)
         remove_tree(self.target2, verbose=0)
 
     def test_ensure_relative(self):
         if os.sep == '/':
-            self.assertEquals(ensure_relative('/home/foo'), 'home/foo')
-            self.assertEquals(ensure_relative('some/path'), 'some/path')
+            self.assertEqual(ensure_relative('/home/foo'), 'home/foo')
+            self.assertEqual(ensure_relative('some/path'), 'some/path')
         else:   # \\
-            self.assertEquals(ensure_relative('c:\\home\\foo'), 'c:home\\foo')
-            self.assertEquals(ensure_relative('home\\foo'), 'home\\foo')
+            self.assertEqual(ensure_relative('c:\\home\\foo'), 'c:home\\foo')
+            self.assertEqual(ensure_relative('home\\foo'), 'home\\foo')
 
 def test_suite():
     return unittest.makeSuite(DirUtilTestCase)

diff --git a/lib-python/2.7.0/test/test_threading.py b/lib-python/2.7.0/test/test_threading.py
--- a/lib-python/2.7.0/test/test_threading.py
+++ b/lib-python/2.7.0/test/test_threading.py
@@ -403,17 +403,17 @@
         weak_cyclic_object = weakref.ref(cyclic_object)
         cyclic_object.thread.join()
         del cyclic_object
-        self.assertEquals(None, weak_cyclic_object(),
-                          msg=('%d references still around' %
-                               sys.getrefcount(weak_cyclic_object())))
+        self.assertEqual(None, weak_cyclic_object(),
+                         msg=('%d references still around' %
+                              sys.getrefcount(weak_cyclic_object())))
 
         raising_cyclic_object = RunSelfFunction(should_raise=True)
         weak_raising_cyclic_object = weakref.ref(raising_cyclic_object)
         raising_cyclic_object.thread.join()
         del raising_cyclic_object
-        self.assertEquals(None, weak_raising_cyclic_object(),
-                          msg=('%d references still around' %
-                               sys.getrefcount(weak_raising_cyclic_object())))
+        self.assertEqual(None, weak_raising_cyclic_object(),
+                         msg=('%d references still around' %
+                              sys.getrefcount(weak_raising_cyclic_object())))
 
 
 class ThreadJoinOnShutdown(BaseTestCase):

diff --git a/lib-python/2.7.0/distutils/tests/test_build_ext.py b/lib-python/2.7.0/distutils/tests/test_build_ext.py
--- a/lib-python/2.7.0/distutils/tests/test_build_ext.py
+++ b/lib-python/2.7.0/distutils/tests/test_build_ext.py
@@ -103,15 +103,15 @@
         import xx
 
         for attr in ('error', 'foo', 'new', 'roj'):
-            self.assert_(hasattr(xx, attr))
+            self.assertTrue(hasattr(xx, attr))
 
-        self.assertEquals(xx.foo(2, 5), 7)
-        self.assertEquals(xx.foo(13,15), 28)
-        self.assertEquals(xx.new().demo(), None)
+        self.assertEqual(xx.foo(2, 5), 7)
+        self.assertEqual(xx.foo(13,15), 28)
+        self.assertEqual(xx.new().demo(), None)
         doc = 'This is a template module just for instruction.'
-        self.assertEquals(xx.__doc__, doc)
-        self.assert_(isinstance(xx.Null(), xx.Null))
-        self.assert_(isinstance(xx.Str(), xx.Str))
+        self.assertEqual(xx.__doc__, doc)
+        self.assertTrue(isinstance(xx.Null(), xx.Null))
+        self.assertTrue(isinstance(xx.Str(), xx.Str))
 
     def test_solaris_enable_shared(self):
         dist = Distribution({'name': 'xx'})
@@ -132,7 +132,7 @@
                 _config_vars['Py_ENABLE_SHARED'] = old_var
 
         # make sure we get some library dirs under solaris
-        self.assert_(len(cmd.library_dirs) > 0)
+        self.assertTrue(len(cmd.library_dirs) > 0)
 
     def test_finalize_options(self):
         # Make sure Python's include directories (for Python.h, pyconfig.h,
@@ -144,31 +144,31 @@
 
         from distutils import sysconfig
         py_include = sysconfig.get_python_inc()
-        self.assert_(py_include in cmd.include_dirs)
+        self.assertTrue(py_include in cmd.include_dirs)
 
         plat_py_include = sysconfig.get_python_inc(plat_specific=1)
-        self.assert_(plat_py_include in cmd.include_dirs)
+        self.assertTrue(plat_py_include in cmd.include_dirs)
 
         # make sure cmd.libraries is turned into a list
         # if it's a string
         cmd = build_ext(dist)
         cmd.libraries = 'my_lib'
         cmd.finalize_options()
-        self.assertEquals(cmd.libraries, ['my_lib'])
+        self.assertEqual(cmd.libraries, ['my_lib'])
 
         # make sure cmd.library_dirs is turned into a list
         # if it's a string
         cmd = build_ext(dist)
         cmd.library_dirs = 'my_lib_dir'
         cmd.finalize_options()
-        self.assert_('my_lib_dir' in cmd.library_dirs)
+        self.assertTrue('my_lib_dir' in cmd.library_dirs)
 
         # make sure rpath is turned into a list
         # if it's a list of os.pathsep's paths
         cmd = build_ext(dist)
         cmd.rpath = os.pathsep.join(['one', 'two'])
         cmd.finalize_options()
-        self.assertEquals(cmd.rpath, ['one', 'two'])
+        self.assertEqual(cmd.rpath, ['one', 'two'])
 
         # XXX more tests to perform for win32
 
@@ -177,25 +177,25 @@
         cmd = build_ext(dist)
         cmd.define = 'one,two'
         cmd.finalize_options()
-        self.assertEquals(cmd.define, [('one', '1'), ('two', '1')])
+        self.assertEqual(cmd.define, [('one', '1'), ('two', '1')])
 
         # make sure undef is turned into a list of
         # strings if they are ','-separated strings
         cmd = build_ext(dist)
         cmd.undef = 'one,two'
         cmd.finalize_options()
-        self.assertEquals(cmd.undef, ['one', 'two'])
+        self.assertEqual(cmd.undef, ['one', 'two'])
 
         # make sure swig_opts is turned into a list
         cmd = build_ext(dist)
         cmd.swig_opts = None
         cmd.finalize_options()
-        self.assertEquals(cmd.swig_opts, [])
+        self.assertEqual(cmd.swig_opts, [])
 
         cmd = build_ext(dist)
         cmd.swig_opts = '1 2'
         cmd.finalize_options()
-        self.assertEquals(cmd.swig_opts, ['1', '2'])
+        self.assertEqual(cmd.swig_opts, ['1', '2'])
 
     def test_check_extensions_list(self):
         dist = Distribution()
@@ -226,13 +226,13 @@
                              'some': 'bar'})]
         cmd.check_extensions_list(exts)
         ext = exts[0]
-        self.assert_(isinstance(ext, Extension))
+        self.assertTrue(isinstance(ext, Extension))
 
         # check_extensions_list adds in ext the values passed
         # when they are in ('include_dirs', 'library_dirs', 'libraries'
         # 'extra_objects', 'extra_compile_args', 'extra_link_args')
-        self.assertEquals(ext.libraries, 'foo')
-        self.assert_(not hasattr(ext, 'some'))
+        self.assertEqual(ext.libraries, 'foo')
+        self.assertTrue(not hasattr(ext, 'some'))
 
         # 'macros' element of build info dict must be 1- or 2-tuple
         exts = [('foo.bar', {'sources': [''], 'libraries': 'foo',
@@ -241,15 +241,15 @@
 
         exts[0][1]['macros'] = [('1', '2'), ('3',)]
         cmd.check_extensions_list(exts)
-        self.assertEquals(exts[0].undef_macros, ['3'])
-        self.assertEquals(exts[0].define_macros, [('1', '2')])
+        self.assertEqual(exts[0].undef_macros, ['3'])
+        self.assertEqual(exts[0].define_macros, [('1', '2')])
 
     def test_get_source_files(self):
         modules = [Extension('foo', ['xxx'])]
         dist = Distribution({'name': 'xx', 'ext_modules': modules})
         cmd = build_ext(dist)
         cmd.ensure_finalized()
-        self.assertEquals(cmd.get_source_files(), ['xxx'])
+        self.assertEqual(cmd.get_source_files(), ['xxx'])
 
     def test_compiler_option(self):
         # cmd.compiler is an option and
@@ -260,7 +260,7 @@
         cmd.compiler = 'unix'
         cmd.ensure_finalized()
         cmd.run()
-        self.assertEquals(cmd.compiler, 'unix')
+        self.assertEqual(cmd.compiler, 'unix')
 
     def test_get_outputs(self):
         tmp_dir = self.mkdtemp()
@@ -272,7 +272,7 @@
         cmd = build_ext(dist)
         self._fixup_command(cmd)
         cmd.ensure_finalized()
-        self.assertEquals(len(cmd.get_outputs()), 1)
+        self.assertEqual(len(cmd.get_outputs()), 1)
 
         if os.name == "nt":
             cmd.debug = sys.executable.endswith("_d.exe")
@@ -291,20 +291,20 @@
             so_file = cmd.get_outputs()[0]
         finally:
             os.chdir(old_wd)
-        self.assert_(os.path.exists(so_file))
-        self.assertEquals(os.path.splitext(so_file)[-1],
-                          sysconfig.get_config_var('SO'))
+        self.assertTrue(os.path.exists(so_file))
+        self.assertEqual(os.path.splitext(so_file)[-1],
+                         sysconfig.get_config_var('SO'))
         so_dir = os.path.dirname(so_file)
-        self.assertEquals(so_dir, other_tmp_dir)
+        self.assertEqual(so_dir, other_tmp_dir)
         cmd.compiler = None
         cmd.inplace = 0
         cmd.run()
         so_file = cmd.get_outputs()[0]
-        self.assert_(os.path.exists(so_file))
-        self.assertEquals(os.path.splitext(so_file)[-1],
-                          sysconfig.get_config_var('SO'))
+        self.assertTrue(os.path.exists(so_file))
+        self.assertEqual(os.path.splitext(so_file)[-1],
+                         sysconfig.get_config_var('SO'))
         so_dir = os.path.dirname(so_file)
-        self.assertEquals(so_dir, cmd.build_lib)
+        self.assertEqual(so_dir, cmd.build_lib)
 
         # inplace = 0, cmd.package = 'bar'
         build_py = cmd.get_finalized_command('build_py')
@@ -312,7 +312,7 @@
         path = cmd.get_ext_fullpath('foo')
         # checking that the last directory is the build_dir
         path = os.path.split(path)[0]
-        self.assertEquals(path, cmd.build_lib)
+        self.assertEqual(path, cmd.build_lib)
 
         # inplace = 1, cmd.package = 'bar'
         cmd.inplace = 1
@@ -326,7 +326,7 @@
         # checking that the last directory is bar
         path = os.path.split(path)[0]
         lastdir = os.path.split(path)[-1]
-        self.assertEquals(lastdir, 'bar')
+        self.assertEqual(lastdir, 'bar')
 
     def test_ext_fullpath(self):
         ext = sysconfig.get_config_vars()['SO']
@@ -338,14 +338,14 @@
         curdir = os.getcwd()
         wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
         path = cmd.get_ext_fullpath('lxml.etree')
-        self.assertEquals(wanted, path)
+        self.assertEqual(wanted, path)
 
         # building lxml.etree not inplace
         cmd.inplace = 0
         cmd.build_lib = os.path.join(curdir, 'tmpdir')
         wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext)
         path = cmd.get_ext_fullpath('lxml.etree')
-        self.assertEquals(wanted, path)
+        self.assertEqual(wanted, path)
 
         # building twisted.runner.portmap not inplace
         build_py = cmd.get_finalized_command('build_py')
@@ -354,13 +354,13 @@
         path = cmd.get_ext_fullpath('twisted.runner.portmap')
         wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner',
                               'portmap' + ext)
-        self.assertEquals(wanted, path)
+        self.assertEqual(wanted, path)
 
         # building twisted.runner.portmap inplace
         cmd.inplace = 1
         path = cmd.get_ext_fullpath('twisted.runner.portmap')
         wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext)
-        self.assertEquals(wanted, path)
+        self.assertEqual(wanted, path)
 
     def test_build_ext_inplace(self):
         etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c')
@@ -375,7 +375,7 @@
         ext = sysconfig.get_config_var("SO")
         wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
         path = cmd.get_ext_fullpath('lxml.etree')
-        self.assertEquals(wanted, path)
+        self.assertEqual(wanted, path)
 
     def test_setuptools_compat(self):
         import distutils.core, distutils.extension, distutils.command.build_ext
@@ -400,7 +400,7 @@
             ext = sysconfig.get_config_var("SO")
             wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
             path = cmd.get_ext_fullpath('lxml.etree')
-            self.assertEquals(wanted, path)
+            self.assertEqual(wanted, path)
         finally:
             # restoring Distutils' Extension class otherwise its broken
             distutils.extension.Extension = saved_ext
@@ -415,7 +415,7 @@
         ext_name = os.path.join('UpdateManager', 'fdsend')
         ext_path = cmd.get_ext_fullpath(ext_name)
         wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext)
-        self.assertEquals(ext_path, wanted)
+        self.assertEqual(ext_path, wanted)
 
     def test_build_ext_path_cross_platform(self):
         if sys.platform != 'win32':
@@ -428,7 +428,7 @@
         ext_name = 'UpdateManager/fdsend'
         ext_path = cmd.get_ext_fullpath(ext_name)
         wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext)
-        self.assertEquals(ext_path, wanted)
+        self.assertEqual(ext_path, wanted)
 
 def test_suite():
     return unittest.makeSuite(BuildExtTestCase)

diff --git a/lib-python/2.7.0/test/test_linecache.py b/lib-python/2.7.0/test/test_linecache.py
--- a/lib-python/2.7.0/test/test_linecache.py
+++ b/lib-python/2.7.0/test/test_linecache.py
@@ -42,31 +42,31 @@
         getline = linecache.getline
 
         # Bad values for line number should return an empty string
-        self.assertEquals(getline(FILENAME, 2**15), EMPTY)
-        self.assertEquals(getline(FILENAME, -1), EMPTY)
+        self.assertEqual(getline(FILENAME, 2**15), EMPTY)
+        self.assertEqual(getline(FILENAME, -1), EMPTY)
 
         # Float values currently raise TypeError, should it?
         self.assertRaises(TypeError, getline, FILENAME, 1.1)
 
         # Bad filenames should return an empty string
-        self.assertEquals(getline(EMPTY, 1), EMPTY)
-        self.assertEquals(getline(INVALID_NAME, 1), EMPTY)
+        self.assertEqual(getline(EMPTY, 1), EMPTY)
+        self.assertEqual(getline(INVALID_NAME, 1), EMPTY)
 
         # Check whether lines correspond to those from file iteration
         for entry in TESTS:
             filename = os.path.join(TEST_PATH, entry) + '.py'
             for index, line in enumerate(open(filename)):
-                self.assertEquals(line, getline(filename, index + 1))
+                self.assertEqual(line, getline(filename, index + 1))
 
         # Check module loading
         for entry in MODULES:
             filename = os.path.join(MODULE_PATH, entry) + '.py'
             for index, line in enumerate(open(filename)):
-                self.assertEquals(line, getline(filename, index + 1))
+                self.assertEqual(line, getline(filename, index + 1))
 
         # Check that bogus data isn't returned (issue #1309567)
         empty = linecache.getlines('a/b/c/__init__.py')
-        self.assertEquals(empty, [])
+        self.assertEqual(empty, [])
 
     def test_no_ending_newline(self):
         self.addCleanup(support.unlink, support.TESTFN)
@@ -84,12 +84,12 @@
 
         # Are all files cached?
         cached_empty = [fn for fn in cached if fn not in linecache.cache]
-        self.assertEquals(cached_empty, [])
+        self.assertEqual(cached_empty, [])
 
         # Can we clear the cache?
         linecache.clearcache()
         cached_empty = [fn for fn in cached if fn in linecache.cache]
-        self.assertEquals(cached_empty, [])
+        self.assertEqual(cached_empty, [])
 
     def test_checkcache(self):
         getline = linecache.getline
@@ -104,7 +104,7 @@
         source_list = []
         with open(source_name) as source:
             for index, line in enumerate(source):
-                self.assertEquals(line, getline(source_name, index + 1))
+                self.assertEqual(line, getline(source_name, index + 1))
                 source_list.append(line)
 
         with open(source_name, 'w') as source:
@@ -115,13 +115,13 @@
 
         # Check that the cache matches the old contents
         for index, line in enumerate(source_list):
-            self.assertEquals(line, getline(source_name, index + 1))
+            self.assertEqual(line, getline(source_name, index + 1))
 
         # Update the cache and check whether it matches the new source file
         linecache.checkcache(source_name)
         with open(source_name) as source:
             for index, line in enumerate(source):
-                self.assertEquals(line, getline(source_name, index + 1))
+                self.assertEqual(line, getline(source_name, index + 1))
                 source_list.append(line)
 
 def test_main():

diff --git a/lib-python/2.7.0/test/test_int.py b/lib-python/2.7.0/test/test_int.py
--- a/lib-python/2.7.0/test/test_int.py
+++ b/lib-python/2.7.0/test/test_int.py
@@ -392,7 +392,7 @@
                 try:
                     int(TruncReturnsNonIntegral())
                 except TypeError as e:
-                    self.assertEquals(str(e),
+                    self.assertEqual(str(e),
                                       "__trunc__ returned non-Integral"
                                       " (type NonIntegral)")
                 else:

diff --git a/lib-python/2.7.0/distutils/tests/test_core.py b/lib-python/2.7.0/distutils/tests/test_core.py
--- a/lib-python/2.7.0/distutils/tests/test_core.py
+++ b/lib-python/2.7.0/distutils/tests/test_core.py
@@ -52,7 +52,11 @@
             shutil.rmtree(path)
 
     def write_setup(self, text, path=test.test_support.TESTFN):
-        open(path, "w").write(text)
+        f = open(path, "w")
+        try:
+            f.write(text)
+        finally:
+            f.close()
         return path
 
     def test_run_setup_provides_file(self):
@@ -85,7 +89,7 @@
         with captured_stdout() as stdout:
             distutils.core.setup(name='bar')
         stdout.seek(0)
-        self.assertEquals(stdout.read(), 'bar\n')
+        self.assertEqual(stdout.read(), 'bar\n')
 
         distutils.core.DEBUG = True
         try:
@@ -95,7 +99,7 @@
             distutils.core.DEBUG = False
         stdout.seek(0)
         wanted = "options (after parsing config files):\n"
-        self.assertEquals(stdout.readlines()[0], wanted)
+        self.assertEqual(stdout.readlines()[0], wanted)
 
 def test_suite():
     return unittest.makeSuite(CoreTestCase)

diff --git a/lib-python/2.7.0/bsddb/test/test_join.py b/lib-python/2.7.0/bsddb/test/test_join.py
--- a/lib-python/2.7.0/bsddb/test/test_join.py
+++ b/lib-python/2.7.0/bsddb/test/test_join.py
@@ -67,7 +67,7 @@
             # Don't do the .set() in an assert, or you can get a bogus failure
             # when running python -O
             tmp = sCursor.set('red')
-            self.assert_(tmp)
+            self.assertTrue(tmp)
 
             # FIXME: jCursor doesn't properly hold a reference to its
             # cursors, if they are closed before jcursor is used it

diff --git a/lib-python/2.7.0/bsddb/test/test_associate.py b/lib-python/2.7.0/bsddb/test/test_associate.py
--- a/lib-python/2.7.0/bsddb/test/test_associate.py
+++ b/lib-python/2.7.0/bsddb/test/test_associate.py
@@ -233,7 +233,7 @@
         self.assertEqual(vals, None, vals)
 
         vals = secDB.pget('Unknown', txn=txn)
-        self.assert_(vals[0] == 99 or vals[0] == '99', vals)
+        self.assertTrue(vals[0] == 99 or vals[0] == '99', vals)
         vals[1].index('Unknown')
         vals[1].index('Unnamed')
         vals[1].index('unknown')
@@ -245,9 +245,9 @@
         rec = self.cur.first()
         while rec is not None:
             if type(self.keytype) == type(''):
-                self.assert_(int(rec[0]))  # for primary db, key is a number
+                self.assertTrue(int(rec[0]))  # for primary db, key is a number
             else:
-                self.assert_(rec[0] and type(rec[0]) == type(0))
+                self.assertTrue(rec[0] and type(rec[0]) == type(0))
             count = count + 1
             if verbose:
                 print rec
@@ -262,7 +262,7 @@
 
         # test cursor pget
         vals = self.cur.pget('Unknown', flags=db.DB_LAST)
-        self.assert_(vals[1] == 99 or vals[1] == '99', vals)
+        self.assertTrue(vals[1] == 99 or vals[1] == '99', vals)
         self.assertEqual(vals[0], 'Unknown')
         vals[2].index('Unknown')
         vals[2].index('Unnamed')

diff --git a/lib-python/2.7.0/distutils/command/install.py b/lib-python/2.7.0/distutils/command/install.py
--- a/lib-python/2.7.0/distutils/command/install.py
+++ b/lib-python/2.7.0/distutils/command/install.py
@@ -6,7 +6,7 @@
 
 # This module should be kept compatible with Python 2.1.
 
-__revision__ = "$Id: install.py 80804 2010-05-05 19:09:31Z ronald.oussoren $"
+__revision__ = "$Id$"
 
 import sys, os, string
 from types import *

diff --git a/lib-python/2.7.0/distutils/sysconfig.py b/lib-python/2.7.0/distutils/sysconfig.py
--- a/lib-python/2.7.0/distutils/sysconfig.py
+++ b/lib-python/2.7.0/distutils/sysconfig.py
@@ -9,7 +9,7 @@
 Email:        <fdrake at acm.org>
 """
 
-__revision__ = "$Id: sysconfig.py 85358 2010-10-10 09:54:59Z antoine.pitrou $"
+__revision__ = "$Id$"
 
 import os
 import re
@@ -453,32 +453,6 @@
     _config_vars = g
 
 
-def _init_mac():
-    """Initialize the module as appropriate for Macintosh systems"""
-    g = {}
-    # set basic install directories
-    g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
-    g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)
-
-    # XXX hmmm.. a normal install puts include files here
-    g['INCLUDEPY'] = get_python_inc(plat_specific=0)
-
-    import MacOS
-    if not hasattr(MacOS, 'runtimemodel'):
-        g['SO'] = '.ppc.slb'
-    else:
-        g['SO'] = '.%s.slb' % MacOS.runtimemodel
-
-    # XXX are these used anywhere?
-    g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib")
-    g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib")
-
-    # These are used by the extension module build
-    g['srcdir'] = ':'
-    global _config_vars
-    _config_vars = g
-
-
 def _init_os2():
     """Initialize the module as appropriate for OS/2"""
     g = {}

diff --git a/lib-python/2.7.0/distutils/command/build_scripts.py b/lib-python/2.7.0/distutils/command/build_scripts.py
--- a/lib-python/2.7.0/distutils/command/build_scripts.py
+++ b/lib-python/2.7.0/distutils/command/build_scripts.py
@@ -2,7 +2,7 @@
 
 Implements the Distutils 'build_scripts' command."""
 
-__revision__ = "$Id: build_scripts.py 77704 2010-01-23 09:23:15Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os, re
 from stat import ST_MODE

diff --git a/lib-python/2.7.0/test/test_optparse.py b/lib-python/2.7.0/test/test_optparse.py
--- a/lib-python/2.7.0/test/test_optparse.py
+++ b/lib-python/2.7.0/test/test_optparse.py
@@ -3,7 +3,7 @@
 # (taradino at softhome.net) -- translated from the original Optik
 # test suite to this PyUnit-based version.
 #
-# $Id: test_optparse.py 83429 2010-08-01 19:14:56Z georg.brandl $
+# $Id$
 #
 
 import sys
@@ -427,19 +427,19 @@
 
     def test_str_aliases_string(self):
         self.parser.add_option("-s", type="str")
-        self.assertEquals(self.parser.get_option("-s").type, "string")
+        self.assertEqual(self.parser.get_option("-s").type, "string")
 
     def test_new_type_object(self):
         self.parser.add_option("-s", type=str)
-        self.assertEquals(self.parser.get_option("-s").type, "string")
+        self.assertEqual(self.parser.get_option("-s").type, "string")
         self.parser.add_option("-x", type=int)
-        self.assertEquals(self.parser.get_option("-x").type, "int")
+        self.assertEqual(self.parser.get_option("-x").type, "int")
 
     def test_old_type_object(self):
         self.parser.add_option("-s", type=types.StringType)
-        self.assertEquals(self.parser.get_option("-s").type, "string")
+        self.assertEqual(self.parser.get_option("-s").type, "string")
         self.parser.add_option("-x", type=types.IntType)
-        self.assertEquals(self.parser.get_option("-x").type, "int")
+        self.assertEqual(self.parser.get_option("-x").type, "int")
 
 
 # Custom type for testing processing of default values.

diff --git a/lib-python/2.7.0/test/test_slice.py b/lib-python/2.7.0/test/test_slice.py
--- a/lib-python/2.7.0/test/test_slice.py
+++ b/lib-python/2.7.0/test/test_slice.py
@@ -117,7 +117,7 @@
         x = X()
         with test_support.check_py3k_warnings():
             x[1:2] = 42
-        self.assertEquals(tmp, [(1, 2, 42)])
+        self.assertEqual(tmp, [(1, 2, 42)])
 
     def test_pickle(self):
         s = slice(10, 20, 3)

diff --git a/lib-python/2.7.0/test/test_collections.py b/lib-python/2.7.0/test/test_collections.py
--- a/lib-python/2.7.0/test/test_collections.py
+++ b/lib-python/2.7.0/test/test_collections.py
@@ -674,9 +674,9 @@
                     ]):
             msg = (i, dup, words)
             self.assertTrue(dup is not words)
-            self.assertEquals(dup, words)
-            self.assertEquals(len(dup), len(words))
-            self.assertEquals(type(dup), type(words))
+            self.assertEqual(dup, words)
+            self.assertEqual(len(dup), len(words))
+            self.assertEqual(type(dup), type(words))
 
     def test_conversions(self):
         # Convert to: set, list, dict
@@ -897,10 +897,10 @@
                     OrderedDict(od),
                     ]):
             self.assertTrue(dup is not od)
-            self.assertEquals(dup, od)
-            self.assertEquals(list(dup.items()), list(od.items()))
-            self.assertEquals(len(dup), len(od))
-            self.assertEquals(type(dup), type(od))
+            self.assertEqual(dup, od)
+            self.assertEqual(list(dup.items()), list(od.items()))
+            self.assertEqual(len(dup), len(od))
+            self.assertEqual(type(dup), type(od))
 
     def test_yaml_linkage(self):
         # Verify that __reduce__ is setup in a way that supports PyYAML's dump() feature.

diff --git a/lib-python/2.7.0/test/test_exceptions.py b/lib-python/2.7.0/test/test_exceptions.py
--- a/lib-python/2.7.0/test/test_exceptions.py
+++ b/lib-python/2.7.0/test/test_exceptions.py
@@ -32,8 +32,8 @@
             raise exc("spam")
         except exc, err:
             buf2 = str(err)
-        self.assertEquals(buf1, buf2)
-        self.assertEquals(exc.__name__, excname)
+        self.assertEqual(buf1, buf2)
+        self.assertEqual(exc.__name__, excname)
 
     def testRaising(self):
         self.raise_catch(AttributeError, "AttributeError")
@@ -163,7 +163,7 @@
             except TypeError, err:
                 exc, err, tb = sys.exc_info()
                 co = tb.tb_frame.f_code
-                self.assertEquals(co.co_name, "test_capi1")
+                self.assertEqual(co.co_name, "test_capi1")
                 self.assertTrue(co.co_filename.endswith('test_exceptions'+os.extsep+'py'))
             else:
                 self.fail("Expected exception")
@@ -175,10 +175,10 @@
             except RuntimeError, err:
                 exc, err, tb = sys.exc_info()
                 co = tb.tb_frame.f_code
-                self.assertEquals(co.co_name, "__init__")
+                self.assertEqual(co.co_name, "__init__")
                 self.assertTrue(co.co_filename.endswith('test_exceptions'+os.extsep+'py'))
                 co2 = tb.tb_frame.f_back.f_code
-                self.assertEquals(co2.co_name, "test_capi2")
+                self.assertEqual(co2.co_name, "test_capi2")
             else:
                 self.fail("Expected exception")
 
@@ -284,14 +284,14 @@
                 if type(e) is not exc:
                     raise
                 # Verify module name
-                self.assertEquals(type(e).__module__, 'exceptions')
+                self.assertEqual(type(e).__module__, 'exceptions')
                 # Verify no ref leaks in Exc_str()
                 s = str(e)
                 for checkArgName in expected:
-                    self.assertEquals(repr(getattr(e, checkArgName)),
-                                      repr(expected[checkArgName]),
-                                      'exception "%s", attribute "%s"' %
-                                       (repr(e), checkArgName))
+                    self.assertEqual(repr(getattr(e, checkArgName)),
+                                     repr(expected[checkArgName]),
+                                     'exception "%s", attribute "%s"' %
+                                      (repr(e), checkArgName))
 
                 # test for pickling support
                 for p in pickle, cPickle:
@@ -300,9 +300,9 @@
                         for checkArgName in expected:
                             got = repr(getattr(new, checkArgName))
                             want = repr(expected[checkArgName])
-                            self.assertEquals(got, want,
-                                              'pickled "%r", attribute "%s"' %
-                                              (e, checkArgName))
+                            self.assertEqual(got, want,
+                                             'pickled "%r", attribute "%s"' %
+                                             (e, checkArgName))
 
 
     def testDeprecatedMessageAttribute(self):
@@ -359,7 +359,7 @@
                 self.fancy_arg = fancy_arg
 
         x = DerivedException(fancy_arg=42)
-        self.assertEquals(x.fancy_arg, 42)
+        self.assertEqual(x.fancy_arg, 42)
 
     def testInfiniteRecursion(self):
         def f():

diff --git a/lib-python/2.7.0/distutils/text_file.py b/lib-python/2.7.0/distutils/text_file.py
--- a/lib-python/2.7.0/distutils/text_file.py
+++ b/lib-python/2.7.0/distutils/text_file.py
@@ -4,7 +4,7 @@
 that (optionally) takes care of stripping comments, ignoring blank
 lines, and joining lines with backslashes."""
 
-__revision__ = "$Id: text_file.py 76956 2009-12-21 01:22:46Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys
 

diff --git a/lib-python/2.7.0/test/test_trace.py b/lib-python/2.7.0/test/test_trace.py
--- a/lib-python/2.7.0/test/test_trace.py
+++ b/lib-python/2.7.0/test/test_trace.py
@@ -309,7 +309,7 @@
             self._coverage(tracer)
         if os.path.exists(TESTFN):
             files = os.listdir(TESTFN)
-            self.assertEquals(files, [])
+            self.assertEqual(files, [])
 
     def test_issue9936(self):
         tracer = trace.Trace(trace=0, count=1)

diff --git a/lib-python/2.7.0/test/test_cprofile.py b/lib-python/2.7.0/test/test_cprofile.py
--- a/lib-python/2.7.0/test/test_cprofile.py
+++ b/lib-python/2.7.0/test/test_cprofile.py
@@ -39,7 +39,7 @@
 # Don't remove this comment. Everything below it is auto-generated.
 #--cut--------------------------------------------------------------------------
 CProfileTest.expected_output['print_stats'] = """\
-         126 function calls (106 primitive calls) in 1.000 CPU seconds
+         126 function calls (106 primitive calls) in 1.000 seconds
 
    Ordered by: standard name
 

diff --git a/lib-python/2.7.0/test/test_frozen.py b/lib-python/2.7.0/test/test_frozen.py
--- a/lib-python/2.7.0/test/test_frozen.py
+++ b/lib-python/2.7.0/test/test_frozen.py
@@ -30,8 +30,8 @@
             else:
                 self.fail("import __phello__.foo should have failed")
 
-        self.assertEquals(stdout.getvalue(),
-                          'Hello world...\nHello world...\nHello world...\n')
+        self.assertEqual(stdout.getvalue(),
+                         'Hello world...\nHello world...\nHello world...\n')
 
         del sys.modules['__hello__']
         del sys.modules['__phello__']

diff --git a/lib-python/2.7.0/distutils/msvccompiler.py b/lib-python/2.7.0/distutils/msvccompiler.py
--- a/lib-python/2.7.0/distutils/msvccompiler.py
+++ b/lib-python/2.7.0/distutils/msvccompiler.py
@@ -8,7 +8,7 @@
 # hacked by Robin Becker and Thomas Heller to do a better job of
 #   finding DevStudio (through the registry)
 
-__revision__ = "$Id: msvccompiler.py 76956 2009-12-21 01:22:46Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys
 import os

diff --git a/lib-python/2.7.0/bsddb/test/test_dbshelve.py b/lib-python/2.7.0/bsddb/test/test_dbshelve.py
--- a/lib-python/2.7.0/bsddb/test/test_dbshelve.py
+++ b/lib-python/2.7.0/bsddb/test/test_dbshelve.py
@@ -255,7 +255,7 @@
             self.assertEqual(value.L, [x] * 10)
 
         else:
-            self.assert_(0, 'Unknown key type, fix the test')
+            self.assertTrue(0, 'Unknown key type, fix the test')
 
 #----------------------------------------------------------------------
 

diff --git a/lib-python/2.7.0/distutils/command/build_py.py b/lib-python/2.7.0/distutils/command/build_py.py
--- a/lib-python/2.7.0/distutils/command/build_py.py
+++ b/lib-python/2.7.0/distutils/command/build_py.py
@@ -2,7 +2,7 @@
 
 Implements the Distutils 'build_py' command."""
 
-__revision__ = "$Id: build_py.py 76956 2009-12-21 01:22:46Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 import sys

diff --git a/lib-python/2.7.0/test/test_pty.py b/lib-python/2.7.0/test/test_pty.py
--- a/lib-python/2.7.0/test/test_pty.py
+++ b/lib-python/2.7.0/test/test_pty.py
@@ -86,7 +86,7 @@
         fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags | os.O_NONBLOCK)
         try:
             s1 = os.read(master_fd, 1024)
-            self.assertEquals('', s1)
+            self.assertEqual('', s1)
         except OSError, e:
             if e.errno != errno.EAGAIN:
                 raise
@@ -96,14 +96,14 @@
         debug("Writing to slave_fd")
         os.write(slave_fd, TEST_STRING_1)
         s1 = os.read(master_fd, 1024)
-        self.assertEquals('I wish to buy a fish license.\n',
-                          normalize_output(s1))
+        self.assertEqual('I wish to buy a fish license.\n',
+                         normalize_output(s1))
 
         debug("Writing chunked output")
         os.write(slave_fd, TEST_STRING_2[:5])
         os.write(slave_fd, TEST_STRING_2[5:])
         s2 = os.read(master_fd, 1024)
-        self.assertEquals('For my pet fish, Eric.\n', normalize_output(s2))
+        self.assertEqual('For my pet fish, Eric.\n', normalize_output(s2))
 
         os.close(slave_fd)
         os.close(master_fd)

diff --git a/lib-python/2.7.0/test/test_descr.py b/lib-python/2.7.0/test/test_descr.py
--- a/lib-python/2.7.0/test/test_descr.py
+++ b/lib-python/2.7.0/test/test_descr.py
@@ -4534,11 +4534,11 @@
             __getattr__ = descr
 
         self.assertRaises(AttributeError, getattr, A(), "attr")
-        self.assertEquals(descr.counter, 1)
+        self.assertEqual(descr.counter, 1)
         self.assertRaises(AttributeError, getattr, B(), "attr")
-        self.assertEquals(descr.counter, 2)
+        self.assertEqual(descr.counter, 2)
         self.assertRaises(AttributeError, getattr, C(), "attr")
-        self.assertEquals(descr.counter, 4)
+        self.assertEqual(descr.counter, 4)
 
         import gc
         class EvilGetattribute(object):
@@ -4565,7 +4565,7 @@
         # Testing dict-proxy iterkeys...
         keys = [ key for key in self.C.__dict__.iterkeys() ]
         keys.sort()
-        self.assertEquals(keys, ['__dict__', '__doc__', '__module__',
+        self.assertEqual(keys, ['__dict__', '__doc__', '__module__',
             '__weakref__', 'meth'])
 
     def test_iter_values(self):

diff --git a/lib-python/2.7.0/json/tests/test_dump.py b/lib-python/2.7.0/json/tests/test_dump.py
--- a/lib-python/2.7.0/json/tests/test_dump.py
+++ b/lib-python/2.7.0/json/tests/test_dump.py
@@ -7,15 +7,15 @@
     def test_dump(self):
         sio = StringIO()
         json.dump({}, sio)
-        self.assertEquals(sio.getvalue(), '{}')
+        self.assertEqual(sio.getvalue(), '{}')
 
     def test_dumps(self):
-        self.assertEquals(json.dumps({}), '{}')
+        self.assertEqual(json.dumps({}), '{}')
 
     def test_encode_truefalse(self):
-        self.assertEquals(json.dumps(
+        self.assertEqual(json.dumps(
                  {True: False, False: True}, sort_keys=True),
                  '{"false": true, "true": false}')
-        self.assertEquals(json.dumps(
+        self.assertEqual(json.dumps(
                 {2: 3.0, 4.0: 5L, False: 1, 6L: True}, sort_keys=True),
                 '{"false": 1, "2": 3.0, "4.0": 5, "6": true}')

diff --git a/lib-python/2.7.0/test/test_cgi.py b/lib-python/2.7.0/test/test_cgi.py
--- a/lib-python/2.7.0/test/test_cgi.py
+++ b/lib-python/2.7.0/test/test_cgi.py
@@ -251,7 +251,7 @@
 -----------------------------721837373350705526688164684--
 """
         fs = cgi.FieldStorage(fp=StringIO(postdata), environ=env)
-        self.assertEquals(len(fs.list), 4)
+        self.assertEqual(len(fs.list), 4)
         expect = [{'name':'id', 'filename':None, 'value':'1234'},
                   {'name':'title', 'filename':None, 'value':''},
                   {'name':'file', 'filename':'test.txt','value':'Testing 123.\n'},
@@ -259,7 +259,7 @@
         for x in range(len(fs.list)):
             for k, exp in expect[x].items():
                 got = getattr(fs.list[x], k)
-                self.assertEquals(got, exp)
+                self.assertEqual(got, exp)
 
     _qs_result = {
         'key1': 'value1',

diff --git a/lib-python/2.7.0/test/test_strop.py b/lib-python/2.7.0/test/test_strop.py
--- a/lib-python/2.7.0/test/test_strop.py
+++ b/lib-python/2.7.0/test/test_strop.py
@@ -123,7 +123,7 @@
         except OverflowError:
             pass
         else:
-            self.assertEquals(len(r), len(a) * 3)
+            self.assertEqual(len(r), len(a) * 3)
 
     @test_support.precisionbigmemtest(size=test_support._2G - 1, memuse=1)
     def test_stropjoin_huge_tup(self, size):
@@ -133,7 +133,7 @@
         except OverflowError:
             pass # acceptable on 32-bit
         else:
-            self.assertEquals(len(r), len(a) * 3)
+            self.assertEqual(len(r), len(a) * 3)
 
 transtable = '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037 !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`xyzdefghijklmnopqrstuvwxyz{|}~\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377'
 

diff --git a/lib-python/2.7.0/test/test_ioctl.py b/lib-python/2.7.0/test/test_ioctl.py
--- a/lib-python/2.7.0/test/test_ioctl.py
+++ b/lib-python/2.7.0/test/test_ioctl.py
@@ -50,7 +50,7 @@
         with open("/dev/tty", "r") as tty:
             r = fcntl.ioctl(tty, termios.TIOCGPGRP, buf, 1)
         rpgrp = buf[0]
-        self.assertEquals(r, 0)
+        self.assertEqual(r, 0)
         self.assertIn(rpgrp, ids)
 
     def test_ioctl_mutate(self):

diff --git a/lib-python/2.7.0/test/test_sys.py b/lib-python/2.7.0/test/test_sys.py
--- a/lib-python/2.7.0/test/test_sys.py
+++ b/lib-python/2.7.0/test/test_sys.py
@@ -120,7 +120,7 @@
         try:
             sys.exit(0)
         except SystemExit, exc:
-            self.assertEquals(exc.code, 0)
+            self.assertEqual(exc.code, 0)
         except:
             self.fail("wrong exception")
         else:
@@ -131,7 +131,7 @@
         try:
             sys.exit(42)
         except SystemExit, exc:
-            self.assertEquals(exc.code, 42)
+            self.assertEqual(exc.code, 42)
         except:
             self.fail("wrong exception")
         else:
@@ -141,7 +141,7 @@
         try:
             sys.exit((42,))
         except SystemExit, exc:
-            self.assertEquals(exc.code, 42)
+            self.assertEqual(exc.code, 42)
         except:
             self.fail("wrong exception")
         else:
@@ -151,7 +151,7 @@
         try:
             sys.exit("exit")
         except SystemExit, exc:
-            self.assertEquals(exc.code, "exit")
+            self.assertEqual(exc.code, "exit")
         except:
             self.fail("wrong exception")
         else:
@@ -161,7 +161,7 @@
         try:
             sys.exit((17, 23))
         except SystemExit, exc:
-            self.assertEquals(exc.code, (17, 23))
+            self.assertEqual(exc.code, (17, 23))
         except:
             self.fail("wrong exception")
         else:
@@ -213,7 +213,7 @@
         orig = sys.getcheckinterval()
         for n in 0, 100, 120, orig: # orig last to restore starting state
             sys.setcheckinterval(n)
-            self.assertEquals(sys.getcheckinterval(), n)
+            self.assertEqual(sys.getcheckinterval(), n)
 
     def test_recursionlimit(self):
         self.assertRaises(TypeError, sys.getrecursionlimit, 42)

diff --git a/lib-python/2.7.0/test/test_bigaddrspace.py b/lib-python/2.7.0/test/test_bigaddrspace.py
--- a/lib-python/2.7.0/test/test_bigaddrspace.py
+++ b/lib-python/2.7.0/test/test_bigaddrspace.py
@@ -28,7 +28,7 @@
             pass
         else:
             self.fail("should have raised OverflowError")
-        self.assertEquals(len(x), MAX_Py_ssize_t)
+        self.assertEqual(len(x), MAX_Py_ssize_t)
 
     ### the following test is pending a patch
     #   (http://mail.python.org/pipermail/python-dev/2006-July/067774.html)

diff --git a/lib-python/2.7.0/test/test_long.py b/lib-python/2.7.0/test/test_long.py
--- a/lib-python/2.7.0/test/test_long.py
+++ b/lib-python/2.7.0/test/test_long.py
@@ -530,9 +530,9 @@
                 try:
                     long(TruncReturnsNonIntegral())
                 except TypeError as e:
-                    self.assertEquals(str(e),
-                                      "__trunc__ returned non-Integral"
-                                      " (type NonIntegral)")
+                    self.assertEqual(str(e),
+                                     "__trunc__ returned non-Integral"
+                                     " (type NonIntegral)")
                 else:
                     self.fail("Failed to raise TypeError with %s" %
                               ((base, trunc_result_base),))

diff --git a/lib-python/2.7.0/distutils/command/clean.py b/lib-python/2.7.0/distutils/command/clean.py
--- a/lib-python/2.7.0/distutils/command/clean.py
+++ b/lib-python/2.7.0/distutils/command/clean.py
@@ -4,7 +4,7 @@
 
 # contributed by Bastian Kleineidam <calvin at cs.uni-sb.de>, added 2000-03-18
 
-__revision__ = "$Id: clean.py 70886 2009-03-31 20:50:59Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 from distutils.core import Command

diff --git a/lib-python/2.7.0/pickle.py b/lib-python/2.7.0/pickle.py
--- a/lib-python/2.7.0/pickle.py
+++ b/lib-python/2.7.0/pickle.py
@@ -24,7 +24,7 @@
 
 """
 
-__version__ = "$Revision: 72223 $"       # Code version
+__version__ = "$Revision$"       # Code version
 
 from types import *
 from copy_reg import dispatch_table

diff --git a/lib-python/2.7.0/test/test_hashlib.py b/lib-python/2.7.0/test/test_hashlib.py
--- a/lib-python/2.7.0/test/test_hashlib.py
+++ b/lib-python/2.7.0/test/test_hashlib.py
@@ -1,6 +1,6 @@
 # Test hashlib module
 #
-# $Id: test_hashlib.py 80564 2010-04-27 22:59:35Z victor.stinner $
+# $Id$
 #
 #  Copyright (C) 2005-2010   Gregory P. Smith (greg at krypto.org)
 #  Licensed to PSF under a Contributor Agreement.

diff --git a/lib-python/2.7.0/test/test_mhlib.py b/lib-python/2.7.0/test/test_mhlib.py
--- a/lib-python/2.7.0/test/test_mhlib.py
+++ b/lib-python/2.7.0/test/test_mhlib.py
@@ -148,7 +148,7 @@
         writeCurMessage('inbox', 2)
         mh = getMH()
 
-        eq = self.assertEquals
+        eq = self.assertEqual
         eq(mh.getprofile('Editor'), 'emacs')
         eq(mh.getprofile('not-set'), None)
         eq(mh.getpath(), os.path.abspath(_mhpath))
@@ -171,7 +171,7 @@
 
     def test_listfolders(self):
         mh = getMH()
-        eq = self.assertEquals
+        eq = self.assertEqual
 
         folders = mh.listfolders()
         folders.sort()
@@ -198,7 +198,7 @@
 
     def test_sequence(self):
         mh = getMH()
-        eq = self.assertEquals
+        eq = self.assertEqual
         writeCurMessage('wide', 55)
 
         f = mh.openfolder('wide')
@@ -253,7 +253,7 @@
 
     def test_modify(self):
         mh = getMH()
-        eq = self.assertEquals
+        eq = self.assertEqual
 
         mh.makefolder("dummy1")
         self.assertIn("dummy1", mh.listfolders())
@@ -315,7 +315,7 @@
 
     def test_read(self):
         mh = getMH()
-        eq = self.assertEquals
+        eq = self.assertEqual
 
         f = mh.openfolder('inbox')
         msg = f.openmessage(1)

diff --git a/lib-python/2.7.0/test/seq_tests.py b/lib-python/2.7.0/test/seq_tests.py
--- a/lib-python/2.7.0/test/seq_tests.py
+++ b/lib-python/2.7.0/test/seq_tests.py
@@ -131,8 +131,8 @@
             self.assertRaises(ZeroDivisionError, self.type2test, IterGenExc(s))
 
     def test_truth(self):
-        self.assert_(not self.type2test())
-        self.assert_(self.type2test([42]))
+        self.assertFalse(self.type2test())
+        self.assertTrue(self.type2test([42]))
 
     def test_getitem(self):
         u = self.type2test([0, 1, 2, 3, 4])
@@ -270,7 +270,7 @@
             pass
         u3 = subclass([0, 1])
         self.assertEqual(u3, u3*1)
-        self.assert_(u3 is not u3*1)
+        self.assertIsNot(u3, u3*1)
 
     def test_iadd(self):
         u = self.type2test([0, 1])

diff --git a/lib-python/2.7.0/distutils/command/upload.py b/lib-python/2.7.0/distutils/command/upload.py
--- a/lib-python/2.7.0/distutils/command/upload.py
+++ b/lib-python/2.7.0/distutils/command/upload.py
@@ -79,7 +79,11 @@
 
         # Fill in the data - send all the meta-data in case we need to
         # register a new release
-        content = open(filename,'rb').read()
+        f = open(filename,'rb')
+        try:
+            content = f.read()
+        finally:
+            f.close()
         meta = self.distribution.metadata
         data = {
             # action

diff --git a/lib-python/2.7.0/distutils/tests/test_spawn.py b/lib-python/2.7.0/distutils/tests/test_spawn.py
--- a/lib-python/2.7.0/distutils/tests/test_spawn.py
+++ b/lib-python/2.7.0/distutils/tests/test_spawn.py
@@ -20,7 +20,7 @@
                                (['nochange', 'nospace'],
                                 ['nochange', 'nospace'])):
             res = _nt_quote_args(args)
-            self.assertEquals(res, wanted)
+            self.assertEqual(res, wanted)
 
 
     @unittest.skipUnless(os.name in ('nt', 'posix'),

diff --git a/lib-python/2.7.0/test/test_pep247.py b/lib-python/2.7.0/test/test_pep247.py
--- a/lib-python/2.7.0/test/test_pep247.py
+++ b/lib-python/2.7.0/test/test_pep247.py
@@ -39,24 +39,24 @@
             obj3.update('string')
             h2 = obj3.digest()
 
-        self.assertEquals(h1, h2)
+        self.assertEqual(h1, h2)
 
         self.assertTrue(hasattr(obj1, 'digest_size'))
 
         if not module.digest_size is None:
-            self.assertEquals(obj1.digest_size, module.digest_size)
+            self.assertEqual(obj1.digest_size, module.digest_size)
 
-        self.assertEquals(obj1.digest_size, len(h1))
+        self.assertEqual(obj1.digest_size, len(h1))
         obj1.update('string')
         obj_copy = obj1.copy()
-        self.assertEquals(obj1.digest(), obj_copy.digest())
-        self.assertEquals(obj1.hexdigest(), obj_copy.hexdigest())
+        self.assertEqual(obj1.digest(), obj_copy.digest())
+        self.assertEqual(obj1.hexdigest(), obj_copy.hexdigest())
 
         digest, hexdigest = obj1.digest(), obj1.hexdigest()
         hd2 = ""
         for byte in digest:
             hd2 += '%02x' % ord(byte)
-        self.assertEquals(hd2, hexdigest)
+        self.assertEqual(hd2, hexdigest)
 
     def test_md5(self):
         self.check_module(md5)

diff --git a/lib-python/2.7.0/distutils/tests/test_config_cmd.py b/lib-python/2.7.0/distutils/tests/test_config_cmd.py
--- a/lib-python/2.7.0/distutils/tests/test_config_cmd.py
+++ b/lib-python/2.7.0/distutils/tests/test_config_cmd.py
@@ -34,7 +34,7 @@
             f.close()
 
         dump_file(this_file, 'I am the header')
-        self.assertEquals(len(self._logs), numlines+1)
+        self.assertEqual(len(self._logs), numlines+1)
 
     def test_search_cpp(self):
         if sys.platform == 'win32':
@@ -44,10 +44,10 @@
 
         # simple pattern searches
         match = cmd.search_cpp(pattern='xxx', body='// xxx')
-        self.assertEquals(match, 0)
+        self.assertEqual(match, 0)
 
         match = cmd.search_cpp(pattern='_configtest', body='// xxx')
-        self.assertEquals(match, 1)
+        self.assertEqual(match, 1)
 
     def test_finalize_options(self):
         # finalize_options does a bit of transformation
@@ -59,9 +59,9 @@
         cmd.library_dirs = 'three%sfour' % os.pathsep
         cmd.ensure_finalized()
 
-        self.assertEquals(cmd.include_dirs, ['one', 'two'])
-        self.assertEquals(cmd.libraries, ['one'])
-        self.assertEquals(cmd.library_dirs, ['three', 'four'])
+        self.assertEqual(cmd.include_dirs, ['one', 'two'])
+        self.assertEqual(cmd.libraries, ['one'])
+        self.assertEqual(cmd.library_dirs, ['three', 'four'])
 
     def test_clean(self):
         # _clean removes files

diff --git a/lib-python/2.7.0/hashlib.py b/lib-python/2.7.0/hashlib.py
--- a/lib-python/2.7.0/hashlib.py
+++ b/lib-python/2.7.0/hashlib.py
@@ -1,4 +1,4 @@
-# $Id: hashlib.py 78528 2010-03-01 02:01:47Z gregory.p.smith $
+# $Id$
 #
 #  Copyright (C) 2005   Gregory P. Smith (greg at krypto.org)
 #  Licensed to PSF under a Contributor Agreement.

diff --git a/lib-python/2.7.0/test/test_datetime.py b/lib-python/2.7.0/test/test_datetime.py
--- a/lib-python/2.7.0/test/test_datetime.py
+++ b/lib-python/2.7.0/test/test_datetime.py
@@ -1491,8 +1491,8 @@
     def test_microsecond_rounding(self):
         # Test whether fromtimestamp "rounds up" floats that are less
         # than one microsecond smaller than an integer.
-        self.assertEquals(self.theclass.fromtimestamp(0.9999999),
-                          self.theclass.fromtimestamp(1))
+        self.assertEqual(self.theclass.fromtimestamp(0.9999999),
+                         self.theclass.fromtimestamp(1))
 
     def test_insane_fromtimestamp(self):
         # It's possible that some platform maps time_t to double,
@@ -1520,7 +1520,7 @@
     @unittest.skipIf(sys.platform == "win32", "Windows doesn't accept negative timestamps")
     def test_negative_float_utcfromtimestamp(self):
         d = self.theclass.utcfromtimestamp(-1.05)
-        self.assertEquals(d, self.theclass(1969, 12, 31, 23, 59, 58, 950000))
+        self.assertEqual(d, self.theclass(1969, 12, 31, 23, 59, 58, 950000))
 
     def test_utcnow(self):
         import time

diff --git a/lib-python/2.7.0/test/test_calendar.py b/lib-python/2.7.0/test/test_calendar.py
--- a/lib-python/2.7.0/test/test_calendar.py
+++ b/lib-python/2.7.0/test/test_calendar.py
@@ -2,6 +2,7 @@
 import unittest
 
 from test import test_support
+import locale
 
 
 result_2004_text = """
@@ -248,6 +249,19 @@
             # verify it "acts like a sequence" in two forms of iteration
             self.assertEqual(value[::-1], list(reversed(value)))
 
+    def test_localecalendars(self):
+        # ensure that Locale{Text,HTML}Calendar resets the locale properly
+        # (it is still not thread-safe though)
+        old_october = calendar.TextCalendar().formatmonthname(2010, 10, 10)
+        try:
+            calendar.LocaleTextCalendar(locale='').formatmonthname(2010, 10, 10)
+        except locale.Error:
+            # cannot set the system default locale -- skip rest of test
+            return
+        calendar.LocaleHTMLCalendar(locale='').formatmonthname(2010, 10)
+        new_october = calendar.TextCalendar().formatmonthname(2010, 10, 10)
+        self.assertEquals(old_october, new_october)
+
 
 class MonthCalendarTestCase(unittest.TestCase):
     def setUp(self):

diff --git a/lib-python/2.7.0/json/tests/test_separators.py b/lib-python/2.7.0/json/tests/test_separators.py
--- a/lib-python/2.7.0/json/tests/test_separators.py
+++ b/lib-python/2.7.0/json/tests/test_separators.py
@@ -37,6 +37,6 @@
         h1 = json.loads(d1)
         h2 = json.loads(d2)
 
-        self.assertEquals(h1, h)
-        self.assertEquals(h2, h)
-        self.assertEquals(d2, expect)
+        self.assertEqual(h1, h)
+        self.assertEqual(h2, h)
+        self.assertEqual(d2, expect)

diff --git a/lib-python/2.7.0/test/fork_wait.py b/lib-python/2.7.0/test/fork_wait.py
--- a/lib-python/2.7.0/test/fork_wait.py
+++ b/lib-python/2.7.0/test/fork_wait.py
@@ -43,8 +43,8 @@
                 break
             time.sleep(2 * SHORTSLEEP)
 
-        self.assertEquals(spid, cpid)
-        self.assertEquals(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8))
+        self.assertEqual(spid, cpid)
+        self.assertEqual(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8))
 
     def test_wait(self):
         for i in range(NUM_THREADS):
@@ -54,7 +54,7 @@
 
         a = self.alive.keys()
         a.sort()
-        self.assertEquals(a, range(NUM_THREADS))
+        self.assertEqual(a, range(NUM_THREADS))
 
         prefork_lives = self.alive.copy()
 

diff --git a/lib-python/2.7.0/distutils/tests/test_build_scripts.py b/lib-python/2.7.0/distutils/tests/test_build_scripts.py
--- a/lib-python/2.7.0/distutils/tests/test_build_scripts.py
+++ b/lib-python/2.7.0/distutils/tests/test_build_scripts.py
@@ -71,8 +71,10 @@
 
     def write_script(self, dir, name, text):
         f = open(os.path.join(dir, name), "w")
-        f.write(text)
-        f.close()
+        try:
+            f.write(text)
+        finally:
+            f.close()
 
     def test_version_int(self):
         source = self.mkdtemp()

diff --git a/lib-python/2.7.0/test/test_itertools.py b/lib-python/2.7.0/test/test_itertools.py
--- a/lib-python/2.7.0/test/test_itertools.py
+++ b/lib-python/2.7.0/test/test_itertools.py
@@ -192,7 +192,7 @@
 
                 regular_combs = list(combinations(values, r))           # compare to combs without replacement
                 if n == 0 or r <= 1:
-                    self.assertEquals(result, regular_combs)            # cases that should be identical
+                    self.assertEqual(result, regular_combs)            # cases that should be identical
                 else:
                     self.assertTrue(set(result) >= set(regular_combs))     # rest should be supersets of regular combs
 
@@ -288,20 +288,20 @@
                 comb = list(combinations(s, r))
 
                 # Check size
-                self.assertEquals(len(prod), n**r)
-                self.assertEquals(len(cwr), (fact(n+r-1) // fact(r) // fact(n-1)) if n else (not r))
-                self.assertEquals(len(perm), 0 if r>n else fact(n) // fact(n-r))
-                self.assertEquals(len(comb), 0 if r>n else fact(n) // fact(r) // fact(n-r))
+                self.assertEqual(len(prod), n**r)
+                self.assertEqual(len(cwr), (fact(n+r-1) // fact(r) // fact(n-1)) if n else (not r))
+                self.assertEqual(len(perm), 0 if r>n else fact(n) // fact(n-r))
+                self.assertEqual(len(comb), 0 if r>n else fact(n) // fact(r) // fact(n-r))
 
                 # Check lexicographic order without repeated tuples
-                self.assertEquals(prod, sorted(set(prod)))
-                self.assertEquals(cwr, sorted(set(cwr)))
-                self.assertEquals(perm, sorted(set(perm)))
-                self.assertEquals(comb, sorted(set(comb)))
+                self.assertEqual(prod, sorted(set(prod)))
+                self.assertEqual(cwr, sorted(set(cwr)))
+                self.assertEqual(perm, sorted(set(perm)))
+                self.assertEqual(comb, sorted(set(comb)))
 
                 # Check interrelationships
-                self.assertEquals(cwr, [t for t in prod if sorted(t)==list(t)]) # cwr: prods which are sorted
-                self.assertEquals(perm, [t for t in prod if len(set(t))==r])    # perm: prods with no dups
+                self.assertEqual(cwr, [t for t in prod if sorted(t)==list(t)]) # cwr: prods which are sorted
+                self.assertEqual(perm, [t for t in prod if len(set(t))==r])    # perm: prods with no dups
                 self.assertEqual(comb, [t for t in perm if sorted(t)==list(t)]) # comb: perms that are sorted
                 self.assertEqual(comb, [t for t in cwr if len(set(t))==r])      # comb: cwrs without dups
                 self.assertEqual(comb, filter(set(cwr).__contains__, perm))     # comb: perm that is a cwr

diff --git a/lib-python/2.7.0/test/script_helper.py b/lib-python/2.7.0/test/script_helper.py
--- a/lib-python/2.7.0/test/script_helper.py
+++ b/lib-python/2.7.0/test/script_helper.py
@@ -12,6 +12,45 @@
 import zipfile
 
 # Executing the interpreter in a subprocess
+def _assert_python(expected_success, *args, **env_vars):
+    cmd_line = [sys.executable]
+    if not env_vars:
+        cmd_line.append('-E')
+    cmd_line.extend(args)
+    # Need to preserve the original environment, for in-place testing of
+    # shared library builds.
+    env = os.environ.copy()
+    env.update(env_vars)
+    p = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+                         env=env)
+    try:
+        out, err = p.communicate()
+    finally:
+        subprocess._cleanup()
+        p.stdout.close()
+        p.stderr.close()
+    rc = p.returncode
+    if (rc and expected_success) or (not rc and not expected_success):
+        raise AssertionError(
+            "Process return code is %d, "
+            "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
+    return rc, out, err
+
+def assert_python_ok(*args, **env_vars):
+    """
+    Assert that running the interpreter with `args` and optional environment
+    variables `env_vars` is ok and return a (return code, stdout, stderr) tuple.
+    """
+    return _assert_python(True, *args, **env_vars)
+
+def assert_python_failure(*args, **env_vars):
+    """
+    Assert that running the interpreter with `args` and optional environment
+    variables `env_vars` fails and return a (return code, stdout, stderr) tuple.
+    """
+    return _assert_python(False, *args, **env_vars)
+
 def python_exit_code(*args):
     cmd_line = [sys.executable, '-E']
     cmd_line.extend(args)

diff --git a/lib-python/2.7.0/test/test_scope.py b/lib-python/2.7.0/test/test_scope.py
--- a/lib-python/2.7.0/test/test_scope.py
+++ b/lib-python/2.7.0/test/test_scope.py
@@ -523,7 +523,7 @@
                 def f(self):
                     return x
 
-            self.assertEquals(x, 12) # Used to raise UnboundLocalError
+            self.assertEqual(x, 12) # Used to raise UnboundLocalError
         finally:
             sys.settrace(None)
 

diff --git a/lib-python/2.7.0/test/test_getopt.py b/lib-python/2.7.0/test/test_getopt.py
--- a/lib-python/2.7.0/test/test_getopt.py
+++ b/lib-python/2.7.0/test/test_getopt.py
@@ -175,9 +175,9 @@
 
     def test_issue4629(self):
         longopts, shortopts = getopt.getopt(['--help='], '', ['help='])
-        self.assertEquals(longopts, [('--help', '')])
+        self.assertEqual(longopts, [('--help', '')])
         longopts, shortopts = getopt.getopt(['--help=x'], '', ['help='])
-        self.assertEquals(longopts, [('--help', 'x')])
+        self.assertEqual(longopts, [('--help', 'x')])
         self.assertRaises(getopt.GetoptError, getopt.getopt, ['--help='], '', ['help'])
 
 def test_main():

diff --git a/lib-python/2.7.0/test/test_gettext.py b/lib-python/2.7.0/test/test_gettext.py
--- a/lib-python/2.7.0/test/test_gettext.py
+++ b/lib-python/2.7.0/test/test_gettext.py
@@ -75,6 +75,7 @@
         fp.close()
         self.env = test_support.EnvironmentVarGuard()
         self.env['LANGUAGE'] = 'xx'
+        gettext._translations.clear()
 
     def tearDown(self):
         self.env.__exit__()

diff --git a/lib-python/2.7.0/test/test_sax.py b/lib-python/2.7.0/test/test_sax.py
--- a/lib-python/2.7.0/test/test_sax.py
+++ b/lib-python/2.7.0/test/test_sax.py
@@ -1,5 +1,5 @@
 # regression test for SAX 2.0            -*- coding: utf-8 -*-
-# $Id: test_sax.py 85863 2010-10-27 18:58:04Z antoine.pitrou $
+# $Id$
 
 from xml.sax import make_parser, ContentHandler, \
                     SAXException, SAXReaderNotAvailable, SAXParseException
@@ -29,16 +29,16 @@
         self.assertRaises(KeyError, attrs.getNameByQName, "attr")
         self.assertRaises(KeyError, attrs.getQNameByName, "attr")
         self.assertRaises(KeyError, attrs.__getitem__, "attr")
-        self.assertEquals(attrs.getLength(), 0)
-        self.assertEquals(attrs.getNames(), [])
-        self.assertEquals(attrs.getQNames(), [])
-        self.assertEquals(len(attrs), 0)
+        self.assertEqual(attrs.getLength(), 0)
+        self.assertEqual(attrs.getNames(), [])
+        self.assertEqual(attrs.getQNames(), [])
+        self.assertEqual(len(attrs), 0)
         self.assertFalse(attrs.has_key("attr"))
-        self.assertEquals(attrs.keys(), [])
-        self.assertEquals(attrs.get("attrs"), None)
-        self.assertEquals(attrs.get("attrs", 25), 25)
-        self.assertEquals(attrs.items(), [])
-        self.assertEquals(attrs.values(), [])
+        self.assertEqual(attrs.keys(), [])
+        self.assertEqual(attrs.get("attrs"), None)
+        self.assertEqual(attrs.get("attrs", 25), 25)
+        self.assertEqual(attrs.items(), [])
+        self.assertEqual(attrs.values(), [])
 
     def verify_empty_nsattrs(self, attrs):
         self.assertRaises(KeyError, attrs.getValue, (ns_uri, "attr"))
@@ -46,33 +46,33 @@
         self.assertRaises(KeyError, attrs.getNameByQName, "ns:attr")
         self.assertRaises(KeyError, attrs.getQNameByName, (ns_uri, "attr"))
         self.assertRaises(KeyError, attrs.__getitem__, (ns_uri, "attr"))
-        self.assertEquals(attrs.getLength(), 0)
-        self.assertEquals(attrs.getNames(), [])
-        self.assertEquals(attrs.getQNames(), [])
-        self.assertEquals(len(attrs), 0)
+        self.assertEqual(attrs.getLength(), 0)
+        self.assertEqual(attrs.getNames(), [])
+        self.assertEqual(attrs.getQNames(), [])
+        self.assertEqual(len(attrs), 0)
         self.assertFalse(attrs.has_key((ns_uri, "attr")))
-        self.assertEquals(attrs.keys(), [])
-        self.assertEquals(attrs.get((ns_uri, "attr")), None)
-        self.assertEquals(attrs.get((ns_uri, "attr"), 25), 25)
-        self.assertEquals(attrs.items(), [])
-        self.assertEquals(attrs.values(), [])
+        self.assertEqual(attrs.keys(), [])
+        self.assertEqual(attrs.get((ns_uri, "attr")), None)
+        self.assertEqual(attrs.get((ns_uri, "attr"), 25), 25)
+        self.assertEqual(attrs.items(), [])
+        self.assertEqual(attrs.values(), [])
 
     def verify_attrs_wattr(self, attrs):
-        self.assertEquals(attrs.getLength(), 1)
-        self.assertEquals(attrs.getNames(), ["attr"])
-        self.assertEquals(attrs.getQNames(), ["attr"])
-        self.assertEquals(len(attrs), 1)
+        self.assertEqual(attrs.getLength(), 1)
+        self.assertEqual(attrs.getNames(), ["attr"])
+        self.assertEqual(attrs.getQNames(), ["attr"])
+        self.assertEqual(len(attrs), 1)
         self.assertTrue(attrs.has_key("attr"))
-        self.assertEquals(attrs.keys(), ["attr"])
-        self.assertEquals(attrs.get("attr"), "val")
-        self.assertEquals(attrs.get("attr", 25), "val")
-        self.assertEquals(attrs.items(), [("attr", "val")])
-        self.assertEquals(attrs.values(), ["val"])
-        self.assertEquals(attrs.getValue("attr"), "val")
-        self.assertEquals(attrs.getValueByQName("attr"), "val")
-        self.assertEquals(attrs.getNameByQName("attr"), "attr")
-        self.assertEquals(attrs["attr"], "val")
-        self.assertEquals(attrs.getQNameByName("attr"), "attr")
+        self.assertEqual(attrs.keys(), ["attr"])
+        self.assertEqual(attrs.get("attr"), "val")
+        self.assertEqual(attrs.get("attr", 25), "val")
+        self.assertEqual(attrs.items(), [("attr", "val")])
+        self.assertEqual(attrs.values(), ["val"])
+        self.assertEqual(attrs.getValue("attr"), "val")
+        self.assertEqual(attrs.getValueByQName("attr"), "val")
+        self.assertEqual(attrs.getNameByQName("attr"), "attr")
+        self.assertEqual(attrs["attr"], "val")
+        self.assertEqual(attrs.getQNameByName("attr"), "attr")
 
 class MakeParserTest(unittest.TestCase):
     def test_make_parser2(self):
@@ -102,47 +102,47 @@
 class SaxutilsTest(unittest.TestCase):
     # ===== escape
     def test_escape_basic(self):
-        self.assertEquals(escape("Donald Duck & Co"), "Donald Duck &amp; Co")
+        self.assertEqual(escape("Donald Duck & Co"), "Donald Duck &amp; Co")
 
     def test_escape_all(self):
-        self.assertEquals(escape("<Donald Duck & Co>"),
-                          "&lt;Donald Duck &amp; Co&gt;")
+        self.assertEqual(escape("<Donald Duck & Co>"),
+                         "&lt;Donald Duck &amp; Co&gt;")
 
     def test_escape_extra(self):
-        self.assertEquals(escape("Hei p&#229; deg", {"&#229;" : "&aring;"}),
-                          "Hei p&aring; deg")
+        self.assertEqual(escape("Hei p&#229; deg", {"&#229;" : "&aring;"}),
+                         "Hei p&aring; deg")
 
     # ===== unescape
     def test_unescape_basic(self):
-        self.assertEquals(unescape("Donald Duck &amp; Co"), "Donald Duck & Co")
+        self.assertEqual(unescape("Donald Duck &amp; Co"), "Donald Duck & Co")
 
     def test_unescape_all(self):
-        self.assertEquals(unescape("&lt;Donald Duck &amp; Co&gt;"),
-                          "<Donald Duck & Co>")
+        self.assertEqual(unescape("&lt;Donald Duck &amp; Co&gt;"),
+                         "<Donald Duck & Co>")
 
     def test_unescape_extra(self):
-        self.assertEquals(unescape("Hei p&#229; deg", {"&#229;" : "&aring;"}),
-                          "Hei p&aring; deg")
+        self.assertEqual(unescape("Hei p&#229; deg", {"&#229;" : "&aring;"}),
+                         "Hei p&aring; deg")
 
     def test_unescape_amp_extra(self):
-        self.assertEquals(unescape("&amp;foo;", {"&foo;": "splat"}), "&foo;")
+        self.assertEqual(unescape("&amp;foo;", {"&foo;": "splat"}), "&foo;")
 
     # ===== quoteattr
     def test_quoteattr_basic(self):
-        self.assertEquals(quoteattr("Donald Duck & Co"),
-                          '"Donald Duck &amp; Co"')
+        self.assertEqual(quoteattr("Donald Duck & Co"),
+                         '"Donald Duck &amp; Co"')
 
     def test_single_quoteattr(self):
-        self.assertEquals(quoteattr('Includes "double" quotes'),
-                          '\'Includes "double" quotes\'')
+        self.assertEqual(quoteattr('Includes "double" quotes'),
+                         '\'Includes "double" quotes\'')
 
     def test_double_quoteattr(self):
-        self.assertEquals(quoteattr("Includes 'single' quotes"),
-                          "\"Includes 'single' quotes\"")
+        self.assertEqual(quoteattr("Includes 'single' quotes"),
+                         "\"Includes 'single' quotes\"")
 
     def test_single_double_quoteattr(self):
-        self.assertEquals(quoteattr("Includes 'single' and \"double\" quotes"),
-                    "\"Includes 'single' and &quot;double&quot; quotes\"")
+        self.assertEqual(quoteattr("Includes 'single' and \"double\" quotes"),
+                         "\"Includes 'single' and &quot;double&quot; quotes\"")
 
     # ===== make_parser
     def test_make_parser(self):
@@ -164,7 +164,7 @@
         gen.endElement("doc")
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(), start + "<doc></doc>")
+        self.assertEqual(result.getvalue(), start + "<doc></doc>")
 
     def test_xmlgen_content(self):
         result = StringIO()
@@ -176,7 +176,7 @@
         gen.endElement("doc")
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(), start + "<doc>huhei</doc>")
+        self.assertEqual(result.getvalue(), start + "<doc>huhei</doc>")
 
     def test_xmlgen_pi(self):
         result = StringIO()
@@ -188,7 +188,7 @@
         gen.endElement("doc")
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(), start + "<?test data?><doc></doc>")
+        self.assertEqual(result.getvalue(), start + "<?test data?><doc></doc>")
 
     def test_xmlgen_content_escape(self):
         result = StringIO()
@@ -200,7 +200,7 @@
         gen.endElement("doc")
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(),
+        self.assertEqual(result.getvalue(),
             start + "<doc>&lt;huhei&amp;</doc>")
 
     def test_xmlgen_attr_escape(self):
@@ -218,7 +218,7 @@
         gen.endElement("doc")
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(), start +
+        self.assertEqual(result.getvalue(), start +
             ("<doc a='\"'><e a=\"'\"></e>"
              "<e a=\"'&quot;\"></e>"
              "<e a=\"&#10;&#13;&#9;\"></e></doc>"))
@@ -233,7 +233,7 @@
         gen.endElement("doc")
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(), start + "<doc> </doc>")
+        self.assertEqual(result.getvalue(), start + "<doc> </doc>")
 
     def test_xmlgen_ns(self):
         result = StringIO()
@@ -249,7 +249,7 @@
         gen.endPrefixMapping("ns1")
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(), start + \
+        self.assertEqual(result.getvalue(), start + \
            ('<ns1:doc xmlns:ns1="%s"><udoc></udoc></ns1:doc>' %
                                          ns_uri))
 
@@ -262,7 +262,7 @@
         gen.endElementNS((None, 'a'), 'a')
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(), start+'<a b="c"></a>')
+        self.assertEqual(result.getvalue(), start+'<a b="c"></a>')
 
     def test_1463026_2(self):
         result = StringIO()
@@ -275,7 +275,7 @@
         gen.endPrefixMapping(None)
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(), start+'<a xmlns="qux"></a>')
+        self.assertEqual(result.getvalue(), start+'<a xmlns="qux"></a>')
 
     def test_1463026_3(self):
         result = StringIO()
@@ -288,7 +288,7 @@
         gen.endPrefixMapping('my')
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(),
+        self.assertEqual(result.getvalue(),
             start+'<my:a xmlns:my="qux" b="c"></my:a>')
 
     def test_5027_1(self):
@@ -311,11 +311,11 @@
         parser.setContentHandler(gen)
         parser.parse(test_xml)
 
-        self.assertEquals(result.getvalue(),
-                          start + (
-                          '<a:g1 xmlns:a="http://example.com/ns">'
-                           '<a:g2 xml:lang="en">Hello</a:g2>'
-                          '</a:g1>'))
+        self.assertEqual(result.getvalue(),
+                         start + (
+                         '<a:g1 xmlns:a="http://example.com/ns">'
+                          '<a:g2 xml:lang="en">Hello</a:g2>'
+                         '</a:g1>'))
 
     def test_5027_2(self):
         # The xml prefix (as in xml:lang below) is reserved and bound by
@@ -339,11 +339,11 @@
         gen.endPrefixMapping('a')
         gen.endDocument()
 
-        self.assertEquals(result.getvalue(),
-                          start + (
-                          '<a:g1 xmlns:a="http://example.com/ns">'
-                           '<a:g2 xml:lang="en">Hello</a:g2>'
-                          '</a:g1>'))
+        self.assertEqual(result.getvalue(),
+                         start + (
+                         '<a:g1 xmlns:a="http://example.com/ns">'
+                          '<a:g2 xml:lang="en">Hello</a:g2>'
+                         '</a:g1>'))
 
 
 class XMLFilterBaseTest(unittest.TestCase):
@@ -360,7 +360,7 @@
         filter.endElement("doc")
         filter.endDocument()
 
-        self.assertEquals(result.getvalue(), start + "<doc>content </doc>")
+        self.assertEqual(result.getvalue(), start + "<doc>content </doc>")
 
 # ===========================================================================
 #
@@ -382,7 +382,7 @@
         parser.setContentHandler(xmlgen)
         parser.parse(open(TEST_XMLFILE))
 
-        self.assertEquals(result.getvalue(), xml_test_out)
+        self.assertEqual(result.getvalue(), xml_test_out)
 
     # ===== DTDHandler support
 
@@ -410,9 +410,9 @@
         parser.feed('<doc></doc>')
         parser.close()
 
-        self.assertEquals(handler._notations,
+        self.assertEqual(handler._notations,
             [("GIF", "-//CompuServe//NOTATION Graphics Interchange Format 89a//EN", None)])
-        self.assertEquals(handler._entities, [("img", None, "expat.gif", "GIF")])
+        self.assertEqual(handler._entities, [("img", None, "expat.gif", "GIF")])
 
     # ===== EntityResolver support
 
@@ -435,8 +435,8 @@
         parser.feed('<doc>&test;</doc>')
         parser.close()
 
-        self.assertEquals(result.getvalue(), start +
-                          "<doc><entity></entity></doc>")
+        self.assertEqual(result.getvalue(), start +
+                         "<doc><entity></entity></doc>")
 
     # ===== Attributes support
 
@@ -488,18 +488,18 @@
 
         attrs = gather._attrs
 
-        self.assertEquals(attrs.getLength(), 1)
-        self.assertEquals(attrs.getNames(), [(ns_uri, "attr")])
+        self.assertEqual(attrs.getLength(), 1)
+        self.assertEqual(attrs.getNames(), [(ns_uri, "attr")])
         self.assertTrue((attrs.getQNames() == [] or
                          attrs.getQNames() == ["ns:attr"]))
-        self.assertEquals(len(attrs), 1)
+        self.assertEqual(len(attrs), 1)
         self.assertTrue(attrs.has_key((ns_uri, "attr")))
-        self.assertEquals(attrs.get((ns_uri, "attr")), "val")
-        self.assertEquals(attrs.get((ns_uri, "attr"), 25), "val")
-        self.assertEquals(attrs.items(), [((ns_uri, "attr"), "val")])
-        self.assertEquals(attrs.values(), ["val"])
-        self.assertEquals(attrs.getValue((ns_uri, "attr")), "val")
-        self.assertEquals(attrs[(ns_uri, "attr")], "val")
+        self.assertEqual(attrs.get((ns_uri, "attr")), "val")
+        self.assertEqual(attrs.get((ns_uri, "attr"), 25), "val")
+        self.assertEqual(attrs.items(), [((ns_uri, "attr"), "val")])
+        self.assertEqual(attrs.values(), ["val"])
+        self.assertEqual(attrs.getValue((ns_uri, "attr")), "val")
+        self.assertEqual(attrs[(ns_uri, "attr")], "val")
 
     # ===== InputSource support
 
@@ -511,7 +511,7 @@
         parser.setContentHandler(xmlgen)
         parser.parse(TEST_XMLFILE)
 
-        self.assertEquals(result.getvalue(), xml_test_out)
+        self.assertEqual(result.getvalue(), xml_test_out)
 
     def test_expat_inpsource_sysid(self):
         parser = create_parser()
@@ -521,7 +521,7 @@
         parser.setContentHandler(xmlgen)
         parser.parse(InputSource(TEST_XMLFILE))
 
-        self.assertEquals(result.getvalue(), xml_test_out)
+        self.assertEqual(result.getvalue(), xml_test_out)
 
     def test_expat_inpsource_stream(self):
         parser = create_parser()
@@ -533,7 +533,7 @@
         inpsrc.setByteStream(open(TEST_XMLFILE))
         parser.parse(inpsrc)
 
-        self.assertEquals(result.getvalue(), xml_test_out)
+        self.assertEqual(result.getvalue(), xml_test_out)
 
     # ===== IncrementalParser support
 
@@ -547,7 +547,7 @@
         parser.feed("</doc>")
         parser.close()
 
-        self.assertEquals(result.getvalue(), start + "<doc></doc>")
+        self.assertEqual(result.getvalue(), start + "<doc></doc>")
 
     def test_expat_incremental_reset(self):
         result = StringIO()
@@ -568,7 +568,7 @@
         parser.feed("</doc>")
         parser.close()
 
-        self.assertEquals(result.getvalue(), start + "<doc>text</doc>")
+        self.assertEqual(result.getvalue(), start + "<doc>text</doc>")
 
     # ===== Locator support
 
@@ -582,9 +582,9 @@
         parser.feed("</doc>")
         parser.close()
 
-        self.assertEquals(parser.getSystemId(), None)
-        self.assertEquals(parser.getPublicId(), None)
-        self.assertEquals(parser.getLineNumber(), 1)
+        self.assertEqual(parser.getSystemId(), None)
+        self.assertEqual(parser.getPublicId(), None)
+        self.assertEqual(parser.getLineNumber(), 1)
 
     def test_expat_locator_withinfo(self):
         result = StringIO()
@@ -593,8 +593,8 @@
         parser.setContentHandler(xmlgen)
         parser.parse(TEST_XMLFILE)
 
-        self.assertEquals(parser.getSystemId(), TEST_XMLFILE)
-        self.assertEquals(parser.getPublicId(), None)
+        self.assertEqual(parser.getSystemId(), TEST_XMLFILE)
+        self.assertEqual(parser.getPublicId(), None)
 
 
 # ===========================================================================
@@ -615,7 +615,7 @@
             parser.parse(source)
             self.fail()
         except SAXException, e:
-            self.assertEquals(e.getSystemId(), name)
+            self.assertEqual(e.getSystemId(), name)
 
     def test_expat_incomplete(self):
         parser = create_parser()
@@ -679,21 +679,21 @@
         attrs = AttributesNSImpl({(ns_uri, "attr") : "val"},
                                  {(ns_uri, "attr") : "ns:attr"})
 
-        self.assertEquals(attrs.getLength(), 1)
-        self.assertEquals(attrs.getNames(), [(ns_uri, "attr")])
-        self.assertEquals(attrs.getQNames(), ["ns:attr"])
-        self.assertEquals(len(attrs), 1)
+        self.assertEqual(attrs.getLength(), 1)
+        self.assertEqual(attrs.getNames(), [(ns_uri, "attr")])
+        self.assertEqual(attrs.getQNames(), ["ns:attr"])
+        self.assertEqual(len(attrs), 1)
         self.assertTrue(attrs.has_key((ns_uri, "attr")))
-        self.assertEquals(attrs.keys(), [(ns_uri, "attr")])
-        self.assertEquals(attrs.get((ns_uri, "attr")), "val")
-        self.assertEquals(attrs.get((ns_uri, "attr"), 25), "val")
-        self.assertEquals(attrs.items(), [((ns_uri, "attr"), "val")])
-        self.assertEquals(attrs.values(), ["val"])
-        self.assertEquals(attrs.getValue((ns_uri, "attr")), "val")
-        self.assertEquals(attrs.getValueByQName("ns:attr"), "val")
-        self.assertEquals(attrs.getNameByQName("ns:attr"), (ns_uri, "attr"))
-        self.assertEquals(attrs[(ns_uri, "attr")], "val")
-        self.assertEquals(attrs.getQNameByName((ns_uri, "attr")), "ns:attr")
+        self.assertEqual(attrs.keys(), [(ns_uri, "attr")])
+        self.assertEqual(attrs.get((ns_uri, "attr")), "val")
+        self.assertEqual(attrs.get((ns_uri, "attr"), 25), "val")
+        self.assertEqual(attrs.items(), [((ns_uri, "attr"), "val")])
+        self.assertEqual(attrs.values(), ["val"])
+        self.assertEqual(attrs.getValue((ns_uri, "attr")), "val")
+        self.assertEqual(attrs.getValueByQName("ns:attr"), "val")
+        self.assertEqual(attrs.getNameByQName("ns:attr"), (ns_uri, "attr"))
+        self.assertEqual(attrs[(ns_uri, "attr")], "val")
+        self.assertEqual(attrs.getQNameByName((ns_uri, "attr")), "ns:attr")
 
 
     # During the development of Python 2.5, an attempt to move the "xml"
@@ -729,7 +729,7 @@
         try:
             import xml.sax.expatreader
             module = xml.sax.expatreader
-            self.assertEquals(module.__name__, "xml.sax.expatreader")
+            self.assertEqual(module.__name__, "xml.sax.expatreader")
         finally:
             sys.modules.update(old_modules)
 

diff --git a/lib-python/2.7.0/json/tests/test_float.py b/lib-python/2.7.0/json/tests/test_float.py
--- a/lib-python/2.7.0/json/tests/test_float.py
+++ b/lib-python/2.7.0/json/tests/test_float.py
@@ -7,13 +7,13 @@
     def test_floats(self):
         for num in [1617161771.7650001, math.pi, math.pi**100,
                     math.pi**-100, 3.1]:
-            self.assertEquals(float(json.dumps(num)), num)
-            self.assertEquals(json.loads(json.dumps(num)), num)
-            self.assertEquals(json.loads(unicode(json.dumps(num))), num)
+            self.assertEqual(float(json.dumps(num)), num)
+            self.assertEqual(json.loads(json.dumps(num)), num)
+            self.assertEqual(json.loads(unicode(json.dumps(num))), num)
 
     def test_ints(self):
         for num in [1, 1L, 1<<32, 1<<64]:
-            self.assertEquals(json.dumps(num), str(num))
-            self.assertEquals(int(json.dumps(num)), num)
-            self.assertEquals(json.loads(json.dumps(num)), num)
-            self.assertEquals(json.loads(unicode(json.dumps(num))), num)
+            self.assertEqual(json.dumps(num), str(num))
+            self.assertEqual(int(json.dumps(num)), num)
+            self.assertEqual(json.loads(json.dumps(num)), num)
+            self.assertEqual(json.loads(unicode(json.dumps(num))), num)

diff --git a/lib-python/2.7.0/test/list_tests.py b/lib-python/2.7.0/test/list_tests.py
--- a/lib-python/2.7.0/test/list_tests.py
+++ b/lib-python/2.7.0/test/list_tests.py
@@ -330,7 +330,7 @@
         self.assertRaises(BadExc, d.remove, 'c')
         for x, y in zip(d, e):
             # verify that original order and values are retained.
-            self.assert_(x is y)
+            self.assertIs(x, y)
 
     def test_count(self):
         a = self.type2test([0, 1, 2])*3
@@ -466,7 +466,7 @@
         u = self.type2test([0, 1])
         u2 = u
         u += [2, 3]
-        self.assert_(u is u2)
+        self.assertIs(u, u2)
 
         u = self.type2test("spam")
         u += "eggs"

diff --git a/lib-python/2.7.0/json/tests/test_scanstring.py b/lib-python/2.7.0/json/tests/test_scanstring.py
--- a/lib-python/2.7.0/json/tests/test_scanstring.py
+++ b/lib-python/2.7.0/json/tests/test_scanstring.py
@@ -13,92 +13,92 @@
         self._test_scanstring(json.decoder.c_scanstring)
 
     def _test_scanstring(self, scanstring):
-        self.assertEquals(
+        self.assertEqual(
             scanstring('"z\\ud834\\udd20x"', 1, None, True),
             (u'z\U0001d120x', 16))
 
         if sys.maxunicode == 65535:
-            self.assertEquals(
+            self.assertEqual(
                 scanstring(u'"z\U0001d120x"', 1, None, True),
                 (u'z\U0001d120x', 6))
         else:
-            self.assertEquals(
+            self.assertEqual(
                 scanstring(u'"z\U0001d120x"', 1, None, True),
                 (u'z\U0001d120x', 5))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('"\\u007b"', 1, None, True),
             (u'{', 8))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('"A JSON payload should be an object or array, not a string."', 1, None, True),
             (u'A JSON payload should be an object or array, not a string.', 60))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('["Unclosed array"', 2, None, True),
             (u'Unclosed array', 17))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('["extra comma",]', 2, None, True),
             (u'extra comma', 14))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('["double extra comma",,]', 2, None, True),
             (u'double extra comma', 21))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('["Comma after the close"],', 2, None, True),
             (u'Comma after the close', 24))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('["Extra close"]]', 2, None, True),
             (u'Extra close', 14))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Extra comma": true,}', 2, None, True),
             (u'Extra comma', 14))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Extra value after close": true} "misplaced quoted value"', 2, None, True),
             (u'Extra value after close', 26))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Illegal expression": 1 + 2}', 2, None, True),
             (u'Illegal expression', 21))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Illegal invocation": alert()}', 2, None, True),
             (u'Illegal invocation', 21))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Numbers cannot have leading zeroes": 013}', 2, None, True),
             (u'Numbers cannot have leading zeroes', 37))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Numbers cannot be hex": 0x14}', 2, None, True),
             (u'Numbers cannot be hex', 24))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]', 21, None, True),
             (u'Too deep', 30))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Missing colon" null}', 2, None, True),
             (u'Missing colon', 16))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Double colon":: null}', 2, None, True),
             (u'Double colon', 15))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('{"Comma instead of colon", null}', 2, None, True),
             (u'Comma instead of colon', 25))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('["Colon instead of comma": false]', 2, None, True),
             (u'Colon instead of comma', 25))
 
-        self.assertEquals(
+        self.assertEqual(
             scanstring('["Bad value", truth]', 2, None, True),
             (u'Bad value', 12))
 

diff --git a/lib-python/2.7.0/test/test_popen2.py b/lib-python/2.7.0/test/test_popen2.py
--- a/lib-python/2.7.0/test/test_popen2.py
+++ b/lib-python/2.7.0/test/test_popen2.py
@@ -63,8 +63,8 @@
         w.write(teststr)
         w.close()
         got = r.read()
-        self.assertEquals(expected_out, got.strip(), "wrote %r read %r" %
-                          (teststr, got))
+        self.assertEqual(expected_out, got.strip(), "wrote %r read %r" %
+                         (teststr, got))
 
         if e is not None:
             got = e.read()
@@ -90,7 +90,7 @@
 
             w, r = os.popen2(["echo", self.teststr])
             got = r.read()
-            self.assertEquals(got, self.teststr + "\n")
+            self.assertEqual(got, self.teststr + "\n")
 
         w, r = os.popen2(self.cmd)
         self.validate_output(self.teststr, self.expected, r, w)
@@ -103,7 +103,7 @@
 
             w, r, e = os.popen3(["echo", self.teststr])
             got = r.read()
-            self.assertEquals(got, self.teststr + "\n")
+            self.assertEqual(got, self.teststr + "\n")
             got = e.read()
             self.assertFalse(got, "unexpected %r on stderr" % got)
 
@@ -117,7 +117,7 @@
 
             w, r = os.popen4(["echo", self.teststr])
             got = r.read()
-            self.assertEquals(got, self.teststr + "\n")
+            self.assertEqual(got, self.teststr + "\n")
 
         w, r = os.popen4(self.cmd)
         self.validate_output(self.teststr, self.expected, r, w)

diff --git a/lib-python/2.7.0/json/tests/test_pass1.py b/lib-python/2.7.0/json/tests/test_pass1.py
--- a/lib-python/2.7.0/json/tests/test_pass1.py
+++ b/lib-python/2.7.0/json/tests/test_pass1.py
@@ -67,7 +67,7 @@
         # test in/out equivalence and parsing
         res = json.loads(JSON)
         out = json.dumps(res)
-        self.assertEquals(res, json.loads(out))
+        self.assertEqual(res, json.loads(out))
         try:
             json.dumps(res, allow_nan=False)
         except ValueError:

diff --git a/lib-python/2.7.0/test/test_float.py b/lib-python/2.7.0/test/test_float.py
--- a/lib-python/2.7.0/test/test_float.py
+++ b/lib-python/2.7.0/test/test_float.py
@@ -473,15 +473,15 @@
             return -0.0, math.atan2(0.0, -1)
         def neg_neg():
             return -0.0, math.atan2(-0.0, -1)
-        self.assertEquals(pos_pos(), neg_pos())
-        self.assertEquals(pos_neg(), neg_neg())
+        self.assertEqual(pos_pos(), neg_pos())
+        self.assertEqual(pos_neg(), neg_neg())
 
     @requires_IEEE_754
     def test_underflow_sign(self):
         # check that -1e-1000 gives -0.0, not 0.0
-        self.assertEquals(math.atan2(-1e-1000, -1), math.atan2(-0.0, -1))
-        self.assertEquals(math.atan2(float('-1e-1000'), -1),
-                          math.atan2(-0.0, -1))
+        self.assertEqual(math.atan2(-1e-1000, -1), math.atan2(-0.0, -1))
+        self.assertEqual(math.atan2(float('-1e-1000'), -1),
+                         math.atan2(-0.0, -1))
 
     def test_format(self):
         # these should be rewritten to use both format(x, spec) and
@@ -556,9 +556,9 @@
                     self.assertEqual(fmt % -arg, '-' + rhs)
 
     def test_issue5864(self):
-        self.assertEquals(format(123.456, '.4'), '123.5')
-        self.assertEquals(format(1234.56, '.4'), '1.235e+03')
-        self.assertEquals(format(12345.6, '.4'), '1.235e+04')
+        self.assertEqual(format(123.456, '.4'), '123.5')
+        self.assertEqual(format(1234.56, '.4'), '1.235e+03')
+        self.assertEqual(format(12345.6, '.4'), '1.235e+04')
 
 class ReprTestCase(unittest.TestCase):
     def test_repr(self):

diff --git a/lib-python/2.7.0/test/test_SimpleHTTPServer.py b/lib-python/2.7.0/test/test_SimpleHTTPServer.py
--- a/lib-python/2.7.0/test/test_SimpleHTTPServer.py
+++ b/lib-python/2.7.0/test/test_SimpleHTTPServer.py
@@ -21,17 +21,17 @@
 
     def test_queryArguments (self):
         path = self.handler.translate_path ('/filename')
-        self.assertEquals (path, self.translated)
+        self.assertEqual (path, self.translated)
         path = self.handler.translate_path ('/filename?foo=bar')
-        self.assertEquals (path, self.translated)
+        self.assertEqual (path, self.translated)
         path = self.handler.translate_path ('/filename?a=b&spam=eggs#zot')
-        self.assertEquals (path, self.translated)
+        self.assertEqual (path, self.translated)
 
     def test_startWithDoubleSlash (self):
         path = self.handler.translate_path ('//filename')
-        self.assertEquals (path, self.translated)
+        self.assertEqual (path, self.translated)
         path = self.handler.translate_path ('//filename?foo=bar')
-        self.assertEquals (path, self.translated)
+        self.assertEqual (path, self.translated)
 
 
 def test_main():

diff --git a/lib-python/2.7.0/test/test_urllib.py b/lib-python/2.7.0/test/test_urllib.py
--- a/lib-python/2.7.0/test/test_urllib.py
+++ b/lib-python/2.7.0/test/test_urllib.py
@@ -112,7 +112,7 @@
         self.env.set('NO_PROXY', 'localhost')
         proxies = urllib.getproxies_environment()
         # getproxies_environment use lowered case truncated (no '_proxy') keys
-        self.assertEquals('localhost', proxies['no'])
+        self.assertEqual('localhost', proxies['no'])
 
 
 class urlopen_HttpTests(unittest.TestCase):

diff --git a/lib-python/2.7.0/test/test_memoryview.py b/lib-python/2.7.0/test/test_memoryview.py
--- a/lib-python/2.7.0/test/test_memoryview.py
+++ b/lib-python/2.7.0/test/test_memoryview.py
@@ -27,11 +27,11 @@
         b = tp(self._source)
         oldrefcount = sys.getrefcount(b)
         m = self._view(b)
-        self.assertEquals(m[0], item(b"a"))
+        self.assertEqual(m[0], item(b"a"))
         self.assertIsInstance(m[0], bytes)
-        self.assertEquals(m[5], item(b"f"))
-        self.assertEquals(m[-1], item(b"f"))
-        self.assertEquals(m[-6], item(b"a"))
+        self.assertEqual(m[5], item(b"f"))
+        self.assertEqual(m[-1], item(b"f"))
+        self.assertEqual(m[-6], item(b"a"))
         # Bounds checking
         self.assertRaises(IndexError, lambda: m[6])
         self.assertRaises(IndexError, lambda: m[-7])
@@ -42,7 +42,7 @@
         self.assertRaises(TypeError, lambda: m[0.0])
         self.assertRaises(TypeError, lambda: m["a"])
         m = None
-        self.assertEquals(sys.getrefcount(b), oldrefcount)
+        self.assertEqual(sys.getrefcount(b), oldrefcount)
 
     def test_getitem(self):
         for tp in self._types:
@@ -72,7 +72,7 @@
         self.assertRaises(TypeError, setitem, 65)
         self.assertRaises(TypeError, setitem, memoryview(b"a"))
         m = None
-        self.assertEquals(sys.getrefcount(b), oldrefcount)
+        self.assertEqual(sys.getrefcount(b), oldrefcount)
 
     def test_setitem_writable(self):
         if not self.rw_type:
@@ -115,7 +115,7 @@
         self.assertRaises(ValueError, setitem, slice(0,2), b"a")
 
         m = None
-        self.assertEquals(sys.getrefcount(b), oldrefcount)
+        self.assertEqual(sys.getrefcount(b), oldrefcount)
 
     def test_delitem(self):
         for tp in self._types:
@@ -133,14 +133,14 @@
             # This calls self.getitem_type() on each separate byte of b"abcdef"
             expected = b"".join(
                 self.getitem_type(c) for c in b"abcdef")
-            self.assertEquals(b, expected)
+            self.assertEqual(b, expected)
             self.assertIsInstance(b, bytes)
 
     def test_tolist(self):
         for tp in self._types:
             m = self._view(tp(self._source))
             l = m.tolist()
-            self.assertEquals(l, map(ord, b"abcdef"))
+            self.assertEqual(l, map(ord, b"abcdef"))
 
     def test_compare(self):
         # memoryviews can compare for equality with other objects
@@ -170,27 +170,27 @@
 
     def check_attributes_with_type(self, tp):
         m = self._view(tp(self._source))
-        self.assertEquals(m.format, self.format)
+        self.assertEqual(m.format, self.format)
         self.assertIsInstance(m.format, str)
-        self.assertEquals(m.itemsize, self.itemsize)
-        self.assertEquals(m.ndim, 1)
-        self.assertEquals(m.shape, (6,))
-        self.assertEquals(len(m), 6)
-        self.assertEquals(m.strides, (self.itemsize,))
-        self.assertEquals(m.suboffsets, None)
+        self.assertEqual(m.itemsize, self.itemsize)
+        self.assertEqual(m.ndim, 1)
+        self.assertEqual(m.shape, (6,))
+        self.assertEqual(len(m), 6)
+        self.assertEqual(m.strides, (self.itemsize,))
+        self.assertEqual(m.suboffsets, None)
         return m
 
     def test_attributes_readonly(self):
         if not self.ro_type:
             return
         m = self.check_attributes_with_type(self.ro_type)
-        self.assertEquals(m.readonly, True)
+        self.assertEqual(m.readonly, True)
 
     def test_attributes_writable(self):
         if not self.rw_type:
             return
         m = self.check_attributes_with_type(self.rw_type)
-        self.assertEquals(m.readonly, False)
+        self.assertEqual(m.readonly, False)
 
     # Disabled: unicode uses the old buffer API in 2.x
 
@@ -203,9 +203,9 @@
             #oldviewrefcount = sys.getrefcount(m)
             #s = unicode(m, "utf-8")
             #self._check_contents(tp, b, s.encode("utf-8"))
-            #self.assertEquals(sys.getrefcount(m), oldviewrefcount)
+            #self.assertEqual(sys.getrefcount(m), oldviewrefcount)
             #m = None
-            #self.assertEquals(sys.getrefcount(b), oldrefcount)
+            #self.assertEqual(sys.getrefcount(b), oldrefcount)
 
     def test_gc(self):
         for tp in self._types:
@@ -269,7 +269,7 @@
         return memoryview(obj)
 
     def _check_contents(self, tp, obj, contents):
-        self.assertEquals(obj, tp(contents))
+        self.assertEqual(obj, tp(contents))
 
 class BaseMemorySliceTests:
     source_bytes = b"XabcdefY"
@@ -279,14 +279,14 @@
         return m[1:7]
 
     def _check_contents(self, tp, obj, contents):
-        self.assertEquals(obj[1:7], tp(contents))
+        self.assertEqual(obj[1:7], tp(contents))
 
     def test_refs(self):
         for tp in self._types:
             m = memoryview(tp(self._source))
             oldrefcount = sys.getrefcount(m)
             m[1:2]
-            self.assertEquals(sys.getrefcount(m), oldrefcount)
+            self.assertEqual(sys.getrefcount(m), oldrefcount)
 
 class BaseMemorySliceSliceTests:
     source_bytes = b"XabcdefY"
@@ -296,7 +296,7 @@
         return m[:7][1:]
 
     def _check_contents(self, tp, obj, contents):
-        self.assertEquals(obj[1:7], tp(contents))
+        self.assertEqual(obj[1:7], tp(contents))
 
 
 # Concrete test classes
@@ -323,7 +323,7 @@
         #m = memoryview(a)
         #new_a = array.array('i', range(9, -1, -1))
         #m[:] = new_a
-        #self.assertEquals(a, new_a)
+        #self.assertEqual(a, new_a)
 
 
 class BytesMemorySliceTest(unittest.TestCase,

diff --git a/lib-python/2.7.0/test/test_traceback.py b/lib-python/2.7.0/test/test_traceback.py
--- a/lib-python/2.7.0/test/test_traceback.py
+++ b/lib-python/2.7.0/test/test_traceback.py
@@ -185,11 +185,11 @@
             raise Error("unable to create test traceback string")
 
         # Make sure that Python and the traceback module format the same thing
-        self.assertEquals(traceback_fmt, python_fmt)
+        self.assertEqual(traceback_fmt, python_fmt)
 
         # Make sure that the traceback is properly indented.
         tb_lines = python_fmt.splitlines()
-        self.assertEquals(len(tb_lines), 3)
+        self.assertEqual(len(tb_lines), 3)
         banner, location, source_line = tb_lines
         self.assertTrue(banner.startswith('Traceback'))
         self.assertTrue(location.startswith('  File'))

diff --git a/lib-python/2.7.0/distutils/dir_util.py b/lib-python/2.7.0/distutils/dir_util.py
--- a/lib-python/2.7.0/distutils/dir_util.py
+++ b/lib-python/2.7.0/distutils/dir_util.py
@@ -2,9 +2,10 @@
 
 Utility functions for manipulating directories and directory trees."""
 
-__revision__ = "$Id: dir_util.py 84862 2010-09-17 16:40:01Z senthil.kumaran $"
+__revision__ = "$Id$"
 
 import os
+import errno
 from distutils.errors import DistutilsFileError, DistutilsInternalError
 from distutils import log
 
@@ -69,10 +70,11 @@
         if not dry_run:
             try:
                 os.mkdir(head, mode)
-                created_dirs.append(head)
             except OSError, exc:
-                raise DistutilsFileError, \
-                      "could not create '%s': %s" % (head, exc[-1])
+                if not (exc.errno == errno.EEXIST and os.path.isdir(head)):
+                    raise DistutilsFileError(
+                          "could not create '%s': %s" % (head, exc.args[-1]))
+            created_dirs.append(head)
 
         _path_created[abs_head] = 1
     return created_dirs

diff --git a/lib-python/2.7.0/distutils/tests/test_ccompiler.py b/lib-python/2.7.0/distutils/tests/test_ccompiler.py
--- a/lib-python/2.7.0/distutils/tests/test_ccompiler.py
+++ b/lib-python/2.7.0/distutils/tests/test_ccompiler.py
@@ -32,7 +32,7 @@
         opts = gen_lib_options(compiler, libdirs, runlibdirs, libs)
         wanted = ['-Llib1', '-Llib2', '-cool', '-Rrunlib1', 'found',
                   '-lname2']
-        self.assertEquals(opts, wanted)
+        self.assertEqual(opts, wanted)
 
     def test_debug_print(self):
 
@@ -43,14 +43,14 @@
         with captured_stdout() as stdout:
             compiler.debug_print('xxx')
         stdout.seek(0)
-        self.assertEquals(stdout.read(), '')
+        self.assertEqual(stdout.read(), '')
 
         debug.DEBUG = True
         try:
             with captured_stdout() as stdout:
                 compiler.debug_print('xxx')
             stdout.seek(0)
-            self.assertEquals(stdout.read(), 'xxx\n')
+            self.assertEqual(stdout.read(), 'xxx\n')
         finally:
             debug.DEBUG = False
 
@@ -72,7 +72,7 @@
 
         comp = compiler()
         customize_compiler(comp)
-        self.assertEquals(comp.exes['archiver'], 'my_ar -arflags')
+        self.assertEqual(comp.exes['archiver'], 'my_ar -arflags')
 
 def test_suite():
     return unittest.makeSuite(CCompilerTestCase)

diff --git a/lib-python/2.7.0/test/test_repr.py b/lib-python/2.7.0/test/test_repr.py
--- a/lib-python/2.7.0/test/test_repr.py
+++ b/lib-python/2.7.0/test/test_repr.py
@@ -22,7 +22,7 @@
 class ReprTests(unittest.TestCase):
 
     def test_string(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         eq(r("abc"), "'abc'")
         eq(r("abcdefghijklmnop"),"'abcdefghijklmnop'")
 
@@ -36,7 +36,7 @@
         eq(r(s), expected)
 
     def test_tuple(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         eq(r((1,)), "(1,)")
 
         t3 = (1, 2, 3)
@@ -51,7 +51,7 @@
         from array import array
         from collections import deque
 
-        eq = self.assertEquals
+        eq = self.assertEqual
         # Tuples give up after 6 elements
         eq(r(()), "()")
         eq(r((1,)), "(1,)")
@@ -101,7 +101,7 @@
                    "array('i', [1, 2, 3, 4, 5, ...])")
 
     def test_numbers(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         eq(r(123), repr(123))
         eq(r(123L), repr(123L))
         eq(r(1.0/3), repr(1.0/3))
@@ -111,7 +111,7 @@
         eq(r(n), expected)
 
     def test_instance(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         i1 = ClassWithRepr("a")
         eq(r(i1), repr(i1))
 
@@ -141,7 +141,7 @@
         # XXX anonymous functions?  see func_repr
 
     def test_builtin_function(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         # Functions
         eq(repr(hash), '<built-in function hash>')
         # Methods
@@ -149,13 +149,13 @@
             '<built-in method split of str object at 0x'))
 
     def test_xrange(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         eq(repr(xrange(1)), 'xrange(1)')
         eq(repr(xrange(1, 2)), 'xrange(1, 2)')
         eq(repr(xrange(1, 2, 3)), 'xrange(1, 4, 3)')
 
     def test_nesting(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         # everything is meant to give up after 6 levels.
         eq(r([[[[[[[]]]]]]]), "[[[[[[[]]]]]]]")
         eq(r([[[[[[[[]]]]]]]]), "[[[[[[[...]]]]]]]")
@@ -183,7 +183,7 @@
         pass
 
     def test_descriptors(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         # method descriptors
         eq(repr(dict.items), "<method 'items' of 'dict' objects>")
         # XXX member descriptors
@@ -244,7 +244,7 @@
         del sys.path[0]
 
     def test_module(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         touch(os.path.join(self.subpkgname, self.pkgname + os.extsep + 'py'))
         from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import areallylongpackageandmodulenametotestreprtruncation
         eq(repr(areallylongpackageandmodulenametotestreprtruncation),
@@ -252,7 +252,7 @@
         eq(repr(sys), "<module 'sys' (built-in)>")
 
     def test_type(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         touch(os.path.join(self.subpkgname, 'foo'+os.extsep+'py'), '''\
 class foo(object):
     pass
@@ -287,7 +287,7 @@
             "<%s.baz instance at 0x" % baz.__name__))
 
     def test_method(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         touch(os.path.join(self.subpkgname, 'qux'+os.extsep+'py'), '''\
 class aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
     def amethod(self): pass

diff --git a/lib-python/2.7.0/idlelib/IOBinding.py b/lib-python/2.7.0/idlelib/IOBinding.py
--- a/lib-python/2.7.0/idlelib/IOBinding.py
+++ b/lib-python/2.7.0/idlelib/IOBinding.py
@@ -521,8 +521,8 @@
     savedialog = None
 
     filetypes = [
-        ("Python and text files", "*.py *.pyw *.txt", "TEXT"),
-        ("All text files", "*", "TEXT"),
+        ("Python files", "*.py *.pyw", "TEXT"),
+        ("Text files", "*.txt", "TEXT"),
         ("All files", "*"),
         ]
 

diff --git a/lib-python/2.7.0/distutils/command/bdist_rpm.py b/lib-python/2.7.0/distutils/command/bdist_rpm.py
--- a/lib-python/2.7.0/distutils/command/bdist_rpm.py
+++ b/lib-python/2.7.0/distutils/command/bdist_rpm.py
@@ -3,7 +3,7 @@
 Implements the Distutils 'bdist_rpm' command (create RPM source and binary
 distributions)."""
 
-__revision__ = "$Id: bdist_rpm.py 76956 2009-12-21 01:22:46Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys
 import os
@@ -355,22 +355,26 @@
             src_rpm, non_src_rpm, spec_path)
 
         out = os.popen(q_cmd)
-        binary_rpms = []
-        source_rpm = None
-        while 1:
-            line = out.readline()
-            if not line:
-                break
-            l = string.split(string.strip(line))
-            assert(len(l) == 2)
-            binary_rpms.append(l[1])
-            # The source rpm is named after the first entry in the spec file
-            if source_rpm is None:
-                source_rpm = l[0]
+        try:
+            binary_rpms = []
+            source_rpm = None
+            while 1:
+                line = out.readline()
+                if not line:
+                    break
+                l = string.split(string.strip(line))
+                assert(len(l) == 2)
+                binary_rpms.append(l[1])
+                # The source rpm is named after the first entry in the spec file
+                if source_rpm is None:
+                    source_rpm = l[0]
 
-        status = out.close()
-        if status:
-            raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd))
+            status = out.close()
+            if status:
+                raise DistutilsExecError("Failed to execute: %s" % repr(q_cmd))
+
+        finally:
+            out.close()
 
         self.spawn(rpm_cmd)
 

diff --git a/lib-python/2.7.0/distutils/tests/test_bdist.py b/lib-python/2.7.0/distutils/tests/test_bdist.py
--- a/lib-python/2.7.0/distutils/tests/test_bdist.py
+++ b/lib-python/2.7.0/distutils/tests/test_bdist.py
@@ -25,7 +25,7 @@
         cmd = bdist(dist)
         cmd.formats = ['msi']
         cmd.ensure_finalized()
-        self.assertEquals(cmd.formats, ['msi'])
+        self.assertEqual(cmd.formats, ['msi'])
 
         # what format bdist offers ?
         # XXX an explicit list in bdist is
@@ -36,7 +36,7 @@
         formats.sort()
         founded = cmd.format_command.keys()
         founded.sort()
-        self.assertEquals(founded, formats)
+        self.assertEqual(founded, formats)
 
 def test_suite():
     return unittest.makeSuite(BuildTestCase)

diff --git a/lib-python/2.7.0/httplib.py b/lib-python/2.7.0/httplib.py
--- a/lib-python/2.7.0/httplib.py
+++ b/lib-python/2.7.0/httplib.py
@@ -879,6 +879,9 @@
                         host_enc = self.host.encode("ascii")
                     except UnicodeEncodeError:
                         host_enc = self.host.encode("idna")
+                    # Wrap the IPv6 Host Header with [] (RFC 2732)
+                    if host_enc.find(':') >= 0:
+                        host_enc = "[" + host_enc + "]"
                     if self.port == self.default_port:
                         self.putheader('Host', host_enc)
                     else:

diff --git a/lib-python/2.7.0/test/test_class.py b/lib-python/2.7.0/test/test_class.py
--- a/lib-python/2.7.0/test/test_class.py
+++ b/lib-python/2.7.0/test/test_class.py
@@ -475,7 +475,7 @@
         del testme
         import gc
         gc.collect()
-        self.assertEquals(["crab people, crab people"], x)
+        self.assertEqual(["crab people, crab people"], x)
 
     def testBadTypeReturned(self):
         # return values of some method are type-checked
@@ -507,14 +507,14 @@
 
         callLst[:] = []
         as_int = int(mixIntAndLong)
-        self.assertEquals(type(as_int), long)
-        self.assertEquals(as_int, 42L)
+        self.assertEqual(type(as_int), long)
+        self.assertEqual(as_int, 42L)
         self.assertCallStack([('__int__', (mixIntAndLong,))])
 
         callLst[:] = []
         as_long = long(mixIntAndLong)
-        self.assertEquals(type(as_long), long)
-        self.assertEquals(as_long, 64)
+        self.assertEqual(type(as_long), long)
+        self.assertEqual(as_long, 64)
         self.assertCallStack([('__long__', (mixIntAndLong,))])
 
     def testHashStuff(self):
@@ -599,17 +599,17 @@
 
         a1 = A(1)
         a2 = A(2)
-        self.assertEquals(a1.f, a1.f)
-        self.assertNotEquals(a1.f, a2.f)
-        self.assertNotEquals(a1.f, a1.g)
-        self.assertEquals(a1.f, A(1).f)
-        self.assertEquals(hash(a1.f), hash(a1.f))
-        self.assertEquals(hash(a1.f), hash(A(1).f))
+        self.assertEqual(a1.f, a1.f)
+        self.assertNotEqual(a1.f, a2.f)
+        self.assertNotEqual(a1.f, a1.g)
+        self.assertEqual(a1.f, A(1).f)
+        self.assertEqual(hash(a1.f), hash(a1.f))
+        self.assertEqual(hash(a1.f), hash(A(1).f))
 
-        self.assertNotEquals(A.f, a1.f)
-        self.assertNotEquals(A.f, A.g)
-        self.assertEquals(B.f, A.f)
-        self.assertEquals(hash(B.f), hash(A.f))
+        self.assertNotEqual(A.f, a1.f)
+        self.assertNotEqual(A.f, A.g)
+        self.assertEqual(B.f, A.f)
+        self.assertEqual(hash(B.f), hash(A.f))
 
         # the following triggers a SystemError in 2.4
         a = A(hash(A.f.im_func)^(-1))

diff --git a/lib-python/2.7.0/distutils/tests/test_build_clib.py b/lib-python/2.7.0/distutils/tests/test_build_clib.py
--- a/lib-python/2.7.0/distutils/tests/test_build_clib.py
+++ b/lib-python/2.7.0/distutils/tests/test_build_clib.py
@@ -55,14 +55,14 @@
         self.assertRaises(DistutilsSetupError, cmd.get_source_files)
 
         cmd.libraries = [('name', {'sources': ['a', 'b']})]
-        self.assertEquals(cmd.get_source_files(), ['a', 'b'])
+        self.assertEqual(cmd.get_source_files(), ['a', 'b'])
 
         cmd.libraries = [('name', {'sources': ('a', 'b')})]
-        self.assertEquals(cmd.get_source_files(), ['a', 'b'])
+        self.assertEqual(cmd.get_source_files(), ['a', 'b'])
 
         cmd.libraries = [('name', {'sources': ('a', 'b')}),
                          ('name2', {'sources': ['c', 'd']})]
-        self.assertEquals(cmd.get_source_files(), ['a', 'b', 'c', 'd'])
+        self.assertEqual(cmd.get_source_files(), ['a', 'b', 'c', 'd'])
 
     def test_build_libraries(self):
 
@@ -91,11 +91,11 @@
 
         cmd.include_dirs = 'one-dir'
         cmd.finalize_options()
-        self.assertEquals(cmd.include_dirs, ['one-dir'])
+        self.assertEqual(cmd.include_dirs, ['one-dir'])
 
         cmd.include_dirs = None
         cmd.finalize_options()
-        self.assertEquals(cmd.include_dirs, [])
+        self.assertEqual(cmd.include_dirs, [])
 
         cmd.distribution.libraries = 'WONTWORK'
         self.assertRaises(DistutilsSetupError, cmd.finalize_options)

diff --git a/lib-python/2.7.0/distutils/command/bdist_wininst.py b/lib-python/2.7.0/distutils/command/bdist_wininst.py
--- a/lib-python/2.7.0/distutils/command/bdist_wininst.py
+++ b/lib-python/2.7.0/distutils/command/bdist_wininst.py
@@ -3,7 +3,7 @@
 Implements the Distutils 'bdist_wininst' command: create a windows installer
 exe-program."""
 
-__revision__ = "$Id: bdist_wininst.py 83593 2010-08-02 21:44:25Z georg.brandl $"
+__revision__ = "$Id$"
 
 import sys
 import os
@@ -356,5 +356,9 @@
             sfix = ''
 
         filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix))
-        return open(filename, "rb").read()
+        f = open(filename, "rb")
+        try:
+            return f.read()
+        finally:
+            f.close()
 # class bdist_wininst

diff --git a/lib-python/2.7.0/test/test_socketserver.py b/lib-python/2.7.0/test/test_socketserver.py
--- a/lib-python/2.7.0/test/test_socketserver.py
+++ b/lib-python/2.7.0/test/test_socketserver.py
@@ -57,8 +57,8 @@
         os._exit(72)
     yield None
     pid2, status = os.waitpid(pid, 0)
-    testcase.assertEquals(pid2, pid)
-    testcase.assertEquals(72 << 8, status)
+    testcase.assertEqual(pid2, pid)
+    testcase.assertEqual(72 << 8, status)
 
 
 @unittest.skipUnless(threading, 'Threading required for this test.')
@@ -120,7 +120,7 @@
 
         if verbose: print "creating server"
         server = MyServer(addr, MyHandler)
-        self.assertEquals(server.server_address, server.socket.getsockname())
+        self.assertEqual(server.server_address, server.socket.getsockname())
         return server
 
     @unittest.skipUnless(threading, 'Threading required for this test.')
@@ -161,7 +161,7 @@
         while data and '\n' not in buf:
             data = receive(s, 100)
             buf += data
-        self.assertEquals(buf, TEST_STR)
+        self.assertEqual(buf, TEST_STR)
         s.close()
 
     def dgram_examine(self, proto, addr):
@@ -171,7 +171,7 @@
         while data and '\n' not in buf:
             data = receive(s, 100)
             buf += data
-        self.assertEquals(buf, TEST_STR)
+        self.assertEqual(buf, TEST_STR)
         s.close()
 
     def test_TCPServer(self):

diff --git a/lib-python/2.7.0/test/test_structmembers.py b/lib-python/2.7.0/test/test_structmembers.py
--- a/lib-python/2.7.0/test/test_structmembers.py
+++ b/lib-python/2.7.0/test/test_structmembers.py
@@ -15,61 +15,61 @@
 
     def test_bool(self):
         ts.T_BOOL = True
-        self.assertEquals(ts.T_BOOL, True)
+        self.assertEqual(ts.T_BOOL, True)
         ts.T_BOOL = False
-        self.assertEquals(ts.T_BOOL, False)
+        self.assertEqual(ts.T_BOOL, False)
         self.assertRaises(TypeError, setattr, ts, 'T_BOOL', 1)
 
     def test_byte(self):
         ts.T_BYTE = CHAR_MAX
-        self.assertEquals(ts.T_BYTE, CHAR_MAX)
+        self.assertEqual(ts.T_BYTE, CHAR_MAX)
         ts.T_BYTE = CHAR_MIN
-        self.assertEquals(ts.T_BYTE, CHAR_MIN)
+        self.assertEqual(ts.T_BYTE, CHAR_MIN)
         ts.T_UBYTE = UCHAR_MAX
-        self.assertEquals(ts.T_UBYTE, UCHAR_MAX)
+        self.assertEqual(ts.T_UBYTE, UCHAR_MAX)
 
     def test_short(self):
         ts.T_SHORT = SHRT_MAX
-        self.assertEquals(ts.T_SHORT, SHRT_MAX)
+        self.assertEqual(ts.T_SHORT, SHRT_MAX)
         ts.T_SHORT = SHRT_MIN
-        self.assertEquals(ts.T_SHORT, SHRT_MIN)
+        self.assertEqual(ts.T_SHORT, SHRT_MIN)
         ts.T_USHORT = USHRT_MAX
-        self.assertEquals(ts.T_USHORT, USHRT_MAX)
+        self.assertEqual(ts.T_USHORT, USHRT_MAX)
 
     def test_int(self):
         ts.T_INT = INT_MAX
-        self.assertEquals(ts.T_INT, INT_MAX)
+        self.assertEqual(ts.T_INT, INT_MAX)
         ts.T_INT = INT_MIN
-        self.assertEquals(ts.T_INT, INT_MIN)
+        self.assertEqual(ts.T_INT, INT_MIN)
         ts.T_UINT = UINT_MAX
-        self.assertEquals(ts.T_UINT, UINT_MAX)
+        self.assertEqual(ts.T_UINT, UINT_MAX)
 
     def test_long(self):
         ts.T_LONG = LONG_MAX
-        self.assertEquals(ts.T_LONG, LONG_MAX)
+        self.assertEqual(ts.T_LONG, LONG_MAX)
         ts.T_LONG = LONG_MIN
-        self.assertEquals(ts.T_LONG, LONG_MIN)
+        self.assertEqual(ts.T_LONG, LONG_MIN)
         ts.T_ULONG = ULONG_MAX
-        self.assertEquals(ts.T_ULONG, ULONG_MAX)
+        self.assertEqual(ts.T_ULONG, ULONG_MAX)
 
     @unittest.skipUnless(hasattr(ts, "T_LONGLONG"), "long long not present")
     def test_longlong(self):
         ts.T_LONGLONG = LLONG_MAX
-        self.assertEquals(ts.T_LONGLONG, LLONG_MAX)
+        self.assertEqual(ts.T_LONGLONG, LLONG_MAX)
         ts.T_LONGLONG = LLONG_MIN
-        self.assertEquals(ts.T_LONGLONG, LLONG_MIN)
+        self.assertEqual(ts.T_LONGLONG, LLONG_MIN)
 
         ts.T_ULONGLONG = ULLONG_MAX
-        self.assertEquals(ts.T_ULONGLONG, ULLONG_MAX)
+        self.assertEqual(ts.T_ULONGLONG, ULLONG_MAX)
 
         ## make sure these will accept a plain int as well as a long
         ts.T_LONGLONG = 3
-        self.assertEquals(ts.T_LONGLONG, 3)
+        self.assertEqual(ts.T_LONGLONG, 3)
         ts.T_ULONGLONG = 4
-        self.assertEquals(ts.T_ULONGLONG, 4)
+        self.assertEqual(ts.T_ULONGLONG, 4)
 
     def test_inplace_string(self):
-        self.assertEquals(ts.T_STRING_INPLACE, "hi")
+        self.assertEqual(ts.T_STRING_INPLACE, "hi")
         self.assertRaises(TypeError, setattr, ts, "T_STRING_INPLACE", "s")
         self.assertRaises(TypeError, delattr, ts, "T_STRING_INPLACE")
 

diff --git a/lib-python/2.7.0/test/test_gzip.py b/lib-python/2.7.0/test/test_gzip.py
--- a/lib-python/2.7.0/test/test_gzip.py
+++ b/lib-python/2.7.0/test/test_gzip.py
@@ -102,7 +102,7 @@
                 ztxt = zgfile.read(8192)
                 contents += ztxt
                 if not ztxt: break
-        self.assertEquals(contents, 'a'*201)
+        self.assertEqual(contents, 'a'*201)
 
     def test_buffered_reader(self):
         # Issue #7471: a GzipFile can be wrapped in a BufferedReader for
@@ -166,7 +166,7 @@
             f.read(10)
             f.seek(10, whence=1)
             y = f.read(10)
-        self.assertEquals(y, data1[20:30])
+        self.assertEqual(y, data1[20:30])
 
     def test_seek_write(self):
         # Try seek, write test

diff --git a/lib-python/2.7.0/test/test_pyexpat.py b/lib-python/2.7.0/test/test_pyexpat.py
--- a/lib-python/2.7.0/test/test_pyexpat.py
+++ b/lib-python/2.7.0/test/test_pyexpat.py
@@ -22,17 +22,17 @@
     def test_returns_unicode(self):
         for x, y in self.set_get_pairs:
             self.parser.returns_unicode = x
-            self.assertEquals(self.parser.returns_unicode, y)
+            self.assertEqual(self.parser.returns_unicode, y)
 
     def test_ordered_attributes(self):
         for x, y in self.set_get_pairs:
             self.parser.ordered_attributes = x
-            self.assertEquals(self.parser.ordered_attributes, y)
+            self.assertEqual(self.parser.ordered_attributes, y)
 
     def test_specified_attributes(self):
         for x, y in self.set_get_pairs:
             self.parser.specified_attributes = x
-            self.assertEquals(self.parser.specified_attributes, y)
+            self.assertEqual(self.parser.specified_attributes, y)
 
 
 data = '''\
@@ -140,23 +140,23 @@
 
         # Verify output
         op = out.out
-        self.assertEquals(op[0], 'PI: \'xml-stylesheet\' \'href="stylesheet.css"\'')
-        self.assertEquals(op[1], "Comment: ' comment data '")
-        self.assertEquals(op[2], "Notation declared: ('notation', None, 'notation.jpeg', None)")
-        self.assertEquals(op[3], "Unparsed entity decl: ('unparsed_entity', None, 'entity.file', None, 'notation')")
-        self.assertEquals(op[4], "Start element: 'root' {'attr1': 'value1', 'attr2': 'value2\\xe1\\xbd\\x80'}")
-        self.assertEquals(op[5], "NS decl: 'myns' 'http://www.python.org/namespace'")
-        self.assertEquals(op[6], "Start element: 'http://www.python.org/namespace!subelement' {}")
-        self.assertEquals(op[7], "Character data: 'Contents of subelements'")
-        self.assertEquals(op[8], "End element: 'http://www.python.org/namespace!subelement'")
-        self.assertEquals(op[9], "End of NS decl: 'myns'")
-        self.assertEquals(op[10], "Start element: 'sub2' {}")
-        self.assertEquals(op[11], 'Start of CDATA section')
-        self.assertEquals(op[12], "Character data: 'contents of CDATA section'")
-        self.assertEquals(op[13], 'End of CDATA section')
-        self.assertEquals(op[14], "End element: 'sub2'")
-        self.assertEquals(op[15], "External entity ref: (None, 'entity.file', None)")
-        self.assertEquals(op[16], "End element: 'root'")
+        self.assertEqual(op[0], 'PI: \'xml-stylesheet\' \'href="stylesheet.css"\'')
+        self.assertEqual(op[1], "Comment: ' comment data '")
+        self.assertEqual(op[2], "Notation declared: ('notation', None, 'notation.jpeg', None)")
+        self.assertEqual(op[3], "Unparsed entity decl: ('unparsed_entity', None, 'entity.file', None, 'notation')")
+        self.assertEqual(op[4], "Start element: 'root' {'attr1': 'value1', 'attr2': 'value2\\xe1\\xbd\\x80'}")
+        self.assertEqual(op[5], "NS decl: 'myns' 'http://www.python.org/namespace'")
+        self.assertEqual(op[6], "Start element: 'http://www.python.org/namespace!subelement' {}")
+        self.assertEqual(op[7], "Character data: 'Contents of subelements'")
+        self.assertEqual(op[8], "End element: 'http://www.python.org/namespace!subelement'")
+        self.assertEqual(op[9], "End of NS decl: 'myns'")
+        self.assertEqual(op[10], "Start element: 'sub2' {}")
+        self.assertEqual(op[11], 'Start of CDATA section')
+        self.assertEqual(op[12], "Character data: 'contents of CDATA section'")
+        self.assertEqual(op[13], 'End of CDATA section')
+        self.assertEqual(op[14], "End element: 'sub2'")
+        self.assertEqual(op[15], "External entity ref: (None, 'entity.file', None)")
+        self.assertEqual(op[16], "End element: 'root'")
 
     def test_unicode(self):
         # Try the parse again, this time producing Unicode output
@@ -169,23 +169,23 @@
         parser.Parse(data, 1)
 
         op = out.out
-        self.assertEquals(op[0], 'PI: u\'xml-stylesheet\' u\'href="stylesheet.css"\'')
-        self.assertEquals(op[1], "Comment: u' comment data '")
-        self.assertEquals(op[2], "Notation declared: (u'notation', None, u'notation.jpeg', None)")
-        self.assertEquals(op[3], "Unparsed entity decl: (u'unparsed_entity', None, u'entity.file', None, u'notation')")
-        self.assertEquals(op[4], "Start element: u'root' {u'attr1': u'value1', u'attr2': u'value2\\u1f40'}")
-        self.assertEquals(op[5], "NS decl: u'myns' u'http://www.python.org/namespace'")
-        self.assertEquals(op[6], "Start element: u'http://www.python.org/namespace!subelement' {}")
-        self.assertEquals(op[7], "Character data: u'Contents of subelements'")
-        self.assertEquals(op[8], "End element: u'http://www.python.org/namespace!subelement'")
-        self.assertEquals(op[9], "End of NS decl: u'myns'")
-        self.assertEquals(op[10], "Start element: u'sub2' {}")
-        self.assertEquals(op[11], 'Start of CDATA section')
-        self.assertEquals(op[12], "Character data: u'contents of CDATA section'")
-        self.assertEquals(op[13], 'End of CDATA section')
-        self.assertEquals(op[14], "End element: u'sub2'")
-        self.assertEquals(op[15], "External entity ref: (None, u'entity.file', None)")
-        self.assertEquals(op[16], "End element: u'root'")
+        self.assertEqual(op[0], 'PI: u\'xml-stylesheet\' u\'href="stylesheet.css"\'')
+        self.assertEqual(op[1], "Comment: u' comment data '")
+        self.assertEqual(op[2], "Notation declared: (u'notation', None, u'notation.jpeg', None)")
+        self.assertEqual(op[3], "Unparsed entity decl: (u'unparsed_entity', None, u'entity.file', None, u'notation')")
+        self.assertEqual(op[4], "Start element: u'root' {u'attr1': u'value1', u'attr2': u'value2\\u1f40'}")
+        self.assertEqual(op[5], "NS decl: u'myns' u'http://www.python.org/namespace'")
+        self.assertEqual(op[6], "Start element: u'http://www.python.org/namespace!subelement' {}")
+        self.assertEqual(op[7], "Character data: u'Contents of subelements'")
+        self.assertEqual(op[8], "End element: u'http://www.python.org/namespace!subelement'")
+        self.assertEqual(op[9], "End of NS decl: u'myns'")
+        self.assertEqual(op[10], "Start element: u'sub2' {}")
+        self.assertEqual(op[11], 'Start of CDATA section')
+        self.assertEqual(op[12], "Character data: u'contents of CDATA section'")
+        self.assertEqual(op[13], 'End of CDATA section')
+        self.assertEqual(op[14], "End element: u'sub2'")
+        self.assertEqual(op[15], "External entity ref: (None, u'entity.file', None)")
+        self.assertEqual(op[16], "End element: u'root'")
 
     def test_parse_file(self):
         # Try parsing a file
@@ -199,23 +199,23 @@
         parser.ParseFile(file)
 
         op = out.out
-        self.assertEquals(op[0], 'PI: u\'xml-stylesheet\' u\'href="stylesheet.css"\'')
-        self.assertEquals(op[1], "Comment: u' comment data '")
-        self.assertEquals(op[2], "Notation declared: (u'notation', None, u'notation.jpeg', None)")
-        self.assertEquals(op[3], "Unparsed entity decl: (u'unparsed_entity', None, u'entity.file', None, u'notation')")
-        self.assertEquals(op[4], "Start element: u'root' {u'attr1': u'value1', u'attr2': u'value2\\u1f40'}")
-        self.assertEquals(op[5], "NS decl: u'myns' u'http://www.python.org/namespace'")
-        self.assertEquals(op[6], "Start element: u'http://www.python.org/namespace!subelement' {}")
-        self.assertEquals(op[7], "Character data: u'Contents of subelements'")
-        self.assertEquals(op[8], "End element: u'http://www.python.org/namespace!subelement'")
-        self.assertEquals(op[9], "End of NS decl: u'myns'")
-        self.assertEquals(op[10], "Start element: u'sub2' {}")
-        self.assertEquals(op[11], 'Start of CDATA section')
-        self.assertEquals(op[12], "Character data: u'contents of CDATA section'")
-        self.assertEquals(op[13], 'End of CDATA section')
-        self.assertEquals(op[14], "End element: u'sub2'")
-        self.assertEquals(op[15], "External entity ref: (None, u'entity.file', None)")
-        self.assertEquals(op[16], "End element: u'root'")
+        self.assertEqual(op[0], 'PI: u\'xml-stylesheet\' u\'href="stylesheet.css"\'')
+        self.assertEqual(op[1], "Comment: u' comment data '")
+        self.assertEqual(op[2], "Notation declared: (u'notation', None, u'notation.jpeg', None)")
+        self.assertEqual(op[3], "Unparsed entity decl: (u'unparsed_entity', None, u'entity.file', None, u'notation')")
+        self.assertEqual(op[4], "Start element: u'root' {u'attr1': u'value1', u'attr2': u'value2\\u1f40'}")
+        self.assertEqual(op[5], "NS decl: u'myns' u'http://www.python.org/namespace'")
+        self.assertEqual(op[6], "Start element: u'http://www.python.org/namespace!subelement' {}")
+        self.assertEqual(op[7], "Character data: u'Contents of subelements'")
+        self.assertEqual(op[8], "End element: u'http://www.python.org/namespace!subelement'")
+        self.assertEqual(op[9], "End of NS decl: u'myns'")
+        self.assertEqual(op[10], "Start element: u'sub2' {}")
+        self.assertEqual(op[11], 'Start of CDATA section')
+        self.assertEqual(op[12], "Character data: u'contents of CDATA section'")
+        self.assertEqual(op[13], 'End of CDATA section')
+        self.assertEqual(op[14], "End element: u'sub2'")
+        self.assertEqual(op[15], "External entity ref: (None, u'entity.file', None)")
+        self.assertEqual(op[16], "End element: u'root'")
 
 
 class NamespaceSeparatorTest(unittest.TestCase):
@@ -231,14 +231,14 @@
             expat.ParserCreate(namespace_separator=42)
             self.fail()
         except TypeError, e:
-            self.assertEquals(str(e),
+            self.assertEqual(str(e),
                 'ParserCreate() argument 2 must be string or None, not int')
 
         try:
             expat.ParserCreate(namespace_separator='too long')
             self.fail()
         except ValueError, e:
-            self.assertEquals(str(e),
+            self.assertEqual(str(e),
                 'namespace_separator must be at most one character, omitted, or None')
 
     def test_zero_length(self):
@@ -264,7 +264,7 @@
         p.EndElementHandler = collector
         p.Parse("<e> <e/> <e></e> </e>", 1)
         tag = L[0]
-        self.assertEquals(len(L), 6)
+        self.assertEqual(len(L), 6)
         for entry in L:
             # L should have the same string repeated over and over.
             self.assertTrue(tag is entry)
@@ -278,7 +278,7 @@
         self.parser.CharacterDataHandler = self.CharacterDataHandler
 
     def check(self, expected, label):
-        self.assertEquals(self.stuff, expected,
+        self.assertEqual(self.stuff, expected,
                 "%s\nstuff    = %r\nexpected = %r"
                 % (label, self.stuff, map(unicode, expected)))
 
@@ -311,47 +311,47 @@
         # Make sure buffering is turned on
         self.assertTrue(self.parser.buffer_text)
         self.parser.Parse("<a>1<b/>2<c/>3</a>", 1)
-        self.assertEquals(self.stuff, ['123'],
-                          "buffered text not properly collapsed")
+        self.assertEqual(self.stuff, ['123'],
+                         "buffered text not properly collapsed")
 
     def test1(self):
         # XXX This test exposes more detail of Expat's text chunking than we
         # XXX like, but it tests what we need to concisely.
         self.setHandlers(["StartElementHandler"])
         self.parser.Parse("<a>1<b buffer-text='no'/>2\n3<c buffer-text='yes'/>4\n5</a>", 1)
-        self.assertEquals(self.stuff,
-                          ["<a>", "1", "<b>", "2", "\n", "3", "<c>", "4\n5"],
-                          "buffering control not reacting as expected")
+        self.assertEqual(self.stuff,
+                         ["<a>", "1", "<b>", "2", "\n", "3", "<c>", "4\n5"],
+                         "buffering control not reacting as expected")
 
     def test2(self):
         self.parser.Parse("<a>1<b/>&lt;2&gt;<c/>&#32;\n&#x20;3</a>", 1)
-        self.assertEquals(self.stuff, ["1<2> \n 3"],
-                          "buffered text not properly collapsed")
+        self.assertEqual(self.stuff, ["1<2> \n 3"],
+                         "buffered text not properly collapsed")
 
     def test3(self):
         self.setHandlers(["StartElementHandler"])
         self.parser.Parse("<a>1<b/>2<c/>3</a>", 1)
-        self.assertEquals(self.stuff, ["<a>", "1", "<b>", "2", "<c>", "3"],
+        self.assertEqual(self.stuff, ["<a>", "1", "<b>", "2", "<c>", "3"],
                           "buffered text not properly split")
 
     def test4(self):
         self.setHandlers(["StartElementHandler", "EndElementHandler"])
         self.parser.CharacterDataHandler = None
         self.parser.Parse("<a>1<b/>2<c/>3</a>", 1)
-        self.assertEquals(self.stuff,
-                          ["<a>", "<b>", "</b>", "<c>", "</c>", "</a>"])
+        self.assertEqual(self.stuff,
+                         ["<a>", "<b>", "</b>", "<c>", "</c>", "</a>"])
 
     def test5(self):
         self.setHandlers(["StartElementHandler", "EndElementHandler"])
         self.parser.Parse("<a>1<b></b>2<c/>3</a>", 1)
-        self.assertEquals(self.stuff,
+        self.assertEqual(self.stuff,
             ["<a>", "1", "<b>", "</b>", "2", "<c>", "</c>", "3", "</a>"])
 
     def test6(self):
         self.setHandlers(["CommentHandler", "EndElementHandler",
                     "StartElementHandler"])
         self.parser.Parse("<a>1<b/>2<c></c>345</a> ", 1)
-        self.assertEquals(self.stuff,
+        self.assertEqual(self.stuff,
             ["<a>", "1", "<b>", "</b>", "2", "<c>", "</c>", "345", "</a>"],
             "buffered text not properly split")
 
@@ -359,10 +359,10 @@
         self.setHandlers(["CommentHandler", "EndElementHandler",
                     "StartElementHandler"])
         self.parser.Parse("<a>1<b/>2<c></c>3<!--abc-->4<!--def-->5</a> ", 1)
-        self.assertEquals(self.stuff,
-                          ["<a>", "1", "<b>", "</b>", "2", "<c>", "</c>", "3",
-                           "<!--abc-->", "4", "<!--def-->", "5", "</a>"],
-                          "buffered text not properly split")
+        self.assertEqual(self.stuff,
+                         ["<a>", "1", "<b>", "</b>", "2", "<c>", "</c>", "3",
+                          "<!--abc-->", "4", "<!--def-->", "5", "</a>"],
+                         "buffered text not properly split")
 
 
 # Test handling of exception from callback:
@@ -377,9 +377,9 @@
             parser.Parse("<a><b><c/></b></a>", 1)
             self.fail()
         except RuntimeError, e:
-            self.assertEquals(e.args[0], 'a',
-                              "Expected RuntimeError for element 'a', but" + \
-                              " found %r" % e.args[0])
+            self.assertEqual(e.args[0], 'a',
+                             "Expected RuntimeError for element 'a', but" + \
+                             " found %r" % e.args[0])
 
 
 # Test Current* members:
@@ -398,7 +398,7 @@
         self.assertTrue(self.upto < len(self.expected_list),
                         'too many parser events')
         expected = self.expected_list[self.upto]
-        self.assertEquals(pos, expected,
+        self.assertEqual(pos, expected,
                 'Expected position %s, got position %s' %(pos, expected))
         self.upto += 1
 
@@ -439,10 +439,10 @@
     """
 
     def test_1025_bytes(self):
-        self.assertEquals(self.small_buffer_test(1025), 2)
+        self.assertEqual(self.small_buffer_test(1025), 2)
 
     def test_1000_bytes(self):
-        self.assertEquals(self.small_buffer_test(1000), 1)
+        self.assertEqual(self.small_buffer_test(1000), 1)
 
     def test_wrong_size(self):
         parser = expat.ParserCreate()
@@ -466,15 +466,15 @@
         # once.
         self.n = 0
         parser.Parse(xml1)
-        self.assertEquals(self.n, 1)
+        self.assertEqual(self.n, 1)
 
         # Reassign to buffer_size, but assign the same size.
         parser.buffer_size = parser.buffer_size
-        self.assertEquals(self.n, 1)
+        self.assertEqual(self.n, 1)
 
         # Try parsing rest of the document
         parser.Parse(xml2)
-        self.assertEquals(self.n, 2)
+        self.assertEqual(self.n, 2)
 
 
     def test_disabling_buffer(self):
@@ -485,27 +485,27 @@
         parser.CharacterDataHandler = self.counting_handler
         parser.buffer_text = 1
         parser.buffer_size = 1024
-        self.assertEquals(parser.buffer_size, 1024)
+        self.assertEqual(parser.buffer_size, 1024)
 
         # Parse one chunk of XML
         self.n = 0
         parser.Parse(xml1, 0)
-        self.assertEquals(parser.buffer_size, 1024)
-        self.assertEquals(self.n, 1)
+        self.assertEqual(parser.buffer_size, 1024)
+        self.assertEqual(self.n, 1)
 
         # Turn off buffering and parse the next chunk.
         parser.buffer_text = 0
         self.assertFalse(parser.buffer_text)
-        self.assertEquals(parser.buffer_size, 1024)
+        self.assertEqual(parser.buffer_size, 1024)
         for i in range(10):
             parser.Parse(xml2, 0)
-        self.assertEquals(self.n, 11)
+        self.assertEqual(self.n, 11)
 
         parser.buffer_text = 1
         self.assertTrue(parser.buffer_text)
-        self.assertEquals(parser.buffer_size, 1024)
+        self.assertEqual(parser.buffer_size, 1024)
         parser.Parse(xml3, 1)
-        self.assertEquals(self.n, 12)
+        self.assertEqual(self.n, 12)
 
 
 
@@ -533,14 +533,14 @@
         parser.CharacterDataHandler = self.counting_handler
         parser.buffer_text = 1
         parser.buffer_size = 1024
-        self.assertEquals(parser.buffer_size, 1024)
+        self.assertEqual(parser.buffer_size, 1024)
 
         self.n = 0
         parser.Parse(xml1, 0)
         parser.buffer_size *= 2
-        self.assertEquals(parser.buffer_size, 2048)
+        self.assertEqual(parser.buffer_size, 2048)
         parser.Parse(xml2, 1)
-        self.assertEquals(self.n, 2)
+        self.assertEqual(self.n, 2)
 
     def test_change_size_2(self):
         xml1 = "<?xml version='1.0' encoding='iso8859'?><a>a<s>%s" % ('a' * 1023)
@@ -549,14 +549,14 @@
         parser.CharacterDataHandler = self.counting_handler
         parser.buffer_text = 1
         parser.buffer_size = 2048
-        self.assertEquals(parser.buffer_size, 2048)
+        self.assertEqual(parser.buffer_size, 2048)
 
         self.n=0
         parser.Parse(xml1, 0)
         parser.buffer_size //= 2
-        self.assertEquals(parser.buffer_size, 1024)
+        self.assertEqual(parser.buffer_size, 1024)
         parser.Parse(xml2, 1)
-        self.assertEquals(self.n, 4)
+        self.assertEqual(self.n, 4)
 
 class MalformedInputText(unittest.TestCase):
     def test1(self):
@@ -566,7 +566,7 @@
             parser.Parse(xml, True)
             self.fail()
         except expat.ExpatError as e:
-            self.assertEquals(str(e), 'unclosed token: line 2, column 0')
+            self.assertEqual(str(e), 'unclosed token: line 2, column 0')
 
     def test2(self):
         xml = "<?xml version\xc2\x85='1.0'?>\r\n"
@@ -575,7 +575,7 @@
             parser.Parse(xml, True)
             self.fail()
         except expat.ExpatError as e:
-            self.assertEquals(str(e), 'XML declaration not well-formed: line 1, column 14')
+            self.assertEqual(str(e), 'XML declaration not well-formed: line 1, column 14')
 
 def test_main():
     run_unittest(SetAttributeTest,

diff --git a/lib-python/2.7.0/email/test/test_email_renamed.py b/lib-python/2.7.0/email/test/test_email_renamed.py
--- a/lib-python/2.7.0/email/test/test_email_renamed.py
+++ b/lib-python/2.7.0/email/test/test_email_renamed.py
@@ -41,13 +41,13 @@
 SPACE = ' '
 
 
-
+
 def openfile(filename, mode='r'):
     path = os.path.join(os.path.dirname(landmark), 'data', filename)
     return open(path, mode)
 
 
-
+
 # Base test class
 class TestEmailBase(unittest.TestCase):
     def ndiffAssertEqual(self, first, second):
@@ -69,7 +69,7 @@
         return msg
 
 
-
+
 # Test various aspects of the Message class's API
 class TestMessageAPI(TestEmailBase):
     def test_get_all(self):
@@ -504,7 +504,7 @@
         self.assertEqual(msg.get_payload(decode=True), x)
 
 
-
+
 # Test the email.encoders module
 class TestEncoders(unittest.TestCase):
     def test_encode_empty_payload(self):
@@ -531,7 +531,7 @@
         eq(msg['content-transfer-encoding'], 'quoted-printable')
 
 
-
+
 # Test long header wrapping
 class TestLongHeaders(TestEmailBase):
     def test_split_long_continuation(self):
@@ -852,7 +852,7 @@
 """)
 
 
-
+
 # Test mangling of "From " lines in the body of a message
 class TestFromMangling(unittest.TestCase):
     def setUp(self):
@@ -886,7 +886,7 @@
 """)
 
 
-
+
 # Test the basic MIMEAudio class
 class TestMIMEAudio(unittest.TestCase):
     def setUp(self):
@@ -935,7 +935,7 @@
                                   header='foobar') is missing)
 
 
-
+
 # Test the basic MIMEImage class
 class TestMIMEImage(unittest.TestCase):
     def setUp(self):
@@ -978,7 +978,7 @@
                                   header='foobar') is missing)
 
 
-
+
 # Test the basic MIMEApplication class
 class TestMIMEApplication(unittest.TestCase):
     def test_headers(self):
@@ -995,7 +995,7 @@
         eq(msg.get_payload(decode=True), bytes)
 
 
-
+
 # Test the basic MIMEText class
 class TestMIMEText(unittest.TestCase):
     def setUp(self):
@@ -1022,7 +1022,7 @@
         eq(msg['content-type'], 'text/plain; charset="us-ascii"')
 
 
-
+
 # Test complicated multipart/* messages
 class TestMultipart(TestEmailBase):
     def setUp(self):
@@ -1398,10 +1398,10 @@
 
 YXNkZg==
 --===============0012394164==--""")
-        self.assertEquals(m.get_payload(0).get_payload(), 'YXNkZg==')
-
-
-
+        self.assertEqual(m.get_payload(0).get_payload(), 'YXNkZg==')
+
+
+
 # Test some badly formatted messages
 class TestNonConformant(TestEmailBase):
     def test_parse_missing_minor_type(self):
@@ -1515,7 +1515,7 @@
         eq(msg.defects[0].line, ' Line 1\n')
 
 
-
+
 # Test RFC 2047 header encoding and decoding
 class TestRFC2047(unittest.TestCase):
     def test_rfc2047_multiline(self):
@@ -1562,7 +1562,7 @@
                               ('sbord', None)])
 
 
-
+
 # Test the MIMEMessage class
 class TestMIMEMessage(TestEmailBase):
     def setUp(self):
@@ -1872,7 +1872,7 @@
         eq(msg.get_payload(1), text2)
 
 
-
+
 # A general test of parser->model->generator idempotency.  IOW, read a message
 # in, parse it into a message object tree, then without touching the tree,
 # regenerate the plain text.  The original text and the transformed text
@@ -1896,7 +1896,7 @@
         eq(text, s.getvalue())
 
     def test_parse_text_message(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         msg, text = self._msgobj('msg_01.txt')
         eq(msg.get_content_type(), 'text/plain')
         eq(msg.get_content_maintype(), 'text')
@@ -1908,7 +1908,7 @@
         self._idempotent(msg, text)
 
     def test_parse_untyped_message(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         msg, text = self._msgobj('msg_03.txt')
         eq(msg.get_content_type(), 'text/plain')
         eq(msg.get_params(), None)
@@ -1980,7 +1980,7 @@
         self._idempotent(msg, text)
 
     def test_content_type(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         unless = self.assertTrue
         # Get a message object and reset the seek pointer for other tests
         msg, text = self._msgobj('msg_05.txt')
@@ -2012,7 +2012,7 @@
         eq(msg4.get_payload(), 'Yadda yadda yadda\n')
 
     def test_parser(self):
-        eq = self.assertEquals
+        eq = self.assertEqual
         unless = self.assertTrue
         msg, text = self._msgobj('msg_06.txt')
         # Check some of the outer headers
@@ -2029,7 +2029,7 @@
         eq(msg1.get_payload(), '\n')
 
 
-
+
 # Test various other bits of the package's functionality
 class TestMiscellaneous(TestEmailBase):
     def test_message_from_string(self):
@@ -2354,7 +2354,7 @@
 """)
 
 
-
+
 # Test the iterator/generators
 class TestIterators(TestEmailBase):
     def test_body_line_iterator(self):
@@ -2414,7 +2414,7 @@
 """)
 
 
-
+
 class TestParsers(TestEmailBase):
     def test_header_parser(self):
         eq = self.assertEqual
@@ -2559,7 +2559,7 @@
         eq(msg.get_payload(), 'body')
 
 
-
+
 class TestBase64(unittest.TestCase):
     def test_len(self):
         eq = self.assertEqual
@@ -2631,7 +2631,7 @@
  =?iso-8859-1?b?eHh4eCB4eHh4IHh4eHgg?=""")
 
 
-
+
 class TestQuopri(unittest.TestCase):
     def setUp(self):
         self.hlit = [chr(x) for x in range(ord('a'), ord('z')+1)] + \
@@ -2741,7 +2741,7 @@
 two line""")
 
 
-
+
 # Test the Charset class
 class TestCharset(unittest.TestCase):
     def tearDown(self):
@@ -2799,7 +2799,7 @@
         self.assertRaises(errors.CharsetError, Charset, 'asc\xffii')
 
 
-
+
 # Test multilingual MIME headers.
 class TestHeader(TestEmailBase):
     def test_simple(self):
@@ -2962,7 +2962,7 @@
         raises(errors.HeaderParseError, decode_header, s)
 
 
-
+
 # Test RFC 2231 header parameters (en/de)coding
 class TestRFC2231(TestEmailBase):
     def test_get_param(self):
@@ -3274,7 +3274,7 @@
         eq(s, 'My Document For You')
 
 
-
+
 def _testclasses():
     mod = sys.modules[__name__]
     return [getattr(mod, name) for name in dir(mod) if name.startswith('Test')]
@@ -3292,6 +3292,6 @@
         run_unittest(testclass)
 
 
-
+
 if __name__ == '__main__':
     unittest.main(defaultTest='suite')

diff --git a/lib-python/2.7.0/distutils/unixccompiler.py b/lib-python/2.7.0/distutils/unixccompiler.py
--- a/lib-python/2.7.0/distutils/unixccompiler.py
+++ b/lib-python/2.7.0/distutils/unixccompiler.py
@@ -13,7 +13,7 @@
   * link shared library handled by 'cc -shared'
 """
 
-__revision__ = "$Id: unixccompiler.py 82272 2010-06-27 12:36:16Z ronald.oussoren $"
+__revision__ = "$Id$"
 
 import os, sys, re
 from types import StringType, NoneType

diff --git a/lib-python/2.7.0/calendar.py b/lib-python/2.7.0/calendar.py
--- a/lib-python/2.7.0/calendar.py
+++ b/lib-python/2.7.0/calendar.py
@@ -486,8 +486,8 @@
         self.locale = locale
 
     def __enter__(self):
-        self.oldlocale = _locale.setlocale(_locale.LC_TIME, self.locale)
-        return _locale.getlocale(_locale.LC_TIME)[1]
+        self.oldlocale = _locale.getlocale(_locale.LC_TIME)
+        _locale.setlocale(_locale.LC_TIME, self.locale)
 
     def __exit__(self, *args):
         _locale.setlocale(_locale.LC_TIME, self.oldlocale)

diff --git a/lib-python/2.7.0/test/test_commands.py b/lib-python/2.7.0/test/test_commands.py
--- a/lib-python/2.7.0/test/test_commands.py
+++ b/lib-python/2.7.0/test/test_commands.py
@@ -24,8 +24,8 @@
 class CommandTests(unittest.TestCase):
 
     def test_getoutput(self):
-        self.assertEquals(commands.getoutput('echo xyzzy'), 'xyzzy')
-        self.assertEquals(commands.getstatusoutput('echo xyzzy'), (0, 'xyzzy'))
+        self.assertEqual(commands.getoutput('echo xyzzy'), 'xyzzy')
+        self.assertEqual(commands.getstatusoutput('echo xyzzy'), (0, 'xyzzy'))
 
         # we use mkdtemp in the next line to create an empty directory
         # under our exclusive control; from that, we can invent a pathname
@@ -36,7 +36,7 @@
             name = os.path.join(dir, "foo")
 
             status, output = commands.getstatusoutput('cat ' + name)
-            self.assertNotEquals(status, 0)
+            self.assertNotEqual(status, 0)
         finally:
             if dir is not None:
                 os.rmdir(dir)

diff --git a/lib-python/2.7.0/test/test_functools.py b/lib-python/2.7.0/test/test_functools.py
--- a/lib-python/2.7.0/test/test_functools.py
+++ b/lib-python/2.7.0/test/test_functools.py
@@ -361,12 +361,12 @@
                 self.value = value
             def __lt__(self, other):
                 return self.value < other.value
-        self.assert_(A(1) < A(2))
-        self.assert_(A(2) > A(1))
-        self.assert_(A(1) <= A(2))
-        self.assert_(A(2) >= A(1))
-        self.assert_(A(2) <= A(2))
-        self.assert_(A(2) >= A(2))
+        self.assertTrue(A(1) < A(2))
+        self.assertTrue(A(2) > A(1))
+        self.assertTrue(A(1) <= A(2))
+        self.assertTrue(A(2) >= A(1))
+        self.assertTrue(A(2) <= A(2))
+        self.assertTrue(A(2) >= A(2))
 
     def test_total_ordering_le(self):
         @functools.total_ordering
@@ -375,12 +375,12 @@
                 self.value = value
             def __le__(self, other):
                 return self.value <= other.value
-        self.assert_(A(1) < A(2))
-        self.assert_(A(2) > A(1))
-        self.assert_(A(1) <= A(2))
-        self.assert_(A(2) >= A(1))
-        self.assert_(A(2) <= A(2))
-        self.assert_(A(2) >= A(2))
+        self.assertTrue(A(1) < A(2))
+        self.assertTrue(A(2) > A(1))
+        self.assertTrue(A(1) <= A(2))
+        self.assertTrue(A(2) >= A(1))
+        self.assertTrue(A(2) <= A(2))
+        self.assertTrue(A(2) >= A(2))
 
     def test_total_ordering_gt(self):
         @functools.total_ordering
@@ -389,12 +389,12 @@
                 self.value = value
             def __gt__(self, other):
                 return self.value > other.value
-        self.assert_(A(1) < A(2))
-        self.assert_(A(2) > A(1))
-        self.assert_(A(1) <= A(2))
-        self.assert_(A(2) >= A(1))
-        self.assert_(A(2) <= A(2))
-        self.assert_(A(2) >= A(2))
+        self.assertTrue(A(1) < A(2))
+        self.assertTrue(A(2) > A(1))
+        self.assertTrue(A(1) <= A(2))
+        self.assertTrue(A(2) >= A(1))
+        self.assertTrue(A(2) <= A(2))
+        self.assertTrue(A(2) >= A(2))
 
     def test_total_ordering_ge(self):
         @functools.total_ordering
@@ -403,24 +403,24 @@
                 self.value = value
             def __ge__(self, other):
                 return self.value >= other.value
-        self.assert_(A(1) < A(2))
-        self.assert_(A(2) > A(1))
-        self.assert_(A(1) <= A(2))
-        self.assert_(A(2) >= A(1))
-        self.assert_(A(2) <= A(2))
-        self.assert_(A(2) >= A(2))
+        self.assertTrue(A(1) < A(2))
+        self.assertTrue(A(2) > A(1))
+        self.assertTrue(A(1) <= A(2))
+        self.assertTrue(A(2) >= A(1))
+        self.assertTrue(A(2) <= A(2))
+        self.assertTrue(A(2) >= A(2))
 
     def test_total_ordering_no_overwrite(self):
         # new methods should not overwrite existing
         @functools.total_ordering
         class A(str):
             pass
-        self.assert_(A("a") < A("b"))
-        self.assert_(A("b") > A("a"))
-        self.assert_(A("a") <= A("b"))
-        self.assert_(A("b") >= A("a"))
-        self.assert_(A("b") <= A("b"))
-        self.assert_(A("b") >= A("b"))
+        self.assertTrue(A("a") < A("b"))
+        self.assertTrue(A("b") > A("a"))
+        self.assertTrue(A("a") <= A("b"))
+        self.assertTrue(A("b") >= A("a"))
+        self.assertTrue(A("b") <= A("b"))
+        self.assertTrue(A("b") >= A("b"))
 
     def test_no_operations_defined(self):
         with self.assertRaises(ValueError):

diff --git a/lib-python/2.7.0/test/test_rlcompleter.py b/lib-python/2.7.0/test/test_rlcompleter.py
--- a/lib-python/2.7.0/test/test_rlcompleter.py
+++ b/lib-python/2.7.0/test/test_rlcompleter.py
@@ -31,9 +31,9 @@
 
     def test_global_matches(self):
         # test with builtins namespace
-        self.assertEqual(self.stdcompleter.global_matches('di'),
+        self.assertEqual(sorted(self.stdcompleter.global_matches('di')),
                          [x+'(' for x in dir(builtins) if x.startswith('di')])
-        self.assertEqual(self.stdcompleter.global_matches('st'),
+        self.assertEqual(sorted(self.stdcompleter.global_matches('st')),
                          [x+'(' for x in dir(builtins) if x.startswith('st')])
         self.assertEqual(self.stdcompleter.global_matches('akaksajadhak'), [])
 

diff --git a/lib-python/2.7.0/test/test_difflib.py b/lib-python/2.7.0/test/test_difflib.py
--- a/lib-python/2.7.0/test/test_difflib.py
+++ b/lib-python/2.7.0/test/test_difflib.py
@@ -4,8 +4,47 @@
 import doctest
 import sys
 
+
+class TestWithAscii(unittest.TestCase):
+    def test_one_insert(self):
+        sm = difflib.SequenceMatcher(None, 'b' * 100, 'a' + 'b' * 100)
+        self.assertAlmostEqual(sm.ratio(), 0.995, places=3)
+        self.assertEqual(list(sm.get_opcodes()),
+            [   ('insert', 0, 0, 0, 1),
+                ('equal', 0, 100, 1, 101)])
+        sm = difflib.SequenceMatcher(None, 'b' * 100, 'b' * 50 + 'a' + 'b' * 50)
+        self.assertAlmostEqual(sm.ratio(), 0.995, places=3)
+        self.assertEqual(list(sm.get_opcodes()),
+            [   ('equal', 0, 50, 0, 50),
+                ('insert', 50, 50, 50, 51),
+                ('equal', 50, 100, 51, 101)])
+
+    def test_one_delete(self):
+        sm = difflib.SequenceMatcher(None, 'a' * 40 + 'c' + 'b' * 40, 'a' * 40 + 'b' * 40)
+        self.assertAlmostEqual(sm.ratio(), 0.994, places=3)
+        self.assertEqual(list(sm.get_opcodes()),
+            [   ('equal', 0, 40, 0, 40),
+                ('delete', 40, 41, 40, 40),
+                ('equal', 41, 81, 40, 80)])
+
+
+class TestAutojunk(unittest.TestCase):
+    """Tests for the autojunk parameter added in 2.7"""
+    def test_one_insert_homogenous_sequence(self):
+        # By default autojunk=True and the heuristic kicks in for a sequence
+        # of length 200+
+        seq1 = 'b' * 200
+        seq2 = 'a' + 'b' * 200
+
+        sm = difflib.SequenceMatcher(None, seq1, seq2)
+        self.assertAlmostEqual(sm.ratio(), 0, places=3)
+
+        # Now turn the heuristic off
+        sm = difflib.SequenceMatcher(None, seq1, seq2, autojunk=False)
+        self.assertAlmostEqual(sm.ratio(), 0.9975, places=3)
+
+
 class TestSFbugs(unittest.TestCase):
-
     def test_ratio_for_null_seqn(self):
         # Check clearing of SF bug 763023
         s = difflib.SequenceMatcher(None, [], [])
@@ -184,7 +223,9 @@
 def test_main():
     difflib.HtmlDiff._default_prefix = 0
     Doctests = doctest.DocTestSuite(difflib)
-    run_unittest(TestSFpatches, TestSFbugs, TestOutputFormat, Doctests)
+    run_unittest(
+        TestWithAscii, TestAutojunk, TestSFpatches, TestSFbugs,
+        TestOutputFormat, Doctests)
 
 if __name__ == '__main__':
     test_main()

diff --git a/lib-python/2.7.0/test/test_codeccallbacks.py b/lib-python/2.7.0/test/test_codeccallbacks.py
--- a/lib-python/2.7.0/test/test_codeccallbacks.py
+++ b/lib-python/2.7.0/test/test_codeccallbacks.py
@@ -186,7 +186,7 @@
         charmap = dict([ (ord(c), 2*c.upper()) for c in "abcdefgh"])
         sin = u"abc"
         sout = "AABBCC"
-        self.assertEquals(codecs.charmap_encode(sin, "strict", charmap)[0], sout)
+        self.assertEqual(codecs.charmap_encode(sin, "strict", charmap)[0], sout)
 
         sin = u"abcA"
         self.assertRaises(UnicodeError, codecs.charmap_encode, sin, "strict", charmap)
@@ -194,7 +194,7 @@
         charmap[ord("?")] = "XYZ"
         sin = u"abcDEF"
         sout = "AABBCCXYZXYZXYZ"
-        self.assertEquals(codecs.charmap_encode(sin, "replace", charmap)[0], sout)
+        self.assertEqual(codecs.charmap_encode(sin, "replace", charmap)[0], sout)
 
         charmap[ord("?")] = u"XYZ"
         self.assertRaises(TypeError, codecs.charmap_encode, sin, "replace", charmap)
@@ -327,7 +327,7 @@
 
         # check with the correct number and type of arguments
         exc = exctype(*args)
-        self.assertEquals(str(exc), msg)
+        self.assertEqual(str(exc), msg)
 
     def test_unicodeencodeerror(self):
         self.check_exceptionobjectargs(
@@ -437,15 +437,15 @@
            UnicodeError("ouch")
         )
         # If the correct exception is passed in, "ignore" returns an empty replacement
-        self.assertEquals(
+        self.assertEqual(
             codecs.ignore_errors(UnicodeEncodeError("ascii", u"\u3042", 0, 1, "ouch")),
             (u"", 1)
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.ignore_errors(UnicodeDecodeError("ascii", "\xff", 0, 1, "ouch")),
             (u"", 1)
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.ignore_errors(UnicodeTranslateError(u"\u3042", 0, 1, "ouch")),
             (u"", 1)
         )
@@ -474,15 +474,15 @@
             BadObjectUnicodeDecodeError()
         )
         # With the correct exception, "replace" returns an "?" or u"\ufffd" replacement
-        self.assertEquals(
+        self.assertEqual(
             codecs.replace_errors(UnicodeEncodeError("ascii", u"\u3042", 0, 1, "ouch")),
             (u"?", 1)
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.replace_errors(UnicodeDecodeError("ascii", "\xff", 0, 1, "ouch")),
             (u"\ufffd", 1)
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.replace_errors(UnicodeTranslateError(u"\u3042", 0, 1, "ouch")),
             (u"\ufffd", 1)
         )
@@ -514,7 +514,7 @@
         # Use the correct exception
         cs = (0, 1, 9, 10, 99, 100, 999, 1000, 9999, 10000, 0x3042)
         s = "".join(unichr(c) for c in cs)
-        self.assertEquals(
+        self.assertEqual(
             codecs.xmlcharrefreplace_errors(
                 UnicodeEncodeError("ascii", s, 0, len(s), "ouch")
             ),
@@ -546,32 +546,32 @@
             UnicodeTranslateError(u"\u3042", 0, 1, "ouch")
         )
         # Use the correct exception
-        self.assertEquals(
+        self.assertEqual(
             codecs.backslashreplace_errors(UnicodeEncodeError("ascii", u"\u3042", 0, 1, "ouch")),
             (u"\\u3042", 1)
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.backslashreplace_errors(UnicodeEncodeError("ascii", u"\x00", 0, 1, "ouch")),
             (u"\\x00", 1)
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.backslashreplace_errors(UnicodeEncodeError("ascii", u"\xff", 0, 1, "ouch")),
             (u"\\xff", 1)
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.backslashreplace_errors(UnicodeEncodeError("ascii", u"\u0100", 0, 1, "ouch")),
             (u"\\u0100", 1)
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.backslashreplace_errors(UnicodeEncodeError("ascii", u"\uffff", 0, 1, "ouch")),
             (u"\\uffff", 1)
         )
         if sys.maxunicode>0xffff:
-            self.assertEquals(
+            self.assertEqual(
                 codecs.backslashreplace_errors(UnicodeEncodeError("ascii", u"\U00010000", 0, 1, "ouch")),
                 (u"\\U00010000", 1)
             )
-            self.assertEquals(
+            self.assertEqual(
                 codecs.backslashreplace_errors(UnicodeEncodeError("ascii", u"\U0010ffff", 0, 1, "ouch")),
                 (u"\\U0010ffff", 1)
             )
@@ -603,14 +603,14 @@
                 )
 
     def test_lookup(self):
-        self.assertEquals(codecs.strict_errors, codecs.lookup_error("strict"))
-        self.assertEquals(codecs.ignore_errors, codecs.lookup_error("ignore"))
-        self.assertEquals(codecs.strict_errors, codecs.lookup_error("strict"))
-        self.assertEquals(
+        self.assertEqual(codecs.strict_errors, codecs.lookup_error("strict"))
+        self.assertEqual(codecs.ignore_errors, codecs.lookup_error("ignore"))
+        self.assertEqual(codecs.strict_errors, codecs.lookup_error("strict"))
+        self.assertEqual(
             codecs.xmlcharrefreplace_errors,
             codecs.lookup_error("xmlcharrefreplace")
         )
-        self.assertEquals(
+        self.assertEqual(
             codecs.backslashreplace_errors,
             codecs.lookup_error("backslashreplace")
         )
@@ -686,11 +686,11 @@
 
         # Valid negative position
         handler.pos = -1
-        self.assertEquals("\xff0".decode("ascii", "test.posreturn"), u"<?>0")
+        self.assertEqual("\xff0".decode("ascii", "test.posreturn"), u"<?>0")
 
         # Valid negative position
         handler.pos = -2
-        self.assertEquals("\xff0".decode("ascii", "test.posreturn"), u"<?><?>")
+        self.assertEqual("\xff0".decode("ascii", "test.posreturn"), u"<?><?>")
 
         # Negative position out of bounds
         handler.pos = -3
@@ -698,11 +698,11 @@
 
         # Valid positive position
         handler.pos = 1
-        self.assertEquals("\xff0".decode("ascii", "test.posreturn"), u"<?>0")
+        self.assertEqual("\xff0".decode("ascii", "test.posreturn"), u"<?>0")
 
         # Largest valid positive position (one beyond end of input)
         handler.pos = 2
-        self.assertEquals("\xff0".decode("ascii", "test.posreturn"), u"<?>")
+        self.assertEqual("\xff0".decode("ascii", "test.posreturn"), u"<?>")
 
         # Invalid positive position
         handler.pos = 3
@@ -710,7 +710,7 @@
 
         # Restart at the "0"
         handler.pos = 6
-        self.assertEquals("\\uyyyy0".decode("raw-unicode-escape", "test.posreturn"), u"<?>0")
+        self.assertEqual("\\uyyyy0".decode("raw-unicode-escape", "test.posreturn"), u"<?>0")
 
         class D(dict):
             def __getitem__(self, key):
@@ -740,11 +740,11 @@
 
         # Valid negative position
         handler.pos = -1
-        self.assertEquals(u"\xff0".encode("ascii", "test.posreturn"), "<?>0")
+        self.assertEqual(u"\xff0".encode("ascii", "test.posreturn"), "<?>0")
 
         # Valid negative position
         handler.pos = -2
-        self.assertEquals(u"\xff0".encode("ascii", "test.posreturn"), "<?><?>")
+        self.assertEqual(u"\xff0".encode("ascii", "test.posreturn"), "<?><?>")
 
         # Negative position out of bounds
         handler.pos = -3
@@ -752,11 +752,11 @@
 
         # Valid positive position
         handler.pos = 1
-        self.assertEquals(u"\xff0".encode("ascii", "test.posreturn"), "<?>0")
+        self.assertEqual(u"\xff0".encode("ascii", "test.posreturn"), "<?>0")
 
         # Largest valid positive position (one beyond end of input
         handler.pos = 2
-        self.assertEquals(u"\xff0".encode("ascii", "test.posreturn"), "<?>")
+        self.assertEqual(u"\xff0".encode("ascii", "test.posreturn"), "<?>")
 
         # Invalid positive position
         handler.pos = 3

diff --git a/lib-python/2.7.0/test/test_builtin.py b/lib-python/2.7.0/test/test_builtin.py
--- a/lib-python/2.7.0/test/test_builtin.py
+++ b/lib-python/2.7.0/test/test_builtin.py
@@ -651,15 +651,15 @@
         class X:
             def __hash__(self):
                 return 2**100
-        self.assertEquals(type(hash(X())), int)
+        self.assertEqual(type(hash(X())), int)
         class Y(object):
             def __hash__(self):
                 return 2**100
-        self.assertEquals(type(hash(Y())), int)
+        self.assertEqual(type(hash(Y())), int)
         class Z(long):
             def __hash__(self):
                 return self
-        self.assertEquals(hash(Z(42)), hash(42L))
+        self.assertEqual(hash(Z(42)), hash(42L))
 
     def test_hex(self):
         self.assertEqual(hex(16), '0x10')
@@ -930,7 +930,7 @@
         self.assertEqual(next(it), 1)
         self.assertRaises(StopIteration, next, it)
         self.assertRaises(StopIteration, next, it)
-        self.assertEquals(next(it, 42), 42)
+        self.assertEqual(next(it, 42), 42)
 
         class Iter(object):
             def __iter__(self):
@@ -939,7 +939,7 @@
                 raise StopIteration
 
         it = iter(Iter())
-        self.assertEquals(next(it, 42), 42)
+        self.assertEqual(next(it, 42), 42)
         self.assertRaises(StopIteration, next, it)
 
         def gen():
@@ -947,9 +947,9 @@
             return
 
         it = gen()
-        self.assertEquals(next(it), 1)
+        self.assertEqual(next(it), 1)
         self.assertRaises(StopIteration, next, it)
-        self.assertEquals(next(it, 42), 42)
+        self.assertEqual(next(it, 42), 42)
 
     def test_oct(self):
         self.assertEqual(oct(100), '0144')

diff --git a/lib-python/2.7.0/test/test_bytes.py b/lib-python/2.7.0/test/test_bytes.py
--- a/lib-python/2.7.0/test/test_bytes.py
+++ b/lib-python/2.7.0/test/test_bytes.py
@@ -255,11 +255,11 @@
     def test_fromhex(self):
         self.assertRaises(TypeError, self.type2test.fromhex)
         self.assertRaises(TypeError, self.type2test.fromhex, 1)
-        self.assertEquals(self.type2test.fromhex(u''), self.type2test())
+        self.assertEqual(self.type2test.fromhex(u''), self.type2test())
         b = bytearray([0x1a, 0x2b, 0x30])
-        self.assertEquals(self.type2test.fromhex(u'1a2B30'), b)
-        self.assertEquals(self.type2test.fromhex(u'  1A 2B  30   '), b)
-        self.assertEquals(self.type2test.fromhex(u'0000'), b'\0\0')
+        self.assertEqual(self.type2test.fromhex(u'1a2B30'), b)
+        self.assertEqual(self.type2test.fromhex(u'  1A 2B  30   '), b)
+        self.assertEqual(self.type2test.fromhex(u'0000'), b'\0\0')
         self.assertRaises(ValueError, self.type2test.fromhex, u'a')
         self.assertRaises(ValueError, self.type2test.fromhex, u'rt')
         self.assertRaises(ValueError, self.type2test.fromhex, u'1a b cd')
@@ -587,11 +587,11 @@
                     data.reverse()
                     L[start:stop:step] = data
                     b[start:stop:step] = data
-                    self.assertEquals(b, bytearray(L))
+                    self.assertEqual(b, bytearray(L))
 
                     del L[start:stop:step]
                     del b[start:stop:step]
-                    self.assertEquals(b, bytearray(L))
+                    self.assertEqual(b, bytearray(L))
 
     def test_setslice_trap(self):
         # This test verifies that we correctly handle assigning self
@@ -771,25 +771,25 @@
         resize(10)
         orig = b[:]
         self.assertRaises(BufferError, resize, 11)
-        self.assertEquals(b, orig)
+        self.assertEqual(b, orig)
         self.assertRaises(BufferError, resize, 9)
-        self.assertEquals(b, orig)
+        self.assertEqual(b, orig)
         self.assertRaises(BufferError, resize, 0)
-        self.assertEquals(b, orig)
+        self.assertEqual(b, orig)
         # Other operations implying resize
         self.assertRaises(BufferError, b.pop, 0)
-        self.assertEquals(b, orig)
+        self.assertEqual(b, orig)
         self.assertRaises(BufferError, b.remove, b[1])
-        self.assertEquals(b, orig)
+        self.assertEqual(b, orig)
         def delitem():
             del b[1]
         self.assertRaises(BufferError, delitem)
-        self.assertEquals(b, orig)
+        self.assertEqual(b, orig)
         # deleting a non-contiguous slice
         def delslice():
             b[1:-1:2] = b""
         self.assertRaises(BufferError, delslice)
-        self.assertEquals(b, orig)
+        self.assertEqual(b, orig)
 
     def test_empty_bytearray(self):
         # Issue #7561: operations on empty bytearrays could crash in many

diff --git a/lib-python/2.7.0/distutils/version.py b/lib-python/2.7.0/distutils/version.py
--- a/lib-python/2.7.0/distutils/version.py
+++ b/lib-python/2.7.0/distutils/version.py
@@ -4,7 +4,7 @@
 # Implements multiple version numbering conventions for the
 # Python Module Distribution Utilities.
 #
-# $Id: version.py 70642 2009-03-28 00:48:48Z georg.brandl $
+# $Id$
 #
 
 """Provides classes to represent module version numbers (one class for

diff --git a/lib-python/2.7.0/distutils/tests/test_msvc9compiler.py b/lib-python/2.7.0/distutils/tests/test_msvc9compiler.py
--- a/lib-python/2.7.0/distutils/tests/test_msvc9compiler.py
+++ b/lib-python/2.7.0/distutils/tests/test_msvc9compiler.py
@@ -103,7 +103,7 @@
         import _winreg
         HKCU = _winreg.HKEY_CURRENT_USER
         keys = Reg.read_keys(HKCU, 'xxxx')
-        self.assertEquals(keys, None)
+        self.assertEqual(keys, None)
 
         keys = Reg.read_keys(HKCU, r'Control Panel')
         self.assertTrue('Desktop' in keys)
@@ -113,20 +113,24 @@
         tempdir = self.mkdtemp()
         manifest = os.path.join(tempdir, 'manifest')
         f = open(manifest, 'w')
-        f.write(_MANIFEST)
-        f.close()
+        try:
+            f.write(_MANIFEST)
+        finally:
+            f.close()
 
         compiler = MSVCCompiler()
         compiler._remove_visual_c_ref(manifest)
 
         # see what we got
         f = open(manifest)
-        # removing trailing spaces
-        content = '\n'.join([line.rstrip() for line in f.readlines()])
-        f.close()
+        try:
+            # removing trailing spaces
+            content = '\n'.join([line.rstrip() for line in f.readlines()])
+        finally:
+            f.close()
 
         # makes sure the manifest was properly cleaned
-        self.assertEquals(content, _CLEANED_MANIFEST)
+        self.assertEqual(content, _CLEANED_MANIFEST)
 
 
 def test_suite():

diff --git a/lib-python/2.7.0/difflib.py b/lib-python/2.7.0/difflib.py
--- a/lib-python/2.7.0/difflib.py
+++ b/lib-python/2.7.0/difflib.py
@@ -151,7 +151,7 @@
         Return an upper bound on ratio() very quickly.
     """
 
-    def __init__(self, isjunk=None, a='', b=''):
+    def __init__(self, isjunk=None, a='', b='', autojunk=True):
         """Construct a SequenceMatcher.
 
         Optional arg isjunk is None (the default), or a one-argument
@@ -169,6 +169,10 @@
         Optional arg b is the second of two sequences to be compared.  By
         default, an empty string.  The elements of b must be hashable. See
         also .set_seqs() and .set_seq2().
+
+        Optional arg autojunk should be set to False to disable the
+        "automatic junk heuristic" that treats popular elements as junk
+        (see module documentation for more information).
         """
 
         # Members:
@@ -207,11 +211,13 @@
         #      DOES NOT WORK for x in a!
         # isbpopular
         #      for x in b, isbpopular(x) is true iff b is reasonably long
-        #      (at least 200 elements) and x accounts for more than 1% of
-        #      its elements.  DOES NOT WORK for x in a!
+        #      (at least 200 elements) and x accounts for more than 1 + 1% of
+        #      its elements (when autojunk is enabled).
+        #      DOES NOT WORK for x in a!
 
         self.isjunk = isjunk
         self.a = self.b = None
+        self.autojunk = autojunk
         self.set_seqs(a, b)
 
     def set_seqs(self, a, b):
@@ -288,7 +294,7 @@
     # from starting any matching block at a junk element ...
     # also creates the fast isbjunk function ...
     # b2j also does not contain entries for "popular" elements, meaning
-    # elements that account for more than 1% of the total elements, and
+    # elements that account for more than 1 + 1% of the total elements, and
     # when the sequence is reasonably large (>= 200 elements); this can
     # be viewed as an adaptive notion of semi-junk, and yields an enormous
     # speedup when, e.g., comparing program files with hundreds of
@@ -309,44 +315,37 @@
         # out the junk later is much cheaper than building b2j "right"
         # from the start.
         b = self.b
+        self.b2j = b2j = {}
+
+        for i, elt in enumerate(b):
+            indices = b2j.setdefault(elt, [])
+            indices.append(i)
+
+        # Purge junk elements
+        junk = set()
+        isjunk = self.isjunk
+        if isjunk:
+            for elt in list(b2j.keys()):  # using list() since b2j is modified
+                if isjunk(elt):
+                    junk.add(elt)
+                    del b2j[elt]
+
+        # Purge popular elements that are not junk
+        popular = set()
         n = len(b)
-        self.b2j = b2j = {}
-        populardict = {}
-        for i, elt in enumerate(b):
-            if elt in b2j:
-                indices = b2j[elt]
-                if n >= 200 and len(indices) * 100 > n:
-                    populardict[elt] = 1
-                    del indices[:]
-                else:
-                    indices.append(i)
-            else:
-                b2j[elt] = [i]
+        if self.autojunk and n >= 200:
+            ntest = n // 100 + 1
+            for elt, idxs in list(b2j.items()):
+                if len(idxs) > ntest:
+                    popular.add(elt)
+                    del b2j[elt]
 
-        # Purge leftover indices for popular elements.
-        for elt in populardict:
-            del b2j[elt]
-
-        # Now b2j.keys() contains elements uniquely, and especially when
-        # the sequence is a string, that's usually a good deal smaller
-        # than len(string).  The difference is the number of isjunk calls
-        # saved.
-        isjunk = self.isjunk
-        junkdict = {}
-        if isjunk:
-            for d in populardict, b2j:
-                for elt in d.keys():
-                    if isjunk(elt):
-                        junkdict[elt] = 1
-                        del d[elt]
-
-        # Now for x in b, isjunk(x) == x in junkdict, but the
-        # latter is much faster.  Note too that while there may be a
-        # lot of junk in the sequence, the number of *unique* junk
-        # elements is probably small.  So the memory burden of keeping
-        # this dict alive is likely trivial compared to the size of b2j.
-        self.isbjunk = junkdict.__contains__
-        self.isbpopular = populardict.__contains__
+        # Now for x in b, isjunk(x) == x in junk, but the latter is much faster.
+        # Sicne the number of *unique* junk elements is probably small, the
+        # memory burden of keeping this set alive is likely trivial compared to
+        # the size of b2j.
+        self.isbjunk = junk.__contains__
+        self.isbpopular = popular.__contains__
 
     def find_longest_match(self, alo, ahi, blo, bhi):
         """Find longest matching block in a[alo:ahi] and b[blo:bhi].

diff --git a/lib-python/2.7.0/distutils/command/config.py b/lib-python/2.7.0/distutils/command/config.py
--- a/lib-python/2.7.0/distutils/command/config.py
+++ b/lib-python/2.7.0/distutils/command/config.py
@@ -9,7 +9,7 @@
 this header file lives".
 """
 
-__revision__ = "$Id: config.py 77704 2010-01-23 09:23:15Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 import re

diff --git a/lib-python/2.7.0/test/test_mmap.py b/lib-python/2.7.0/test/test_mmap.py
--- a/lib-python/2.7.0/test/test_mmap.py
+++ b/lib-python/2.7.0/test/test_mmap.py
@@ -417,7 +417,7 @@
                     data = "".join(reversed(data))
                     L[start:stop:step] = data
                     m[start:stop:step] = data
-                    self.assertEquals(m[:], "".join(L))
+                    self.assertEqual(m[:], "".join(L))
 
     def make_mmap_file (self, f, halfsize):
         # Write 2 pages worth of data to the file
@@ -512,27 +512,27 @@
         f.close()
         # Test write_byte()
         for i in xrange(len(data)):
-            self.assertEquals(m.tell(), i)
+            self.assertEqual(m.tell(), i)
             m.write_byte(data[i])
-            self.assertEquals(m.tell(), i+1)
+            self.assertEqual(m.tell(), i+1)
         self.assertRaises(ValueError, m.write_byte, "x")
-        self.assertEquals(m[:], data)
+        self.assertEqual(m[:], data)
         # Test read_byte()
         m.seek(0)
         for i in xrange(len(data)):
-            self.assertEquals(m.tell(), i)
-            self.assertEquals(m.read_byte(), data[i])
-            self.assertEquals(m.tell(), i+1)
+            self.assertEqual(m.tell(), i)
+            self.assertEqual(m.read_byte(), data[i])
+            self.assertEqual(m.tell(), i+1)
         self.assertRaises(ValueError, m.read_byte)
         # Test read()
         m.seek(3)
-        self.assertEquals(m.read(3), "345")
-        self.assertEquals(m.tell(), 6)
+        self.assertEqual(m.read(3), "345")
+        self.assertEqual(m.tell(), 6)
         # Test write()
         m.seek(3)
         m.write("bar")
-        self.assertEquals(m.tell(), 6)
-        self.assertEquals(m[:], "012bar6789")
+        self.assertEqual(m.tell(), 6)
+        self.assertEqual(m[:], "012bar6789")
         m.seek(8)
         self.assertRaises(ValueError, m.write, "bar")
 
@@ -547,8 +547,8 @@
             m1[:] = data1
             m2 = mmap.mmap(-1, len(data2), tagname="foo")
             m2[:] = data2
-            self.assertEquals(m1[:], data2)
-            self.assertEquals(m2[:], data2)
+            self.assertEqual(m1[:], data2)
+            self.assertEqual(m2[:], data2)
             m2.close()
             m1.close()
 
@@ -557,8 +557,8 @@
             m1[:] = data1
             m2 = mmap.mmap(-1, len(data2), tagname="boo")
             m2[:] = data2
-            self.assertEquals(m1[:], data1)
-            self.assertEquals(m2[:], data2)
+            self.assertEqual(m1[:], data1)
+            self.assertEqual(m2[:], data2)
             m2.close()
             m1.close()
 

diff --git a/lib-python/2.7.0/test/test_pyclbr.py b/lib-python/2.7.0/test/test_pyclbr.py
--- a/lib-python/2.7.0/test/test_pyclbr.py
+++ b/lib-python/2.7.0/test/test_pyclbr.py
@@ -97,7 +97,7 @@
                 self.assertIsInstance(py_item, (FunctionType, BuiltinFunctionType))
                 if py_item.__module__ != moduleName:
                     continue   # skip functions that came from somewhere else
-                self.assertEquals(py_item.__module__, value.module)
+                self.assertEqual(py_item.__module__, value.module)
             else:
                 self.assertIsInstance(py_item, (ClassType, type))
                 if py_item.__module__ != moduleName:
@@ -126,7 +126,7 @@
 
                 try:
                     self.assertListEq(foundMethods, actualMethods, ignore)
-                    self.assertEquals(py_item.__module__, value.module)
+                    self.assertEqual(py_item.__module__, value.module)
 
                     self.assertEqualsOrIgnored(py_item.__name__, value.name,
                                                ignore)

diff --git a/lib-python/2.7.0/bsddb/test/test_fileid.py b/lib-python/2.7.0/bsddb/test/test_fileid.py
--- a/lib-python/2.7.0/bsddb/test/test_fileid.py
+++ b/lib-python/2.7.0/bsddb/test/test_fileid.py
@@ -35,11 +35,11 @@
 
         self.db1 = db.DB(self.db_env)
         self.db1.open(self.db_path_1, dbtype=db.DB_HASH, flags=db.DB_RDONLY)
-        self.assertEquals(self.db1.get('spam'), 'eggs')
+        self.assertEqual(self.db1.get('spam'), 'eggs')
 
         self.db2 = db.DB(self.db_env)
         self.db2.open(self.db_path_2, dbtype=db.DB_HASH, flags=db.DB_RDONLY)
-        self.assertEquals(self.db2.get('spam'), 'spam')
+        self.assertEqual(self.db2.get('spam'), 'spam')
 
         self.db1.close()
         self.db2.close()

diff --git a/lib-python/2.7.0/test/test_math.py b/lib-python/2.7.0/test/test_math.py
--- a/lib-python/2.7.0/test/test_math.py
+++ b/lib-python/2.7.0/test/test_math.py
@@ -158,7 +158,7 @@
         self.ftest('acosh(2)', math.acosh(2), 1.3169578969248168)
         self.assertRaises(ValueError, math.acosh, 0)
         self.assertRaises(ValueError, math.acosh, -1)
-        self.assertEquals(math.acosh(INF), INF)
+        self.assertEqual(math.acosh(INF), INF)
         self.assertRaises(ValueError, math.acosh, NINF)
         self.assertTrue(math.isnan(math.acosh(NAN)))
 
@@ -176,8 +176,8 @@
         self.ftest('asinh(0)', math.asinh(0), 0)
         self.ftest('asinh(1)', math.asinh(1), 0.88137358701954305)
         self.ftest('asinh(-1)', math.asinh(-1), -0.88137358701954305)
-        self.assertEquals(math.asinh(INF), INF)
-        self.assertEquals(math.asinh(NINF), NINF)
+        self.assertEqual(math.asinh(INF), INF)
+        self.assertEqual(math.asinh(NINF), NINF)
         self.assertTrue(math.isnan(math.asinh(NAN)))
 
     def testAtan(self):
@@ -264,17 +264,17 @@
     def testCeil(self):
         self.assertRaises(TypeError, math.ceil)
         # These types will be int in py3k.
-        self.assertEquals(float, type(math.ceil(1)))
-        self.assertEquals(float, type(math.ceil(1L)))
-        self.assertEquals(float, type(math.ceil(1.0)))
+        self.assertEqual(float, type(math.ceil(1)))
+        self.assertEqual(float, type(math.ceil(1L)))
+        self.assertEqual(float, type(math.ceil(1.0)))
         self.ftest('ceil(0.5)', math.ceil(0.5), 1)
         self.ftest('ceil(1.0)', math.ceil(1.0), 1)
         self.ftest('ceil(1.5)', math.ceil(1.5), 2)
         self.ftest('ceil(-0.5)', math.ceil(-0.5), 0)
         self.ftest('ceil(-1.0)', math.ceil(-1.0), -1)
         self.ftest('ceil(-1.5)', math.ceil(-1.5), -1)
-        self.assertEquals(math.ceil(INF), INF)
-        self.assertEquals(math.ceil(NINF), NINF)
+        self.assertEqual(math.ceil(INF), INF)
+        self.assertEqual(math.ceil(NINF), NINF)
         self.assertTrue(math.isnan(math.ceil(NAN)))
 
         class TestCeil(object):
@@ -300,19 +300,19 @@
 
         self.assertRaises(TypeError, math.copysign)
         # copysign should let us distinguish signs of zeros
-        self.assertEquals(math.copysign(1., 0.), 1.)
-        self.assertEquals(math.copysign(1., -0.), -1.)
-        self.assertEquals(math.copysign(INF, 0.), INF)
-        self.assertEquals(math.copysign(INF, -0.), NINF)
-        self.assertEquals(math.copysign(NINF, 0.), INF)
-        self.assertEquals(math.copysign(NINF, -0.), NINF)
+        self.assertEqual(math.copysign(1., 0.), 1.)
+        self.assertEqual(math.copysign(1., -0.), -1.)
+        self.assertEqual(math.copysign(INF, 0.), INF)
+        self.assertEqual(math.copysign(INF, -0.), NINF)
+        self.assertEqual(math.copysign(NINF, 0.), INF)
+        self.assertEqual(math.copysign(NINF, -0.), NINF)
         # and of infinities
-        self.assertEquals(math.copysign(1., INF), 1.)
-        self.assertEquals(math.copysign(1., NINF), -1.)
-        self.assertEquals(math.copysign(INF, INF), INF)
-        self.assertEquals(math.copysign(INF, NINF), NINF)
-        self.assertEquals(math.copysign(NINF, INF), INF)
-        self.assertEquals(math.copysign(NINF, NINF), NINF)
+        self.assertEqual(math.copysign(1., INF), 1.)
+        self.assertEqual(math.copysign(1., NINF), -1.)
+        self.assertEqual(math.copysign(INF, INF), INF)
+        self.assertEqual(math.copysign(INF, NINF), NINF)
+        self.assertEqual(math.copysign(NINF, INF), INF)
+        self.assertEqual(math.copysign(NINF, NINF), NINF)
         self.assertTrue(math.isnan(math.copysign(NAN, 1.)))
         self.assertTrue(math.isnan(math.copysign(NAN, INF)))
         self.assertTrue(math.isnan(math.copysign(NAN, NINF)))
@@ -322,7 +322,7 @@
         # given platform.
         self.assertTrue(math.isinf(math.copysign(INF, NAN)))
         # similarly, copysign(2., NAN) could be 2. or -2.
-        self.assertEquals(abs(math.copysign(2., NAN)), 2.)
+        self.assertEqual(abs(math.copysign(2., NAN)), 2.)
 
     def testCos(self):
         self.assertRaises(TypeError, math.cos)
@@ -342,8 +342,8 @@
         self.assertRaises(TypeError, math.cosh)
         self.ftest('cosh(0)', math.cosh(0), 1)
         self.ftest('cosh(2)-2*cosh(1)**2', math.cosh(2)-2*math.cosh(1)**2, -1) # Thanks to Lambert
-        self.assertEquals(math.cosh(INF), INF)
-        self.assertEquals(math.cosh(NINF), INF)
+        self.assertEqual(math.cosh(INF), INF)
+        self.assertEqual(math.cosh(NINF), INF)
         self.assertTrue(math.isnan(math.cosh(NAN)))
 
     def testDegrees(self):
@@ -357,8 +357,8 @@
         self.ftest('exp(-1)', math.exp(-1), 1/math.e)
         self.ftest('exp(0)', math.exp(0), 1)
         self.ftest('exp(1)', math.exp(1), math.e)
-        self.assertEquals(math.exp(INF), INF)
-        self.assertEquals(math.exp(NINF), 0.)
+        self.assertEqual(math.exp(INF), INF)
+        self.assertEqual(math.exp(NINF), 0.)
         self.assertTrue(math.isnan(math.exp(NAN)))
 
     def testFabs(self):
@@ -384,9 +384,9 @@
     def testFloor(self):
         self.assertRaises(TypeError, math.floor)
         # These types will be int in py3k.
-        self.assertEquals(float, type(math.floor(1)))
-        self.assertEquals(float, type(math.floor(1L)))
-        self.assertEquals(float, type(math.floor(1.0)))
+        self.assertEqual(float, type(math.floor(1)))
+        self.assertEqual(float, type(math.floor(1L)))
+        self.assertEqual(float, type(math.floor(1.0)))
         self.ftest('floor(0.5)', math.floor(0.5), 0)
         self.ftest('floor(1.0)', math.floor(1.0), 1)
         self.ftest('floor(1.5)', math.floor(1.5), 1)
@@ -397,8 +397,8 @@
         # This fails on some platforms - so check it here
         self.ftest('floor(1.23e167)', math.floor(1.23e167), 1.23e167)
         self.ftest('floor(-1.23e167)', math.floor(-1.23e167), -1.23e167)
-        self.assertEquals(math.ceil(INF), INF)
-        self.assertEquals(math.ceil(NINF), NINF)
+        self.assertEqual(math.ceil(INF), INF)
+        self.assertEqual(math.ceil(NINF), NINF)
         self.assertTrue(math.isnan(math.floor(NAN)))
 
         class TestFloor(object):
@@ -429,12 +429,12 @@
         self.assertRaises(ValueError, math.fmod, INF, 1.)
         self.assertRaises(ValueError, math.fmod, NINF, 1.)
         self.assertRaises(ValueError, math.fmod, INF, 0.)
-        self.assertEquals(math.fmod(3.0, INF), 3.0)
-        self.assertEquals(math.fmod(-3.0, INF), -3.0)
-        self.assertEquals(math.fmod(3.0, NINF), 3.0)
-        self.assertEquals(math.fmod(-3.0, NINF), -3.0)
-        self.assertEquals(math.fmod(0.0, 3.0), 0.0)
-        self.assertEquals(math.fmod(0.0, NINF), 0.0)
+        self.assertEqual(math.fmod(3.0, INF), 3.0)
+        self.assertEqual(math.fmod(-3.0, INF), -3.0)
+        self.assertEqual(math.fmod(3.0, NINF), 3.0)
+        self.assertEqual(math.fmod(-3.0, NINF), -3.0)
+        self.assertEqual(math.fmod(0.0, 3.0), 0.0)
+        self.assertEqual(math.fmod(0.0, NINF), 0.0)
 
     def testFrexp(self):
         self.assertRaises(TypeError, math.frexp)
@@ -450,8 +450,8 @@
         testfrexp('frexp(1)', math.frexp(1), (0.5, 1))
         testfrexp('frexp(2)', math.frexp(2), (0.5, 2))
 
-        self.assertEquals(math.frexp(INF)[0], INF)
-        self.assertEquals(math.frexp(NINF)[0], NINF)
+        self.assertEqual(math.frexp(INF)[0], INF)
+        self.assertEqual(math.frexp(NINF)[0], NINF)
         self.assertTrue(math.isnan(math.frexp(NAN)[0]))
 
     @requires_IEEE_754
@@ -564,28 +564,28 @@
         self.ftest('ldexp(-1,1)', math.ldexp(-1,1), -2)
         self.assertRaises(OverflowError, math.ldexp, 1., 1000000)
         self.assertRaises(OverflowError, math.ldexp, -1., 1000000)
-        self.assertEquals(math.ldexp(1., -1000000), 0.)
-        self.assertEquals(math.ldexp(-1., -1000000), -0.)
-        self.assertEquals(math.ldexp(INF, 30), INF)
-        self.assertEquals(math.ldexp(NINF, -213), NINF)
+        self.assertEqual(math.ldexp(1., -1000000), 0.)
+        self.assertEqual(math.ldexp(-1., -1000000), -0.)
+        self.assertEqual(math.ldexp(INF, 30), INF)
+        self.assertEqual(math.ldexp(NINF, -213), NINF)
         self.assertTrue(math.isnan(math.ldexp(NAN, 0)))
 
         # large second argument
         for n in [10**5, 10L**5, 10**10, 10L**10, 10**20, 10**40]:
-            self.assertEquals(math.ldexp(INF, -n), INF)
-            self.assertEquals(math.ldexp(NINF, -n), NINF)
-            self.assertEquals(math.ldexp(1., -n), 0.)
-            self.assertEquals(math.ldexp(-1., -n), -0.)
-            self.assertEquals(math.ldexp(0., -n), 0.)
-            self.assertEquals(math.ldexp(-0., -n), -0.)
+            self.assertEqual(math.ldexp(INF, -n), INF)
+            self.assertEqual(math.ldexp(NINF, -n), NINF)
+            self.assertEqual(math.ldexp(1., -n), 0.)
+            self.assertEqual(math.ldexp(-1., -n), -0.)
+            self.assertEqual(math.ldexp(0., -n), 0.)
+            self.assertEqual(math.ldexp(-0., -n), -0.)
             self.assertTrue(math.isnan(math.ldexp(NAN, -n)))
 
             self.assertRaises(OverflowError, math.ldexp, 1., n)
             self.assertRaises(OverflowError, math.ldexp, -1., n)
-            self.assertEquals(math.ldexp(0., n), 0.)
-            self.assertEquals(math.ldexp(-0., n), -0.)
-            self.assertEquals(math.ldexp(INF, n), INF)
-            self.assertEquals(math.ldexp(NINF, n), NINF)
+            self.assertEqual(math.ldexp(0., n), 0.)
+            self.assertEqual(math.ldexp(-0., n), -0.)
+            self.assertEqual(math.ldexp(INF, n), INF)
+            self.assertEqual(math.ldexp(NINF, n), NINF)
             self.assertTrue(math.isnan(math.ldexp(NAN, n)))
 
     def testLog(self):
@@ -596,7 +596,7 @@
         self.ftest('log(32,2)', math.log(32,2), 5)
         self.ftest('log(10**40, 10)', math.log(10**40, 10), 40)
         self.ftest('log(10**40, 10**20)', math.log(10**40, 10**20), 2)
-        self.assertEquals(math.log(INF), INF)
+        self.assertEqual(math.log(INF), INF)
         self.assertRaises(ValueError, math.log, NINF)
         self.assertTrue(math.isnan(math.log(NAN)))
 
@@ -606,19 +606,19 @@
         self.ftest('log1p(0)', math.log1p(0), 0)
         self.ftest('log1p(e-1)', math.log1p(math.e-1), 1)
         self.ftest('log1p(1)', math.log1p(1), math.log(2))
-        self.assertEquals(math.log1p(INF), INF)
+        self.assertEqual(math.log1p(INF), INF)
         self.assertRaises(ValueError, math.log1p, NINF)
         self.assertTrue(math.isnan(math.log1p(NAN)))
         n= 2**90
-        self.assertAlmostEquals(math.log1p(n), 62.383246250395075)
-        self.assertAlmostEquals(math.log1p(n), math.log1p(float(n)))
+        self.assertAlmostEqual(math.log1p(n), 62.383246250395075)
+        self.assertAlmostEqual(math.log1p(n), math.log1p(float(n)))
 
     def testLog10(self):
         self.assertRaises(TypeError, math.log10)
         self.ftest('log10(0.1)', math.log10(0.1), -1)
         self.ftest('log10(1)', math.log10(1), 0)
         self.ftest('log10(10)', math.log10(10), 1)
-        self.assertEquals(math.log(INF), INF)
+        self.assertEqual(math.log(INF), INF)
         self.assertRaises(ValueError, math.log10, NINF)
         self.assertTrue(math.isnan(math.log10(NAN)))
 
@@ -634,8 +634,8 @@
         testmodf('modf(1.5)', math.modf(1.5), (0.5, 1.0))
         testmodf('modf(-1.5)', math.modf(-1.5), (-0.5, -1.0))
 
-        self.assertEquals(math.modf(INF), (0.0, INF))
-        self.assertEquals(math.modf(NINF), (-0.0, NINF))
+        self.assertEqual(math.modf(INF), (0.0, INF))
+        self.assertEqual(math.modf(NINF), (-0.0, NINF))
 
         modf_nan = math.modf(NAN)
         self.assertTrue(math.isnan(modf_nan[0]))
@@ -814,8 +814,8 @@
         self.ftest('sinh(0)', math.sinh(0), 0)
         self.ftest('sinh(1)**2-cosh(1)**2', math.sinh(1)**2-math.cosh(1)**2, -1)
         self.ftest('sinh(1)+sinh(-1)', math.sinh(1)+math.sinh(-1), 0)
-        self.assertEquals(math.sinh(INF), INF)
-        self.assertEquals(math.sinh(NINF), NINF)
+        self.assertEqual(math.sinh(INF), INF)
+        self.assertEqual(math.sinh(NINF), NINF)
         self.assertTrue(math.isnan(math.sinh(NAN)))
 
     def testSqrt(self):
@@ -823,7 +823,7 @@
         self.ftest('sqrt(0)', math.sqrt(0), 0)
         self.ftest('sqrt(1)', math.sqrt(1), 1)
         self.ftest('sqrt(4)', math.sqrt(4), 2)
-        self.assertEquals(math.sqrt(INF), INF)
+        self.assertEqual(math.sqrt(INF), INF)
         self.assertRaises(ValueError, math.sqrt, NINF)
         self.assertTrue(math.isnan(math.sqrt(NAN)))
 

diff --git a/lib-python/2.7.0/test/test_complex.py b/lib-python/2.7.0/test/test_complex.py
--- a/lib-python/2.7.0/test/test_complex.py
+++ b/lib-python/2.7.0/test/test_complex.py
@@ -501,8 +501,8 @@
         def test_plus_minus_0j(self):
             # test that -0j and 0j literals are not identified
             z1, z2 = 0j, -0j
-            self.assertEquals(atan2(z1.imag, -1.), atan2(0., -1.))
-            self.assertEquals(atan2(z2.imag, -1.), atan2(-0., -1.))
+            self.assertEqual(atan2(z1.imag, -1.), atan2(0., -1.))
+            self.assertEqual(atan2(z2.imag, -1.), atan2(-0., -1.))
 
     @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"),
                          "test requires IEEE 754 doubles")

diff --git a/lib-python/2.7.0/test/test_getargs2.py b/lib-python/2.7.0/test/test_getargs2.py
--- a/lib-python/2.7.0/test/test_getargs2.py
+++ b/lib-python/2.7.0/test/test_getargs2.py
@@ -262,7 +262,7 @@
         from _testcapi import getargs_tuple
 
         ret = getargs_tuple(1, (2, 3))
-        self.assertEquals(ret, (1,2,3))
+        self.assertEqual(ret, (1,2,3))
 
         # make sure invalid tuple arguments are handled correctly
         class seq:
@@ -275,25 +275,25 @@
 class Keywords_TestCase(unittest.TestCase):
     def test_positional_args(self):
         # using all positional args
-        self.assertEquals(
+        self.assertEqual(
             getargs_keywords((1,2), 3, (4,(5,6)), (7,8,9), 10),
             (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
             )
     def test_mixed_args(self):
         # positional and keyword args
-        self.assertEquals(
+        self.assertEqual(
             getargs_keywords((1,2), 3, (4,(5,6)), arg4=(7,8,9), arg5=10),
             (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
             )
     def test_keyword_args(self):
         # all keywords
-        self.assertEquals(
+        self.assertEqual(
             getargs_keywords(arg1=(1,2), arg2=3, arg3=(4,(5,6)), arg4=(7,8,9), arg5=10),
             (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
             )
     def test_optional_args(self):
         # missing optional keyword args, skipping tuples
-        self.assertEquals(
+        self.assertEqual(
             getargs_keywords(arg1=(1,2), arg2=3, arg5=10),
             (1, 2, 3, -1, -1, -1, -1, -1, -1, 10)
             )
@@ -302,14 +302,14 @@
         try:
             getargs_keywords(arg1=(1,2))
         except TypeError, err:
-            self.assertEquals(str(err), "Required argument 'arg2' (pos 2) not found")
+            self.assertEqual(str(err), "Required argument 'arg2' (pos 2) not found")
         else:
             self.fail('TypeError should have been raised')
     def test_too_many_args(self):
         try:
             getargs_keywords((1,2),3,(4,(5,6)),(7,8,9),10,111)
         except TypeError, err:
-            self.assertEquals(str(err), "function takes at most 5 arguments (6 given)")
+            self.assertEqual(str(err), "function takes at most 5 arguments (6 given)")
         else:
             self.fail('TypeError should have been raised')
     def test_invalid_keyword(self):
@@ -317,7 +317,7 @@
         try:
             getargs_keywords((1,2),3,arg5=10,arg666=666)
         except TypeError, err:
-            self.assertEquals(str(err), "'arg666' is an invalid keyword argument for this function")
+            self.assertEqual(str(err), "'arg666' is an invalid keyword argument for this function")
         else:
             self.fail('TypeError should have been raised')
 

diff --git a/lib-python/2.7.0/test/test_fpformat.py b/lib-python/2.7.0/test/test_fpformat.py
--- a/lib-python/2.7.0/test/test_fpformat.py
+++ b/lib-python/2.7.0/test/test_fpformat.py
@@ -26,7 +26,7 @@
             n = repr(n)
         expected = "%.*f" % (digits, float(n))
 
-        self.assertEquals(result, expected)
+        self.assertEqual(result, expected)
 
     def checkSci(self, n, digits):
         result = sci(n, digits)
@@ -39,11 +39,11 @@
             exp = exp[0] + "0" + exp[1:]
         expected = "%se%s" % (num, exp)
 
-        self.assertEquals(result, expected)
+        self.assertEqual(result, expected)
 
     def test_basic_cases(self):
-        self.assertEquals(fix(100.0/3, 3), '33.333')
-        self.assertEquals(sci(100.0/3, 3), '3.333e+001')
+        self.assertEqual(fix(100.0/3, 3), '33.333')
+        self.assertEqual(sci(100.0/3, 3), '3.333e+001')
 
     def test_reasonable_values(self):
         for d in range(7):
@@ -54,12 +54,12 @@
 
     def test_failing_values(self):
         # Now for 'unreasonable n and d'
-        self.assertEquals(fix(1.0, 1000), '1.'+('0'*1000))
-        self.assertEquals(sci("1"+('0'*1000), 0), '1e+1000')
+        self.assertEqual(fix(1.0, 1000), '1.'+('0'*1000))
+        self.assertEqual(sci("1"+('0'*1000), 0), '1e+1000')
 
         # This behavior is inconsistent.  sci raises an exception; fix doesn't.
         yacht = "Throatwobbler Mangrove"
-        self.assertEquals(fix(yacht, 10), yacht)
+        self.assertEqual(fix(yacht, 10), yacht)
         try:
             sci(yacht, 10)
         except NotANumber:

diff --git a/lib-python/2.7.0/test/test_urllib2.py b/lib-python/2.7.0/test/test_urllib2.py
--- a/lib-python/2.7.0/test/test_urllib2.py
+++ b/lib-python/2.7.0/test/test_urllib2.py
@@ -45,7 +45,7 @@
                  ('a, b, "c", "d", "e,f", g, h', ['a', 'b', '"c"', '"d"', '"e,f"', 'g', 'h']),
                  ('a="b\\"c", d="e\\,f", g="h\\\\i"', ['a="b"c"', 'd="e,f"', 'g="h\\i"'])]
         for string, list in tests:
-            self.assertEquals(urllib2.parse_http_list(string), list)
+            self.assertEqual(urllib2.parse_http_list(string), list)
 
 
 def test_request_headers_dict():
@@ -622,22 +622,32 @@
         h = NullFTPHandler(data)
         o = h.parent = MockOpener()
 
-        for url, host, port, type_, dirs, filename, mimetype in [
+        for url, host, port, user, passwd, type_, dirs, filename, mimetype in [
             ("ftp://localhost/foo/bar/baz.html",
-             "localhost", ftplib.FTP_PORT, "I",
+             "localhost", ftplib.FTP_PORT, "", "", "I",
+             ["foo", "bar"], "baz.html", "text/html"),
+            ("ftp://parrot@localhost/foo/bar/baz.html",
+             "localhost", ftplib.FTP_PORT, "parrot", "", "I",
+             ["foo", "bar"], "baz.html", "text/html"),
+            ("ftp://%25parrot@localhost/foo/bar/baz.html",
+             "localhost", ftplib.FTP_PORT, "%parrot", "", "I",
+             ["foo", "bar"], "baz.html", "text/html"),
+            ("ftp://%2542parrot@localhost/foo/bar/baz.html",
+             "localhost", ftplib.FTP_PORT, "%42parrot", "", "I",
              ["foo", "bar"], "baz.html", "text/html"),
             ("ftp://localhost:80/foo/bar/",
-             "localhost", 80, "D",
+             "localhost", 80, "", "", "D",
              ["foo", "bar"], "", None),
             ("ftp://localhost/baz.gif;type=a",
-             "localhost", ftplib.FTP_PORT, "A",
+             "localhost", ftplib.FTP_PORT, "", "", "A",
              [], "baz.gif", None),  # XXX really this should guess image/gif
             ]:
             req = Request(url)
             req.timeout = None
             r = h.ftp_open(req)
             # ftp authentication not yet implemented by FTPHandler
-            self.assertTrue(h.user == h.passwd == "")
+            self.assertEqual(h.user, user)
+            self.assertEqual(h.passwd, passwd)
             self.assertEqual(h.host, socket.gethostbyname(host))
             self.assertEqual(h.port, port)
             self.assertEqual(h.dirs, dirs)
@@ -828,6 +838,25 @@
             p_ds_req = h.do_request_(ds_req)
             self.assertEqual(p_ds_req.unredirected_hdrs["Host"],"example.com")
 
+    def test_fixpath_in_weirdurls(self):
+        # Issue4493: urllib2 to supply '/' when to urls where path does not
+        # start with'/'
+
+        h = urllib2.AbstractHTTPHandler()
+        o = h.parent = MockOpener()
+
+        weird_url = 'http://www.python.org?getspam'
+        req = Request(weird_url)
+        newreq = h.do_request_(req)
+        self.assertEqual(newreq.get_host(),'www.python.org')
+        self.assertEqual(newreq.get_selector(),'/?getspam')
+
+        url_without_path = 'http://www.python.org'
+        req = Request(url_without_path)
+        newreq = h.do_request_(req)
+        self.assertEqual(newreq.get_host(),'www.python.org')
+        self.assertEqual(newreq.get_selector(),'')
+
     def test_errors(self):
         h = urllib2.HTTPErrorProcessor()
         o = h.parent = MockOpener()
@@ -862,7 +891,7 @@
         r = MockResponse(200, "OK", {}, "")
         newreq = h.http_request(req)
         self.assertTrue(cj.ach_req is req is newreq)
-        self.assertEquals(req.get_origin_req_host(), "example.com")
+        self.assertEqual(req.get_origin_req_host(), "example.com")
         self.assertTrue(not req.is_unverifiable())
         newr = h.http_response(req, r)
         self.assertTrue(cj.ec_req is req)

diff --git a/lib-python/2.7.0/test/test_os.py b/lib-python/2.7.0/test/test_os.py
--- a/lib-python/2.7.0/test/test_os.py
+++ b/lib-python/2.7.0/test/test_os.py
@@ -187,8 +187,8 @@
         result = os.stat(self.fname)
 
         # Make sure direct access works
-        self.assertEquals(result[stat.ST_SIZE], 3)
-        self.assertEquals(result.st_size, 3)
+        self.assertEqual(result[stat.ST_SIZE], 3)
+        self.assertEqual(result.st_size, 3)
 
         # Make sure all the attributes are there
         members = dir(result)
@@ -199,8 +199,8 @@
                     def trunc(x): return int(x)
                 else:
                     def trunc(x): return x
-                self.assertEquals(trunc(getattr(result, attr)),
-                                  result[getattr(stat, name)])
+                self.assertEqual(trunc(getattr(result, attr)),
+                                 result[getattr(stat, name)])
                 self.assertIn(attr, members)
 
         try:
@@ -254,13 +254,13 @@
                 return
 
         # Make sure direct access works
-        self.assertEquals(result.f_bfree, result[3])
+        self.assertEqual(result.f_bfree, result[3])
 
         # Make sure all the attributes are there.
         members = ('bsize', 'frsize', 'blocks', 'bfree', 'bavail', 'files',
                     'ffree', 'favail', 'flag', 'namemax')
         for value, member in enumerate(members):
-            self.assertEquals(getattr(result, 'f_' + member), result[value])
+            self.assertEqual(getattr(result, 'f_' + member), result[value])
 
         # Make sure that assignment really fails
         try:
@@ -295,7 +295,7 @@
         # time stamps in stat, but not in utime.
         os.utime(test_support.TESTFN, (st.st_atime, int(st.st_mtime-delta)))
         st2 = os.stat(test_support.TESTFN)
-        self.assertEquals(st2.st_mtime, int(st.st_mtime-delta))
+        self.assertEqual(st2.st_mtime, int(st.st_mtime-delta))
 
     # Restrict test to Win32, since there is no guarantee other
     # systems support centiseconds
@@ -312,7 +312,7 @@
             def test_1565150(self):
                 t1 = 1159195039.25
                 os.utime(self.fname, (t1, t1))
-                self.assertEquals(os.stat(self.fname).st_mtime, t1)
+                self.assertEqual(os.stat(self.fname).st_mtime, t1)
 
         def test_1686475(self):
             # Verify that an open file can be stat'ed
@@ -346,7 +346,7 @@
             os.environ.update(HELLO="World")
             with os.popen("/bin/sh -c 'echo $HELLO'") as popen:
                 value = popen.read().strip()
-                self.assertEquals(value, "World")
+                self.assertEqual(value, "World")
 
 class WalkTests(unittest.TestCase):
     """Tests for os.walk()."""

diff --git a/lib-python/2.7.0/json/tests/test_default.py b/lib-python/2.7.0/json/tests/test_default.py
--- a/lib-python/2.7.0/json/tests/test_default.py
+++ b/lib-python/2.7.0/json/tests/test_default.py
@@ -4,6 +4,6 @@
 
 class TestDefault(TestCase):
     def test_default(self):
-        self.assertEquals(
+        self.assertEqual(
             json.dumps(type, default=repr),
             json.dumps(repr(type)))

diff --git a/lib-python/2.7.0/json/tests/test_pass3.py b/lib-python/2.7.0/json/tests/test_pass3.py
--- a/lib-python/2.7.0/json/tests/test_pass3.py
+++ b/lib-python/2.7.0/json/tests/test_pass3.py
@@ -17,4 +17,4 @@
         # test in/out equivalence and parsing
         res = json.loads(JSON)
         out = json.dumps(res)
-        self.assertEquals(res, json.loads(out))
+        self.assertEqual(res, json.loads(out))

diff --git a/lib-python/2.7.0/curses/panel.py b/lib-python/2.7.0/curses/panel.py
--- a/lib-python/2.7.0/curses/panel.py
+++ b/lib-python/2.7.0/curses/panel.py
@@ -3,6 +3,6 @@
 Module for using panels with curses.
 """
 
-__revision__ = "$Id: panel.py 36560 2004-07-18 06:16:08Z tim_one $"
+__revision__ = "$Id$"
 
 from _curses_panel import *

diff --git a/lib-python/2.7.0/test/test_copy_reg.py b/lib-python/2.7.0/test/test_copy_reg.py
--- a/lib-python/2.7.0/test/test_copy_reg.py
+++ b/lib-python/2.7.0/test/test_copy_reg.py
@@ -40,7 +40,7 @@
 
     def test_bool(self):
         import copy
-        self.assertEquals(True, copy.copy(True))
+        self.assertEqual(True, copy.copy(True))
 
     def test_extension_registry(self):
         mod, func, code = 'junk1 ', ' junk2', 0xabcd
@@ -101,16 +101,16 @@
                               mod, func, code)
 
     def test_slotnames(self):
-        self.assertEquals(copy_reg._slotnames(WithoutSlots), [])
-        self.assertEquals(copy_reg._slotnames(WithWeakref), [])
+        self.assertEqual(copy_reg._slotnames(WithoutSlots), [])
+        self.assertEqual(copy_reg._slotnames(WithWeakref), [])
         expected = ['_WithPrivate__spam']
-        self.assertEquals(copy_reg._slotnames(WithPrivate), expected)
-        self.assertEquals(copy_reg._slotnames(WithSingleString), ['spam'])
+        self.assertEqual(copy_reg._slotnames(WithPrivate), expected)
+        self.assertEqual(copy_reg._slotnames(WithSingleString), ['spam'])
         expected = ['eggs', 'spam']
         expected.sort()
         result = copy_reg._slotnames(WithInherited)
         result.sort()
-        self.assertEquals(result, expected)
+        self.assertEqual(result, expected)
 
 
 def test_main():

diff --git a/lib-python/2.7.0/test/test_site.py b/lib-python/2.7.0/test/test_site.py
--- a/lib-python/2.7.0/test/test_site.py
+++ b/lib-python/2.7.0/test/test_site.py
@@ -139,7 +139,7 @@
         user_base = site.getuserbase()
 
         # the call sets site.USER_BASE
-        self.assertEquals(site.USER_BASE, user_base)
+        self.assertEqual(site.USER_BASE, user_base)
 
         # let's set PYTHONUSERBASE and see if it uses it
         site.USER_BASE = None
@@ -157,7 +157,7 @@
         user_site = site.getusersitepackages()
 
         # the call sets USER_BASE *and* USER_SITE
-        self.assertEquals(site.USER_SITE, user_site)
+        self.assertEqual(site.USER_SITE, user_site)
         self.assertTrue(user_site.startswith(site.USER_BASE), user_site)
 
     def test_getsitepackages(self):
@@ -167,19 +167,19 @@
         if sys.platform in ('os2emx', 'riscos'):
             self.assertEqual(len(dirs), 1)
             wanted = os.path.join('xoxo', 'Lib', 'site-packages')
-            self.assertEquals(dirs[0], wanted)
+            self.assertEqual(dirs[0], wanted)
         elif os.sep == '/':
             self.assertEqual(len(dirs), 2)
             wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
                                   'site-packages')
-            self.assertEquals(dirs[0], wanted)
+            self.assertEqual(dirs[0], wanted)
             wanted = os.path.join('xoxo', 'lib', 'site-python')
-            self.assertEquals(dirs[1], wanted)
+            self.assertEqual(dirs[1], wanted)
         else:
             self.assertEqual(len(dirs), 2)
-            self.assertEquals(dirs[0], 'xoxo')
+            self.assertEqual(dirs[0], 'xoxo')
             wanted = os.path.join('xoxo', 'lib', 'site-packages')
-            self.assertEquals(dirs[1], wanted)
+            self.assertEqual(dirs[1], wanted)
 
         # let's try the specific Apple location
         if (sys.platform == "darwin" and
@@ -189,10 +189,10 @@
             self.assertEqual(len(dirs), 4)
             wanted = os.path.join('~', 'Library', 'Python',
                                   sys.version[:3], 'site-packages')
-            self.assertEquals(dirs[2], os.path.expanduser(wanted))
+            self.assertEqual(dirs[2], os.path.expanduser(wanted))
             wanted = os.path.join('/Library', 'Python', sys.version[:3],
                                   'site-packages')
-            self.assertEquals(dirs[3], wanted)
+            self.assertEqual(dirs[3], wanted)
 
 class PthFile(object):
     """Helper class for handling testing of .pth files"""

diff --git a/lib-python/2.7.0/distutils/dep_util.py b/lib-python/2.7.0/distutils/dep_util.py
--- a/lib-python/2.7.0/distutils/dep_util.py
+++ b/lib-python/2.7.0/distutils/dep_util.py
@@ -4,7 +4,7 @@
 and groups of files; also, function based entirely on such
 timestamp dependency analysis."""
 
-__revision__ = "$Id: dep_util.py 76746 2009-12-10 15:29:03Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import os
 from distutils.errors import DistutilsFileError

diff --git a/lib-python/2.7.0/test/test_memoryio.py b/lib-python/2.7.0/test/test_memoryio.py
--- a/lib-python/2.7.0/test/test_memoryio.py
+++ b/lib-python/2.7.0/test/test_memoryio.py
@@ -23,17 +23,17 @@
         buf = self.buftype("1234567890")
         bytesIo = self.ioclass(buf)
 
-        self.assertEquals(buf[:1], bytesIo.read(1))
-        self.assertEquals(buf[1:5], bytesIo.read(4))
-        self.assertEquals(buf[5:], bytesIo.read(900))
-        self.assertEquals(self.EOF, bytesIo.read())
+        self.assertEqual(buf[:1], bytesIo.read(1))
+        self.assertEqual(buf[1:5], bytesIo.read(4))
+        self.assertEqual(buf[5:], bytesIo.read(900))
+        self.assertEqual(self.EOF, bytesIo.read())
 
     def testReadNoArgs(self):
         buf = self.buftype("1234567890")
         bytesIo = self.ioclass(buf)
 
-        self.assertEquals(buf, bytesIo.read())
-        self.assertEquals(self.EOF, bytesIo.read())
+        self.assertEqual(buf, bytesIo.read())
+        self.assertEqual(self.EOF, bytesIo.read())
 
     def testSeek(self):
         buf = self.buftype("1234567890")
@@ -41,21 +41,21 @@
 
         bytesIo.read(5)
         bytesIo.seek(0)
-        self.assertEquals(buf, bytesIo.read())
+        self.assertEqual(buf, bytesIo.read())
 
         bytesIo.seek(3)
-        self.assertEquals(buf[3:], bytesIo.read())
+        self.assertEqual(buf[3:], bytesIo.read())
         self.assertRaises(TypeError, bytesIo.seek, 0.0)
 
     def testTell(self):
         buf = self.buftype("1234567890")
         bytesIo = self.ioclass(buf)
 
-        self.assertEquals(0, bytesIo.tell())
+        self.assertEqual(0, bytesIo.tell())
         bytesIo.seek(5)
-        self.assertEquals(5, bytesIo.tell())
+        self.assertEqual(5, bytesIo.tell())
         bytesIo.seek(10000)
-        self.assertEquals(10000, bytesIo.tell())
+        self.assertEqual(10000, bytesIo.tell())
 
 
 class MemoryTestMixin:
@@ -438,6 +438,11 @@
         self.assertEqual(a.tostring(), b"1234567890d")
         memio.close()
         self.assertRaises(ValueError, memio.readinto, b)
+        memio = self.ioclass(b"123")
+        b = bytearray()
+        memio.seek(42)
+        memio.readinto(b)
+        self.assertEqual(b, b"")
 
     def test_relative_seek(self):
         buf = self.buftype("1234567890")
@@ -613,7 +618,7 @@
         self.assertEqual(len(state), 3)
         bytearray(state[0]) # Check if state[0] supports the buffer interface.
         self.assertIsInstance(state[1], int)
-        self.assert_(isinstance(state[2], dict) or state[2] is None)
+        self.assertTrue(isinstance(state[2], dict) or state[2] is None)
         memio.close()
         self.assertRaises(ValueError, memio.__getstate__)
 
@@ -659,7 +664,7 @@
         self.assertIsInstance(state[0], unicode)
         self.assertIsInstance(state[1], str)
         self.assertIsInstance(state[2], int)
-        self.assert_(isinstance(state[3], dict) or state[3] is None)
+        self.assertTrue(isinstance(state[3], dict) or state[3] is None)
         memio.close()
         self.assertRaises(ValueError, memio.__getstate__)
 

diff --git a/lib-python/2.7.0/distutils/tests/test_register.py b/lib-python/2.7.0/distutils/tests/test_register.py
--- a/lib-python/2.7.0/distutils/tests/test_register.py
+++ b/lib-python/2.7.0/distutils/tests/test_register.py
@@ -119,8 +119,12 @@
         self.assertTrue(os.path.exists(self.rc))
 
         # with the content similar to WANTED_PYPIRC
-        content = open(self.rc).read()
-        self.assertEquals(content, WANTED_PYPIRC)
+        f = open(self.rc)
+        try:
+            content = f.read()
+            self.assertEqual(content, WANTED_PYPIRC)
+        finally:
+            f.close()
 
         # now let's make sure the .pypirc file generated
         # really works : we shouldn't be asked anything
@@ -137,7 +141,7 @@
         self.assertTrue(self.conn.reqs, 2)
         req1 = dict(self.conn.reqs[0].headers)
         req2 = dict(self.conn.reqs[1].headers)
-        self.assertEquals(req2['Content-length'], req1['Content-length'])
+        self.assertEqual(req2['Content-length'], req1['Content-length'])
         self.assertTrue('xxx' in self.conn.reqs[1].data)
 
     def test_password_not_in_file(self):
@@ -150,7 +154,7 @@
 
         # dist.password should be set
         # therefore used afterwards by other commands
-        self.assertEquals(cmd.distribution.password, 'password')
+        self.assertEqual(cmd.distribution.password, 'password')
 
     def test_registering(self):
         # this test runs choice 2
@@ -167,7 +171,7 @@
         self.assertTrue(self.conn.reqs, 1)
         req = self.conn.reqs[0]
         headers = dict(req.headers)
-        self.assertEquals(headers['Content-length'], '608')
+        self.assertEqual(headers['Content-length'], '608')
         self.assertTrue('tarek' in req.data)
 
     def test_password_reset(self):
@@ -185,7 +189,7 @@
         self.assertTrue(self.conn.reqs, 1)
         req = self.conn.reqs[0]
         headers = dict(req.headers)
-        self.assertEquals(headers['Content-length'], '290')
+        self.assertEqual(headers['Content-length'], '290')
         self.assertTrue('tarek' in req.data)
 
     def test_strict(self):
@@ -248,7 +252,7 @@
         with check_warnings() as w:
             warnings.simplefilter("always")
             cmd.check_metadata()
-            self.assertEquals(len(w.warnings), 1)
+            self.assertEqual(len(w.warnings), 1)
 
 def test_suite():
     return unittest.makeSuite(RegisterTestCase)

diff --git a/lib-python/2.7.0/test/test_operator.py b/lib-python/2.7.0/test/test_operator.py
--- a/lib-python/2.7.0/test/test_operator.py
+++ b/lib-python/2.7.0/test/test_operator.py
@@ -455,12 +455,12 @@
         f = operator.methodcaller('foo')
         self.assertRaises(IndexError, f, a)
         f = operator.methodcaller('foo', 1, 2)
-        self.assertEquals(f(a), 3)
+        self.assertEqual(f(a), 3)
         f = operator.methodcaller('bar')
-        self.assertEquals(f(a), 42)
+        self.assertEqual(f(a), 42)
         self.assertRaises(TypeError, f, a, a)
         f = operator.methodcaller('bar', f=5)
-        self.assertEquals(f(a), 5)
+        self.assertEqual(f(a), 5)
 
     def test_inplace(self):
         class C(object):

diff --git a/lib-python/2.7.0/distutils/README b/lib-python/2.7.0/distutils/README
--- a/lib-python/2.7.0/distutils/README
+++ b/lib-python/2.7.0/distutils/README
@@ -10,4 +10,4 @@
 
 WARNING : Distutils must remain compatible with 2.3
 
-$Id: README 70017 2009-02-27 12:53:34Z tarek.ziade $
+$Id$

diff --git a/lib-python/2.7.0/pstats.py b/lib-python/2.7.0/pstats.py
--- a/lib-python/2.7.0/pstats.py
+++ b/lib-python/2.7.0/pstats.py
@@ -359,7 +359,7 @@
         print >> self.stream, indent, self.total_calls, "function calls",
         if self.total_calls != self.prim_calls:
             print >> self.stream, "(%d primitive calls)" % self.prim_calls,
-        print >> self.stream, "in %.3f CPU seconds" % self.total_tt
+        print >> self.stream, "in %.3f seconds" % self.total_tt
         print >> self.stream
         width, list = self.get_print_list(amount)
         if list:

diff --git a/lib-python/2.7.0/test/test_cfgparser.py b/lib-python/2.7.0/test/test_cfgparser.py
--- a/lib-python/2.7.0/test/test_cfgparser.py
+++ b/lib-python/2.7.0/test/test_cfgparser.py
@@ -572,14 +572,14 @@
                         "k=v\n")
         output = StringIO.StringIO()
         self.cf.write(output)
-        self.assertEquals(output.getvalue(),
-                          "[a]\n"
-                          "k = v\n\n"
-                          "[b]\n"
-                          "o1 = 4\n"
-                          "o2 = 3\n"
-                          "o3 = 2\n"
-                          "o4 = 1\n\n")
+        self.assertEqual(output.getvalue(),
+                         "[a]\n"
+                         "k = v\n\n"
+                         "[b]\n"
+                         "o1 = 4\n"
+                         "o2 = 3\n"
+                         "o3 = 2\n"
+                         "o4 = 1\n\n")
 
 
 def test_main():

diff --git a/lib-python/2.7.0/distutils/tests/test_version.py b/lib-python/2.7.0/distutils/tests/test_version.py
--- a/lib-python/2.7.0/distutils/tests/test_version.py
+++ b/lib-python/2.7.0/distutils/tests/test_version.py
@@ -7,12 +7,12 @@
 
     def test_prerelease(self):
         version = StrictVersion('1.2.3a1')
-        self.assertEquals(version.version, (1, 2, 3))
-        self.assertEquals(version.prerelease, ('a', 1))
-        self.assertEquals(str(version), '1.2.3a1')
+        self.assertEqual(version.version, (1, 2, 3))
+        self.assertEqual(version.prerelease, ('a', 1))
+        self.assertEqual(str(version), '1.2.3a1')
 
         version = StrictVersion('1.2.0')
-        self.assertEquals(str(version), '1.2')
+        self.assertEqual(str(version), '1.2')
 
     def test_cmp_strict(self):
         versions = (('1.5.1', '1.5.2b2', -1),
@@ -41,9 +41,9 @@
                     raise AssertionError(("cmp(%s, %s) "
                                           "shouldn't raise ValueError")
                                             % (v1, v2))
-            self.assertEquals(res, wanted,
-                              'cmp(%s, %s) should be %s, got %s' %
-                              (v1, v2, wanted, res))
+            self.assertEqual(res, wanted,
+                             'cmp(%s, %s) should be %s, got %s' %
+                             (v1, v2, wanted, res))
 
 
     def test_cmp(self):
@@ -59,9 +59,9 @@
 
         for v1, v2, wanted in versions:
             res = LooseVersion(v1).__cmp__(LooseVersion(v2))
-            self.assertEquals(res, wanted,
-                              'cmp(%s, %s) should be %s, got %s' %
-                              (v1, v2, wanted, res))
+            self.assertEqual(res, wanted,
+                             'cmp(%s, %s) should be %s, got %s' %
+                             (v1, v2, wanted, res))
 
 def test_suite():
     return unittest.makeSuite(VersionTestCase)

diff --git a/lib-python/2.7.0/test/string_tests.py b/lib-python/2.7.0/test/string_tests.py
--- a/lib-python/2.7.0/test/string_tests.py
+++ b/lib-python/2.7.0/test/string_tests.py
@@ -62,7 +62,7 @@
                 pass
             object = subtype(object)
             realresult = getattr(object, methodname)(*args)
-            self.assert_(object is not realresult)
+            self.assertTrue(object is not realresult)
 
     # check that object.method(*args) raises exc
     def checkraises(self, exc, object, methodname, *args):
@@ -1243,34 +1243,34 @@
             pass
         s1 = subclass("abcd")
         s2 = t().join([s1])
-        self.assert_(s1 is not s2)
-        self.assert_(type(s2) is t)
+        self.assertTrue(s1 is not s2)
+        self.assertTrue(type(s2) is t)
 
         s1 = t("abcd")
         s2 = t().join([s1])
-        self.assert_(s1 is s2)
+        self.assertTrue(s1 is s2)
 
         # Should also test mixed-type join.
         if t is unicode:
             s1 = subclass("abcd")
             s2 = "".join([s1])
-            self.assert_(s1 is not s2)
-            self.assert_(type(s2) is t)
+            self.assertTrue(s1 is not s2)
+            self.assertTrue(type(s2) is t)
 
             s1 = t("abcd")
             s2 = "".join([s1])
-            self.assert_(s1 is s2)
+            self.assertTrue(s1 is s2)
 
         elif t is str:
             s1 = subclass("abcd")
             s2 = u"".join([s1])
-            self.assert_(s1 is not s2)
-            self.assert_(type(s2) is unicode) # promotes!
+            self.assertTrue(s1 is not s2)
+            self.assertTrue(type(s2) is unicode) # promotes!
 
             s1 = t("abcd")
             s2 = u"".join([s1])
-            self.assert_(s1 is not s2)
-            self.assert_(type(s2) is unicode) # promotes!
+            self.assertTrue(s1 is not s2)
+            self.assertTrue(type(s2) is unicode) # promotes!
 
         else:
             self.fail("unexpected type for MixinStrUnicodeTest %r" % t)

diff --git a/lib-python/2.7.0/test/test_platform.py b/lib-python/2.7.0/test/test_platform.py
--- a/lib-python/2.7.0/test/test_platform.py
+++ b/lib-python/2.7.0/test/test_platform.py
@@ -183,17 +183,17 @@
             # On Snow Leopard, sw_vers reports 10.6.0 as 10.6
             if len_diff > 0:
                 expect_list.extend(['0'] * len_diff)
-            self.assertEquals(result_list, expect_list)
+            self.assertEqual(result_list, expect_list)
 
             # res[1] claims to contain
             # (version, dev_stage, non_release_version)
             # That information is no longer available
-            self.assertEquals(res[1], ('', '', ''))
+            self.assertEqual(res[1], ('', '', ''))
 
             if sys.byteorder == 'little':
-                self.assertEquals(res[2], 'i386')
+                self.assertEqual(res[2], 'i386')
             else:
-                self.assertEquals(res[2], 'PowerPC')
+                self.assertEqual(res[2], 'PowerPC')
 
 
     @unittest.skipUnless(sys.platform == 'darwin', "OSX only test")
@@ -211,8 +211,8 @@
         else:
             # parent
             cpid, sts = os.waitpid(pid, 0)
-            self.assertEquals(cpid, pid)
-            self.assertEquals(sts, 0)
+            self.assertEqual(cpid, pid)
+            self.assertEqual(sts, 0)
 
     def test_dist(self):
         res = platform.dist()

diff --git a/lib-python/2.7.0/bsddb/test/test_replication.py b/lib-python/2.7.0/bsddb/test/test_replication.py
--- a/lib-python/2.7.0/bsddb/test/test_replication.py
+++ b/lib-python/2.7.0/bsddb/test/test_replication.py
@@ -88,23 +88,23 @@
 
         self.dbenvMaster.rep_set_timeout(db.DB_REP_CONNECTION_RETRY,100123)
         self.dbenvClient.rep_set_timeout(db.DB_REP_CONNECTION_RETRY,100321)
-        self.assertEquals(self.dbenvMaster.rep_get_timeout(
+        self.assertEqual(self.dbenvMaster.rep_get_timeout(
             db.DB_REP_CONNECTION_RETRY), 100123)
-        self.assertEquals(self.dbenvClient.rep_get_timeout(
+        self.assertEqual(self.dbenvClient.rep_get_timeout(
             db.DB_REP_CONNECTION_RETRY), 100321)
 
         self.dbenvMaster.rep_set_timeout(db.DB_REP_ELECTION_TIMEOUT, 100234)
         self.dbenvClient.rep_set_timeout(db.DB_REP_ELECTION_TIMEOUT, 100432)
-        self.assertEquals(self.dbenvMaster.rep_get_timeout(
+        self.assertEqual(self.dbenvMaster.rep_get_timeout(
             db.DB_REP_ELECTION_TIMEOUT), 100234)
-        self.assertEquals(self.dbenvClient.rep_get_timeout(
+        self.assertEqual(self.dbenvClient.rep_get_timeout(
             db.DB_REP_ELECTION_TIMEOUT), 100432)
 
         self.dbenvMaster.rep_set_timeout(db.DB_REP_ELECTION_RETRY, 100345)
         self.dbenvClient.rep_set_timeout(db.DB_REP_ELECTION_RETRY, 100543)
-        self.assertEquals(self.dbenvMaster.rep_get_timeout(
+        self.assertEqual(self.dbenvMaster.rep_get_timeout(
             db.DB_REP_ELECTION_RETRY), 100345)
-        self.assertEquals(self.dbenvClient.rep_get_timeout(
+        self.assertEqual(self.dbenvClient.rep_get_timeout(
             db.DB_REP_ELECTION_RETRY), 100543)
 
         self.dbenvMaster.repmgr_set_ack_policy(db.DB_REPMGR_ACKS_ALL)
@@ -113,13 +113,13 @@
         self.dbenvMaster.repmgr_start(1, db.DB_REP_MASTER);
         self.dbenvClient.repmgr_start(1, db.DB_REP_CLIENT);
 
-        self.assertEquals(self.dbenvMaster.rep_get_nsites(),2)
-        self.assertEquals(self.dbenvClient.rep_get_nsites(),2)
-        self.assertEquals(self.dbenvMaster.rep_get_priority(),10)
-        self.assertEquals(self.dbenvClient.rep_get_priority(),0)
-        self.assertEquals(self.dbenvMaster.repmgr_get_ack_policy(),
+        self.assertEqual(self.dbenvMaster.rep_get_nsites(),2)
+        self.assertEqual(self.dbenvClient.rep_get_nsites(),2)
+        self.assertEqual(self.dbenvMaster.rep_get_priority(),10)
+        self.assertEqual(self.dbenvClient.rep_get_priority(),0)
+        self.assertEqual(self.dbenvMaster.repmgr_get_ack_policy(),
                 db.DB_REPMGR_ACKS_ALL)
-        self.assertEquals(self.dbenvClient.repmgr_get_ack_policy(),
+        self.assertEqual(self.dbenvClient.repmgr_get_ack_policy(),
                 db.DB_REPMGR_ACKS_ALL)
 
         # The timeout is necessary in BDB 4.5, since DB_EVENT_REP_STARTUPDONE
@@ -143,16 +143,16 @@
             startup_timeout = True
 
         d = self.dbenvMaster.repmgr_site_list()
-        self.assertEquals(len(d), 1)
-        self.assertEquals(d[0][0], "127.0.0.1")
-        self.assertEquals(d[0][1], client_port)
+        self.assertEqual(len(d), 1)
+        self.assertEqual(d[0][0], "127.0.0.1")
+        self.assertEqual(d[0][1], client_port)
         self.assertTrue((d[0][2]==db.DB_REPMGR_CONNECTED) or \
                 (d[0][2]==db.DB_REPMGR_DISCONNECTED))
 
         d = self.dbenvClient.repmgr_site_list()
-        self.assertEquals(len(d), 1)
-        self.assertEquals(d[0][0], "127.0.0.1")
-        self.assertEquals(d[0][1], master_port)
+        self.assertEqual(len(d), 1)
+        self.assertEqual(d[0][0], "127.0.0.1")
+        self.assertEqual(d[0][1], master_port)
         self.assertTrue((d[0][2]==db.DB_REPMGR_CONNECTED) or \
                 (d[0][2]==db.DB_REPMGR_DISCONNECTED))
 
@@ -207,7 +207,7 @@
             self.skipTest("replication test skipped due to random failure, "
                 "see issue 3892")
         self.assertTrue(time.time()<timeout)
-        self.assertEquals("123", v)
+        self.assertEqual("123", v)
 
         txn=self.dbenvMaster.txn_begin()
         self.dbMaster.delete("ABC", txn=txn)
@@ -220,7 +220,7 @@
             if v is None :
                 time.sleep(0.02)
         self.assertTrue(time.time()<timeout)
-        self.assertEquals(None, v)
+        self.assertEqual(None, v)
 
 class DBBaseReplication(DBReplication) :
     def setUp(self) :
@@ -253,8 +253,8 @@
         self.dbenvClient.rep_set_transport(3,c2m)
         self.dbenvClient.rep_set_priority(0)
 
-        self.assertEquals(self.dbenvMaster.rep_get_priority(),10)
-        self.assertEquals(self.dbenvClient.rep_get_priority(),0)
+        self.assertEqual(self.dbenvMaster.rep_get_priority(),10)
+        self.assertEqual(self.dbenvClient.rep_get_priority(),0)
 
         #self.dbenvMaster.set_verbose(db.DB_VERB_REPLICATION, True)
         #self.dbenvMaster.set_verbose(db.DB_VERB_FILEOPS_ALL, True)
@@ -384,7 +384,7 @@
             if v is None :
                 time.sleep(0.02)
         self.assertTrue(time.time()<timeout)
-        self.assertEquals("123", v)
+        self.assertEqual("123", v)
 
         txn=self.dbenvMaster.txn_begin()
         self.dbMaster.delete("ABC", txn=txn)
@@ -397,7 +397,7 @@
             if v is None :
                 time.sleep(0.02)
         self.assertTrue(time.time()<timeout)
-        self.assertEquals(None, v)
+        self.assertEqual(None, v)
 
     if db.version() >= (4,7) :
         def test02_test_request(self) :

diff --git a/lib-python/2.7.0/distutils/fancy_getopt.py b/lib-python/2.7.0/distutils/fancy_getopt.py
--- a/lib-python/2.7.0/distutils/fancy_getopt.py
+++ b/lib-python/2.7.0/distutils/fancy_getopt.py
@@ -8,7 +8,7 @@
   * options set attributes of a passed-in object
 """
 
-__revision__ = "$Id: fancy_getopt.py 76956 2009-12-21 01:22:46Z tarek.ziade $"
+__revision__ = "$Id$"
 
 import sys
 import string

diff --git a/lib-python/2.7.0/test/test_bigmem.py b/lib-python/2.7.0/test/test_bigmem.py
--- a/lib-python/2.7.0/test/test_bigmem.py
+++ b/lib-python/2.7.0/test/test_bigmem.py
@@ -13,7 +13,7 @@
 #    doesn't release the old 's' (if it exists) until well after its new
 #    value has been created. Use 'del s' before the create_largestring call.
 #
-#  - Do *not* compare large objects using assertEquals or similar. It's a
+#  - Do *not* compare large objects using assertEqual or similar. It's a
 #    lengty operation and the errormessage will be utterly useless due to
 #    its size. To make sure whether a result has the right contents, better
 #    to use the strip or count methods, or compare meaningful slices.
@@ -39,20 +39,20 @@
         SUBSTR = ' abc def ghi'
         s = '-' * size + SUBSTR
         caps = s.capitalize()
-        self.assertEquals(caps[-len(SUBSTR):],
+        self.assertEqual(caps[-len(SUBSTR):],
                          SUBSTR.capitalize())
-        self.assertEquals(caps.lstrip('-'), SUBSTR)
+        self.assertEqual(caps.lstrip('-'), SUBSTR)
 
     @bigmemtest(minsize=_2G + 10, memuse=1)
     def test_center(self, size):
         SUBSTR = ' abc def ghi'
         s = SUBSTR.center(size)
-        self.assertEquals(len(s), size)
+        self.assertEqual(len(s), size)
         lpadsize = rpadsize = (len(s) - len(SUBSTR)) // 2
         if len(s) % 2:
             lpadsize += 1
-        self.assertEquals(s[lpadsize:-rpadsize], SUBSTR)
-        self.assertEquals(s.strip(), SUBSTR.strip())
+        self.assertEqual(s[lpadsize:-rpadsize], SUBSTR)
+        self.assertEqual(s.strip(), SUBSTR.strip())
 
     @precisionbigmemtest(size=_2G - 1, memuse=1)
     def test_center_unicode(self, size):
@@ -62,36 +62,36 @@
         except OverflowError:
             pass # acceptable on 32-bit
         else:
-            self.assertEquals(len(s), size)
+            self.assertEqual(len(s), size)
             lpadsize = rpadsize = (len(s) - len(SUBSTR)) // 2
             if len(s) % 2:
                 lpadsize += 1
-            self.assertEquals(s[lpadsize:-rpadsize], SUBSTR)
-            self.assertEquals(s.strip(), SUBSTR.strip())
+            self.assertEqual(s[lpadsize:-rpadsize], SUBSTR)
+            self.assertEqual(s.strip(), SUBSTR.strip())
             del s
 
     @bigmemtest(minsize=_2G, memuse=2)
     def test_count(self, size):
         SUBSTR = ' abc def ghi'
         s = '.' * size + SUBSTR
-        self.assertEquals(s.count('.'), size)
+        self.assertEqual(s.count('.'), size)
         s += '.'
-        self.assertEquals(s.count('.'), size + 1)
-        self.assertEquals(s.count(' '), 3)
-        self.assertEquals(s.count('i'), 1)
-        self.assertEquals(s.count('j'), 0)
+        self.assertEqual(s.count('.'), size + 1)
+        self.assertEqual(s.count(' '), 3)
+        self.assertEqual(s.count('i'), 1)
+        self.assertEqual(s.count('j'), 0)
 
     @bigmemtest(minsize=_2G + 2, memuse=3)
     def test_decode(self, size):
         s = '.' * size
-        self.assertEquals(len(s.decode('utf-8')), size)
+        self.assertEqual(len(s.decode('utf-8')), size)
 
     def basic_encode_test(self, size, enc, c=u'.', expectedsize=None):
         if expectedsize is None:
             expectedsize = size
 
         s = c * size
-        self.assertEquals(len(s.encode(enc)), expectedsize)
+        self.assertEqual(len(s.encode(enc)), expectedsize)
 
     @bigmemtest(minsize=_2G + 2, memuse=3)
     def test_encode(self, size):
@@ -147,43 +147,43 @@
     def test_expandtabs(self, size):
         s = '-' * size
         tabsize = 8
-        self.assertEquals(s.expandtabs(), s)
+        self.assertEqual(s.expandtabs(), s)
         del s
         slen, remainder = divmod(size, tabsize)
         s = '       \t' * slen
         s = s.expandtabs(tabsize)
-        self.assertEquals(len(s), size - remainder)
-        self.assertEquals(len(s.strip(' ')), 0)
+        self.assertEqual(len(s), size - remainder)
+        self.assertEqual(len(s.strip(' ')), 0)
 
     @bigmemtest(minsize=_2G, memuse=2)
     def test_find(self, size):
         SUBSTR = ' abc def ghi'
         sublen = len(SUBSTR)
         s = ''.join([SUBSTR, '-' * size, SUBSTR])
-        self.assertEquals(s.find(' '), 0)
-        self.assertEquals(s.find(SUBSTR), 0)
-        self.assertEquals(s.find(' ', sublen), sublen + size)
-        self.assertEquals(s.find(SUBSTR, len(SUBSTR)), sublen + size)
-        self.assertEquals(s.find('i'), SUBSTR.find('i'))
-        self.assertEquals(s.find('i', sublen),
+        self.assertEqual(s.find(' '), 0)
+        self.assertEqual(s.find(SUBSTR), 0)
+        self.assertEqual(s.find(' ', sublen), sublen + size)
+        self.assertEqual(s.find(SUBSTR, len(SUBSTR)), sublen + size)
+        self.assertEqual(s.find('i'), SUBSTR.find('i'))
+        self.assertEqual(s.find('i', sublen),
                          sublen + size + SUBSTR.find('i'))
-        self.assertEquals(s.find('i', size),
+        self.assertEqual(s.find('i', size),
                          sublen + size + SUBSTR.find('i'))
-        self.assertEquals(s.find('j'), -1)
+        self.assertEqual(s.find('j'), -1)
 
     @bigmemtest(minsize=_2G, memuse=2)
     def test_index(self, size):
         SUBSTR = ' abc def ghi'
         sublen = len(SUBSTR)
         s = ''.join([SUBSTR, '-' * size, SUBSTR])
-        self.assertEquals(s.index(' '), 0)
-        self.assertEquals(s.index(SUBSTR), 0)
-        self.assertEquals(s.index(' ', sublen), sublen + size)
-        self.assertEquals(s.index(SUBSTR, sublen), sublen + size)
-        self.assertEquals(s.index('i'), SUBSTR.index('i'))
-        self.assertEquals(s.index('i', sublen),
+        self.assertEqual(s.index(' '), 0)
+        self.assertEqual(s.index(SUBSTR), 0)
+        self.assertEqual(s.index(' ', sublen), sublen + size)
+        self.assertEqual(s.index(SUBSTR, sublen), sublen + size)
+        self.assertEqual(s.index('i'), SUBSTR.index('i'))
+        self.assertEqual(s.index('i', sublen),
                          sublen + size + SUBSTR.index('i'))
-        self.assertEquals(s.index('i', size),
+        self.assertEqual(s.index('i', size),
                          sublen + size + SUBSTR.index('i'))
         self.assertRaises(ValueError, s.index, 'j')
 
@@ -252,8 +252,8 @@
     def test_join(self, size):
         s = 'A' * size
         x = s.join(['aaaaa', 'bbbbb'])
-        self.assertEquals(x.count('a'), 5)
-        self.assertEquals(x.count('b'), 5)
+        self.assertEqual(x.count('a'), 5)
+        self.assertEqual(x.count('b'), 5)
         self.assertTrue(x.startswith('aaaaaA'))
         self.assertTrue(x.endswith('Abbbbb'))
 
@@ -262,25 +262,25 @@
         SUBSTR = ' abc def ghi'
         s = SUBSTR.ljust(size)
         self.assertTrue(s.startswith(SUBSTR + '  '))
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.strip(), SUBSTR.strip())
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.strip(), SUBSTR.strip())
 
     @bigmemtest(minsize=_2G + 10, memuse=2)
     def test_lower(self, size):
         s = 'A' * size
         s = s.lower()
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.count('a'), size)
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.count('a'), size)
 
     @bigmemtest(minsize=_2G + 10, memuse=1)
     def test_lstrip(self, size):
         SUBSTR = 'abc def ghi'
         s = SUBSTR.rjust(size)
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.lstrip(), SUBSTR.lstrip())
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.lstrip(), SUBSTR.lstrip())
         del s
         s = SUBSTR.ljust(size)
-        self.assertEquals(len(s), size)
+        self.assertEqual(len(s), size)
         stripped = s.lstrip()
         self.assertTrue(stripped is s)
 
@@ -289,44 +289,44 @@
         replacement = 'a'
         s = ' ' * size
         s = s.replace(' ', replacement)
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.count(replacement), size)
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.count(replacement), size)
         s = s.replace(replacement, ' ', size - 4)
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.count(replacement), 4)
-        self.assertEquals(s[-10:], '      aaaa')
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.count(replacement), 4)
+        self.assertEqual(s[-10:], '      aaaa')
 
     @bigmemtest(minsize=_2G, memuse=2)
     def test_rfind(self, size):
         SUBSTR = ' abc def ghi'
         sublen = len(SUBSTR)
         s = ''.join([SUBSTR, '-' * size, SUBSTR])
-        self.assertEquals(s.rfind(' '), sublen + size + SUBSTR.rfind(' '))
-        self.assertEquals(s.rfind(SUBSTR), sublen + size)
-        self.assertEquals(s.rfind(' ', 0, size), SUBSTR.rfind(' '))
-        self.assertEquals(s.rfind(SUBSTR, 0, sublen + size), 0)
-        self.assertEquals(s.rfind('i'), sublen + size + SUBSTR.rfind('i'))
-        self.assertEquals(s.rfind('i', 0, sublen), SUBSTR.rfind('i'))
-        self.assertEquals(s.rfind('i', 0, sublen + size),
-                          SUBSTR.rfind('i'))
-        self.assertEquals(s.rfind('j'), -1)
+        self.assertEqual(s.rfind(' '), sublen + size + SUBSTR.rfind(' '))
+        self.assertEqual(s.rfind(SUBSTR), sublen + size)
+        self.assertEqual(s.rfind(' ', 0, size), SUBSTR.rfind(' '))
+        self.assertEqual(s.rfind(SUBSTR, 0, sublen + size), 0)
+        self.assertEqual(s.rfind('i'), sublen + size + SUBSTR.rfind('i'))
+        self.assertEqual(s.rfind('i', 0, sublen), SUBSTR.rfind('i'))
+        self.assertEqual(s.rfind('i', 0, sublen + size),
+                         SUBSTR.rfind('i'))
+        self.assertEqual(s.rfind('j'), -1)
 
     @bigmemtest(minsize=_2G, memuse=2)
     def test_rindex(self, size):
         SUBSTR = ' abc def ghi'
         sublen = len(SUBSTR)
         s = ''.join([SUBSTR, '-' * size, SUBSTR])
-        self.assertEquals(s.rindex(' '),
+        self.assertEqual(s.rindex(' '),
                           sublen + size + SUBSTR.rindex(' '))
-        self.assertEquals(s.rindex(SUBSTR), sublen + size)
-        self.assertEquals(s.rindex(' ', 0, sublen + size - 1),
-                          SUBSTR.rindex(' '))
-        self.assertEquals(s.rindex(SUBSTR, 0, sublen + size), 0)
-        self.assertEquals(s.rindex('i'),
-                          sublen + size + SUBSTR.rindex('i'))
-        self.assertEquals(s.rindex('i', 0, sublen), SUBSTR.rindex('i'))
-        self.assertEquals(s.rindex('i', 0, sublen + size),
-                          SUBSTR.rindex('i'))
+        self.assertEqual(s.rindex(SUBSTR), sublen + size)
+        self.assertEqual(s.rindex(' ', 0, sublen + size - 1),
+                         SUBSTR.rindex(' '))
+        self.assertEqual(s.rindex(SUBSTR, 0, sublen + size), 0)
+        self.assertEqual(s.rindex('i'),
+                         sublen + size + SUBSTR.rindex('i'))
+        self.assertEqual(s.rindex('i', 0, sublen), SUBSTR.rindex('i'))
+        self.assertEqual(s.rindex('i', 0, sublen + size),
+                         SUBSTR.rindex('i'))
         self.assertRaises(ValueError, s.rindex, 'j')
 
     @bigmemtest(minsize=_2G + 10, memuse=1)
@@ -334,18 +334,18 @@
         SUBSTR = ' abc def ghi'
         s = SUBSTR.ljust(size)
         self.assertTrue(s.startswith(SUBSTR + '  '))
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.strip(), SUBSTR.strip())
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.strip(), SUBSTR.strip())
 
     @bigmemtest(minsize=_2G + 10, memuse=1)
     def test_rstrip(self, size):
         SUBSTR = ' abc def ghi'
         s = SUBSTR.ljust(size)
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.rstrip(), SUBSTR.rstrip())
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.rstrip(), SUBSTR.rstrip())
         del s
         s = SUBSTR.rjust(size)
-        self.assertEquals(len(s), size)
+        self.assertEqual(len(s), size)
         stripped = s.rstrip()
         self.assertTrue(stripped is s)
 
@@ -360,12 +360,12 @@
         SUBSTR = 'a' + ' ' * chunksize
         s = SUBSTR * chunksize
         l = s.split()
-        self.assertEquals(len(l), chunksize)
-        self.assertEquals(set(l), set(['a']))
+        self.assertEqual(len(l), chunksize)
+        self.assertEqual(set(l), set(['a']))
         del l
         l = s.split('a')
-        self.assertEquals(len(l), chunksize + 1)
-        self.assertEquals(set(l), set(['', ' ' * chunksize]))
+        self.assertEqual(len(l), chunksize + 1)
+        self.assertEqual(set(l), set(['', ' ' * chunksize]))
 
     # Allocates a string of twice size (and briefly two) and a list of
     # size.  Because of internal affairs, the s.split() call produces a
@@ -377,12 +377,12 @@
     def test_split_large(self, size):
         s = ' a' * size + ' '
         l = s.split()
-        self.assertEquals(len(l), size)
-        self.assertEquals(set(l), set(['a']))
+        self.assertEqual(len(l), size)
+        self.assertEqual(set(l), set(['a']))
         del l
         l = s.split('a')
-        self.assertEquals(len(l), size + 1)
-        self.assertEquals(set(l), set([' ']))
+        self.assertEqual(len(l), size + 1)
+        self.assertEqual(set(l), set([' ']))
 
     @bigmemtest(minsize=_2G, memuse=2.1)
     def test_splitlines(self, size):
@@ -392,8 +392,8 @@
         SUBSTR = ' ' * chunksize + '\n' + ' ' * chunksize + '\r\n'
         s = SUBSTR * chunksize
         l = s.splitlines()
-        self.assertEquals(len(l), chunksize * 2)
-        self.assertEquals(set(l), set([' ' * chunksize]))
+        self.assertEqual(len(l), chunksize * 2)
+        self.assertEqual(set(l), set([' ' * chunksize]))
 
     @bigmemtest(minsize=_2G, memuse=2)
     def test_startswith(self, size):
@@ -407,12 +407,12 @@
     def test_strip(self, size):
         SUBSTR = '   abc def ghi   '
         s = SUBSTR.rjust(size)
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.strip(), SUBSTR.strip())
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.strip(), SUBSTR.strip())
         del s
         s = SUBSTR.ljust(size)
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.strip(), SUBSTR.strip())
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.strip(), SUBSTR.strip())
 
     @bigmemtest(minsize=_2G, memuse=2)
     def test_swapcase(self, size):
@@ -421,9 +421,9 @@
         repeats = size // sublen + 2
         s = SUBSTR * repeats
         s = s.swapcase()
-        self.assertEquals(len(s), sublen * repeats)
-        self.assertEquals(s[:sublen * 3], SUBSTR.swapcase() * 3)
-        self.assertEquals(s[-sublen * 3:], SUBSTR.swapcase() * 3)
+        self.assertEqual(len(s), sublen * repeats)
+        self.assertEqual(s[:sublen * 3], SUBSTR.swapcase() * 3)
+        self.assertEqual(s[-sublen * 3:], SUBSTR.swapcase() * 3)
 
     @bigmemtest(minsize=_2G, memuse=2)
     def test_title(self, size):
@@ -441,19 +441,19 @@
         repeats = size // sublen + 2
         s = SUBSTR * repeats
         s = s.translate(trans)
-        self.assertEquals(len(s), repeats * sublen)
-        self.assertEquals(s[:sublen], SUBSTR.translate(trans))
-        self.assertEquals(s[-sublen:], SUBSTR.translate(trans))
-        self.assertEquals(s.count('.'), 0)
-        self.assertEquals(s.count('!'), repeats * 2)
-        self.assertEquals(s.count('z'), repeats * 3)
+        self.assertEqual(len(s), repeats * sublen)
+        self.assertEqual(s[:sublen], SUBSTR.translate(trans))
+        self.assertEqual(s[-sublen:], SUBSTR.translate(trans))
+        self.assertEqual(s.count('.'), 0)
+        self.assertEqual(s.count('!'), repeats * 2)
+        self.assertEqual(s.count('z'), repeats * 3)
 
     @bigmemtest(minsize=_2G + 5, memuse=2)
     def test_upper(self, size):
         s = 'a' * size
         s = s.upper()
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.count('A'), size)
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.count('A'), size)
 
     @bigmemtest(minsize=_2G + 20, memuse=1)
     def test_zfill(self, size):
@@ -461,8 +461,8 @@
         s = SUBSTR.zfill(size)
         self.assertTrue(s.endswith('0' + SUBSTR[1:]))
         self.assertTrue(s.startswith('-0'))
-        self.assertEquals(len(s), size)
-        self.assertEquals(s.count('0'), size - len(SUBSTR))
+        self.assertEqual(len(s), size)
+        self.assertEqual(s.count('0'), size - len(SUBSTR))
 
     @bigmemtest(minsize=_2G + 10, memuse=2)
     def test_format(self, size):
@@ -471,7 +471,7 @@
         self.assertTrue(s == sf)
         del sf
         sf = '..%s..' % (s,)
-        self.assertEquals(len(sf), len(s) + 4)
+        self.assertEqual(len(sf), len(s) + 4)
         self.assertTrue(sf.startswith('..-'))
         self.assertTrue(sf.endswith('-..'))
         del s, sf
@@ -481,18 +481,18 @@
         s = ''.join([edge, '%s', edge])
         del edge
         s = s % '...'
-        self.assertEquals(len(s), size * 2 + 3)
-        self.assertEquals(s.count('.'), 3)
-        self.assertEquals(s.count('-'), size * 2)
+        self.assertEqual(len(s), size * 2 + 3)
+        self.assertEqual(s.count('.'), 3)
+        self.assertEqual(s.count('-'), size * 2)
 
     @bigmemtest(minsize=_2G + 10, memuse=2)
     def test_repr_small(self, size):
         s = '-' * size
         s = repr(s)
-        self.assertEquals(len(s), size + 2)
-        self.assertEquals(s[0], "'")
-        self.assertEquals(s[-1], "'")
-        self.assertEquals(s.count('-'), size)
+        self.assertEqual(len(s), size + 2)
+        self.assertEqual(s[0], "'")
+        self.assertEqual(s[-1], "'")
+        self.assertEqual(s.count('-'), size)
         del s
         # repr() will create a string four times as large as this 'binary
         # string', but we don't want to allocate much more than twice
@@ -500,21 +500,21 @@
         size = size // 5 * 2
         s = '\x00' * size
         s = repr(s)
-        self.assertEquals(len(s), size * 4 + 2)
-        self.assertEquals(s[0], "'")
-        self.assertEquals(s[-1], "'")
-        self.assertEquals(s.count('\\'), size)
-        self.assertEquals(s.count('0'), size * 2)
+        self.assertEqual(len(s), size * 4 + 2)
+        self.assertEqual(s[0], "'")
+        self.assertEqual(s[-1], "'")
+        self.assertEqual(s.count('\\'), size)
+        self.assertEqual(s.count('0'), size * 2)
 
     @bigmemtest(minsize=_2G + 10, memuse=5)
     def test_repr_large(self, size):
         s = '\x00' * size
         s = repr(s)
-        self.assertEquals(len(s), size * 4 + 2)
-        self.assertEquals(s[0], "'")
-        self.assertEquals(s[-1], "'")
-        self.assertEquals(s.count('\\'), size)
-        self.assertEquals(s.count('0'), size * 2)
+        self.assertEqual(len(s), size * 4 + 2)
+        self.assertEqual(s[0], "'")
+        self.assertEqual(s[-1], "'")
+        self.assertEqual(s.count('\\'), size)
+        self.assertEqual(s.count('0'), size * 2)
 
     @bigmemtest(minsize=2**32 // 5, memuse=6+2)
     def test_unicode_repr(self, size):
@@ -526,20 +526,20 @@
     @bigmemtest(minsize=_1G + 2, memuse=3)
     def test_concat(self, size):
         s = '.' * size
-        self.assertEquals(len(s), size)
+        self.assertEqual(len(s), size)
         s = s + s
-        self.assertEquals(len(s), size * 2)
-        self.assertEquals(s.count('.'), size * 2)
+        self.assertEqual(len(s), size * 2)
+        self.assertEqual(s.count('.'), size * 2)
 
     # This test is meaningful even with size < 2G, as long as the
     # repeated string is > 2G (but it tests more if both are > 2G :)
     @bigmemtest(minsize=_1G + 2, memuse=3)
     def test_repeat(self, size):
         s = '.' * size
-        self.assertEquals(len(s), size)
+        self.assertEqual(len(s), size)
         s = s * 2
-        self.assertEquals(len(s), size * 2)
-        self.assertEquals(s.count('.'), size * 2)
+        self.assertEqual(len(s), size * 2)
+        self.assertEqual(s.count('.'), size * 2)
 
     @bigmemtest(minsize=_2G + 20, memuse=1)
     def test_slice_and_getitem(self, size):
@@ -549,26 +549,26 @@
         stepsize = len(s) // 100
         stepsize = stepsize - (stepsize % sublen)
         for i in range(0, len(s) - stepsize, stepsize):
-            self.assertEquals(s[i], SUBSTR[0])
-            self.assertEquals(s[i:i + sublen], SUBSTR)
-            self.assertEquals(s[i:i + sublen:2], SUBSTR[::2])
+            self.assertEqual(s[i], SUBSTR[0])
+            self.assertEqual(s[i:i + sublen], SUBSTR)
+            self.assertEqual(s[i:i + sublen:2], SUBSTR[::2])
             if i > 0:
-                self.assertEquals(s[i + sublen - 1:i - 1:-3],
-                                  SUBSTR[sublen::-3])
+                self.assertEqual(s[i + sublen - 1:i - 1:-3],
+                                 SUBSTR[sublen::-3])
         # Make sure we do some slicing and indexing near the end of the
         # string, too.
-        self.assertEquals(s[len(s) - 1], SUBSTR[-1])
-        self.assertEquals(s[-1], SUBSTR[-1])
-        self.assertEquals(s[len(s) - 10], SUBSTR[0])
-        self.assertEquals(s[-sublen], SUBSTR[0])
-        self.assertEquals(s[len(s):], '')
-        self.assertEquals(s[len(s) - 1:], SUBSTR[-1])
-        self.assertEquals(s[-1:], SUBSTR[-1])
-        self.assertEquals(s[len(s) - sublen:], SUBSTR)
-        self.assertEquals(s[-sublen:], SUBSTR)
-        self.assertEquals(len(s[:]), len(s))
-        self.assertEquals(len(s[:len(s) - 5]), len(s) - 5)
-        self.assertEquals(len(s[5:-5]), len(s) - 10)
+        self.assertEqual(s[len(s) - 1], SUBSTR[-1])
+        self.assertEqual(s[-1], SUBSTR[-1])
+        self.assertEqual(s[len(s) - 10], SUBSTR[0])
+        self.assertEqual(s[-sublen], SUBSTR[0])
+        self.assertEqual(s[len(s):], '')
+        self.assertEqual(s[len(s) - 1:], SUBSTR[-1])
+        self.assertEqual(s[-1:], SUBSTR[-1])
+        self.assertEqual(s[len(s) - sublen:], SUBSTR)
+        self.assertEqual(s[-sublen:], SUBSTR)
+        self.assertEqual(len(s[:]), len(s))
+        self.assertEqual(len(s[:len(s) - 5]), len(s) - 5)
+        self.assertEqual(len(s[5:-5]), len(s) - 10)
 
         self.assertRaises(IndexError, operator.getitem, s, len(s))
         self.assertRaises(IndexError, operator.getitem, s, len(s) + 1)
@@ -643,9 +643,9 @@
     # skipped, in verbose mode.)
     def basic_concat_test(self, size):
         t = ((),) * size
-        self.assertEquals(len(t), size)
+        self.assertEqual(len(t), size)
         t = t + t
-        self.assertEquals(len(t), size * 2)
+        self.assertEqual(len(t), size * 2)
 
     @bigmemtest(minsize=_2G // 2 + 2, memuse=24)
     def test_concat_small(self, size):
@@ -658,7 +658,7 @@
     @bigmemtest(minsize=_2G // 5 + 10, memuse=8 * 5)
     def test_contains(self, size):
         t = (1, 2, 3, 4, 5) * size
-        self.assertEquals(len(t), size * 5)
+        self.assertEqual(len(t), size * 5)
         self.assertIn(5, t)
         self.assertNotIn((1, 2, 3, 4, 5), t)
         self.assertNotIn(0, t)
@@ -674,27 +674,27 @@
     @bigmemtest(minsize=_2G + 10, memuse=8)
     def test_index_and_slice(self, size):
         t = (None,) * size
-        self.assertEquals(len(t), size)
-        self.assertEquals(t[-1], None)
-        self.assertEquals(t[5], None)
-        self.assertEquals(t[size - 1], None)
+        self.assertEqual(len(t), size)
+        self.assertEqual(t[-1], None)
+        self.assertEqual(t[5], None)
+        self.assertEqual(t[size - 1], None)
         self.assertRaises(IndexError, operator.getitem, t, size)
-        self.assertEquals(t[:5], (None,) * 5)
-        self.assertEquals(t[-5:], (None,) * 5)
-        self.assertEquals(t[20:25], (None,) * 5)
-        self.assertEquals(t[-25:-20], (None,) * 5)
-        self.assertEquals(t[size - 5:], (None,) * 5)
-        self.assertEquals(t[size - 5:size], (None,) * 5)
-        self.assertEquals(t[size - 6:size - 2], (None,) * 4)
-        self.assertEquals(t[size:size], ())
-        self.assertEquals(t[size:size+5], ())
+        self.assertEqual(t[:5], (None,) * 5)
+        self.assertEqual(t[-5:], (None,) * 5)
+        self.assertEqual(t[20:25], (None,) * 5)
+        self.assertEqual(t[-25:-20], (None,) * 5)
+        self.assertEqual(t[size - 5:], (None,) * 5)
+        self.assertEqual(t[size - 5:size], (None,) * 5)
+        self.assertEqual(t[size - 6:size - 2], (None,) * 4)
+        self.assertEqual(t[size:size], ())
+        self.assertEqual(t[size:size+5], ())
 
     # Like test_concat, split in two.
     def basic_test_repeat(self, size):
         t = ('',) * size
-        self.assertEquals(len(t), size)
+        self.assertEqual(len(t), size)
         t = t * 2
-        self.assertEquals(len(t), size * 2)
+        self.assertEqual(len(t), size * 2)
 
     @bigmemtest(minsize=_2G // 2 + 2, memuse=24)
     def test_repeat_small(self, size):
@@ -717,9 +717,9 @@
         else:
             count = 0
             for item in t:
-                self.assertEquals(item, count)
+                self.assertEqual(item, count)
                 count += 1
-            self.assertEquals(count, size)
+            self.assertEqual(count, size)
 
     @precisionbigmemtest(size=_1G - 25, memuse=9)
     def test_from_almost_2G_generator(self, size):
@@ -727,9 +727,9 @@
             t = tuple(xrange(size))
             count = 0
             for item in t:
-                self.assertEquals(item, count)
+                self.assertEqual(item, count)
                 count += 1
-            self.assertEquals(count, size)
+            self.assertEqual(count, size)
         except MemoryError:
             pass # acceptable, expected on 32-bit
 
@@ -738,10 +738,10 @@
         t = (0,) * size
         s = repr(t)
         # The repr of a tuple of 0's is exactly three times the tuple length.
-        self.assertEquals(len(s), size * 3)
-        self.assertEquals(s[:5], '(0, 0')
-        self.assertEquals(s[-5:], '0, 0)')
-        self.assertEquals(s.count('0'), size)
+        self.assertEqual(len(s), size * 3)
+        self.assertEqual(s[:5], '(0, 0')
+        self.assertEqual(s[-5:], '0, 0)')
+        self.assertEqual(s.count('0'), size)
 
     @bigmemtest(minsize=_2G // 3 + 2, memuse=8 + 3)
     def test_repr_small(self, size):
@@ -777,9 +777,9 @@
     # skipped, in verbose mode.)
     def basic_test_concat(self, size):
         l = [[]] * size
-        self.assertEquals(len(l), size)
+        self.assertEqual(len(l), size)
         l = l + l
-        self.assertEquals(len(l), size * 2)
+        self.assertEqual(len(l), size * 2)
 
     @bigmemtest(minsize=_2G // 2 + 2, memuse=24)
     def test_concat_small(self, size):
@@ -792,7 +792,7 @@
     def basic_test_inplace_concat(self, size):
         l = [sys.stdout] * size
         l += l
-        self.assertEquals(len(l), size * 2)
+        self.assertEqual(len(l), size * 2)
         self.assertTrue(l[0] is l[-1])
         self.assertTrue(l[size - 1] is l[size + 1])
 
@@ -807,7 +807,7 @@
     @bigmemtest(minsize=_2G // 5 + 10, memuse=8 * 5)
     def test_contains(self, size):
         l = [1, 2, 3, 4, 5] * size
-        self.assertEquals(len(l), size * 5)
+        self.assertEqual(len(l), size * 5)
         self.assertIn(5, l)
         self.assertNotIn([1, 2, 3, 4, 5], l)
         self.assertNotIn(0, l)
@@ -820,66 +820,66 @@
     @bigmemtest(minsize=_2G + 10, memuse=8)
     def test_index_and_slice(self, size):
         l = [None] * size
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-1], None)
-        self.assertEquals(l[5], None)
-        self.assertEquals(l[size - 1], None)
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-1], None)
+        self.assertEqual(l[5], None)
+        self.assertEqual(l[size - 1], None)
         self.assertRaises(IndexError, operator.getitem, l, size)
-        self.assertEquals(l[:5], [None] * 5)
-        self.assertEquals(l[-5:], [None] * 5)
-        self.assertEquals(l[20:25], [None] * 5)
-        self.assertEquals(l[-25:-20], [None] * 5)
-        self.assertEquals(l[size - 5:], [None] * 5)
-        self.assertEquals(l[size - 5:size], [None] * 5)
-        self.assertEquals(l[size - 6:size - 2], [None] * 4)
-        self.assertEquals(l[size:size], [])
-        self.assertEquals(l[size:size+5], [])
+        self.assertEqual(l[:5], [None] * 5)
+        self.assertEqual(l[-5:], [None] * 5)
+        self.assertEqual(l[20:25], [None] * 5)
+        self.assertEqual(l[-25:-20], [None] * 5)
+        self.assertEqual(l[size - 5:], [None] * 5)
+        self.assertEqual(l[size - 5:size], [None] * 5)
+        self.assertEqual(l[size - 6:size - 2], [None] * 4)
+        self.assertEqual(l[size:size], [])
+        self.assertEqual(l[size:size+5], [])
 
         l[size - 2] = 5
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-3:], [None, 5, None])
-        self.assertEquals(l.count(5), 1)
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-3:], [None, 5, None])
+        self.assertEqual(l.count(5), 1)
         self.assertRaises(IndexError, operator.setitem, l, size, 6)
-        self.assertEquals(len(l), size)
+        self.assertEqual(len(l), size)
 
         l[size - 7:] = [1, 2, 3, 4, 5]
         size -= 2
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-7:], [None, None, 1, 2, 3, 4, 5])
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-7:], [None, None, 1, 2, 3, 4, 5])
 
         l[:7] = [1, 2, 3, 4, 5]
         size -= 2
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[:7], [1, 2, 3, 4, 5, None, None])
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[:7], [1, 2, 3, 4, 5, None, None])
 
         del l[size - 1]
         size -= 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-1], 4)
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-1], 4)
 
         del l[-2:]
         size -= 2
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-1], 2)
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-1], 2)
 
         del l[0]
         size -= 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[0], 2)
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[0], 2)
 
         del l[:2]
         size -= 2
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[0], 4)
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[0], 4)
 
     # Like test_concat, split in two.
     def basic_test_repeat(self, size):
         l = [] * size
         self.assertFalse(l)
         l = [''] * size
-        self.assertEquals(len(l), size)
+        self.assertEqual(len(l), size)
         l = l * 2
-        self.assertEquals(len(l), size * 2)
+        self.assertEqual(len(l), size * 2)
 
     @bigmemtest(minsize=_2G // 2 + 2, memuse=24)
     def test_repeat_small(self, size):
@@ -892,13 +892,13 @@
     def basic_test_inplace_repeat(self, size):
         l = ['']
         l *= size
-        self.assertEquals(len(l), size)
+        self.assertEqual(len(l), size)
         self.assertTrue(l[0] is l[-1])
         del l
 
         l = [''] * size
         l *= 2
-        self.assertEquals(len(l), size * 2)
+        self.assertEqual(len(l), size * 2)
         self.assertTrue(l[size - 1] is l[-1])
 
     @bigmemtest(minsize=_2G // 2 + 2, memuse=16)
@@ -913,10 +913,10 @@
         l = [0] * size
         s = repr(l)
         # The repr of a list of 0's is exactly three times the list length.
-        self.assertEquals(len(s), size * 3)
-        self.assertEquals(s[:5], '[0, 0')
-        self.assertEquals(s[-5:], '0, 0]')
-        self.assertEquals(s.count('0'), size)
+        self.assertEqual(len(s), size * 3)
+        self.assertEqual(s[:5], '[0, 0')
+        self.assertEqual(s[-5:], '0, 0]')
+        self.assertEqual(s.count('0'), size)
 
     @bigmemtest(minsize=_2G // 3 + 2, memuse=8 + 3)
     def test_repr_small(self, size):
@@ -932,20 +932,20 @@
     def test_append(self, size):
         l = [object()] * size
         l.append(object())
-        self.assertEquals(len(l), size+1)
+        self.assertEqual(len(l), size+1)
         self.assertTrue(l[-3] is l[-2])
         self.assertFalse(l[-2] is l[-1])
 
     @bigmemtest(minsize=_2G // 5 + 2, memuse=8 * 5)
     def test_count(self, size):
         l = [1, 2, 3, 4, 5] * size
-        self.assertEquals(l.count(1), size)
-        self.assertEquals(l.count("1"), 0)
+        self.assertEqual(l.count(1), size)
+        self.assertEqual(l.count("1"), 0)
 
     def basic_test_extend(self, size):
         l = [file] * size
         l.extend(l)
-        self.assertEquals(len(l), size * 2)
+        self.assertEqual(len(l), size * 2)
         self.assertTrue(l[0] is l[-1])
         self.assertTrue(l[size - 1] is l[size + 1])
 
@@ -961,9 +961,9 @@
     def test_index(self, size):
         l = [1L, 2L, 3L, 4L, 5L] * size
         size *= 5
-        self.assertEquals(l.index(1), 0)
-        self.assertEquals(l.index(5, size - 5), size - 1)
-        self.assertEquals(l.index(5, size - 5, size), size - 1)
+        self.assertEqual(l.index(1), 0)
+        self.assertEqual(l.index(5, size - 5), size - 1)
+        self.assertEqual(l.index(5, size - 5, size), size - 1)
         self.assertRaises(ValueError, l.index, 1, size - 4, size)
         self.assertRaises(ValueError, l.index, 6L)
 
@@ -973,80 +973,80 @@
         l = [1.0] * size
         l.insert(size - 1, "A")
         size += 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-3:], [1.0, "A", 1.0])
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-3:], [1.0, "A", 1.0])
 
         l.insert(size + 1, "B")
         size += 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-3:], ["A", 1.0, "B"])
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-3:], ["A", 1.0, "B"])
 
         l.insert(1, "C")
         size += 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[:3], [1.0, "C", 1.0])
-        self.assertEquals(l[size - 3:], ["A", 1.0, "B"])
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[:3], [1.0, "C", 1.0])
+        self.assertEqual(l[size - 3:], ["A", 1.0, "B"])
 
     @bigmemtest(minsize=_2G // 5 + 4, memuse=8 * 5)
     def test_pop(self, size):
         l = [u"a", u"b", u"c", u"d", u"e"] * size
         size *= 5
-        self.assertEquals(len(l), size)
+        self.assertEqual(len(l), size)
 
         item = l.pop()
         size -= 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(item, u"e")
-        self.assertEquals(l[-2:], [u"c", u"d"])
+        self.assertEqual(len(l), size)
+        self.assertEqual(item, u"e")
+        self.assertEqual(l[-2:], [u"c", u"d"])
 
         item = l.pop(0)
         size -= 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(item, u"a")
-        self.assertEquals(l[:2], [u"b", u"c"])
+        self.assertEqual(len(l), size)
+        self.assertEqual(item, u"a")
+        self.assertEqual(l[:2], [u"b", u"c"])
 
         item = l.pop(size - 2)
         size -= 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(item, u"c")
-        self.assertEquals(l[-2:], [u"b", u"d"])
+        self.assertEqual(len(l), size)
+        self.assertEqual(item, u"c")
+        self.assertEqual(l[-2:], [u"b", u"d"])
 
     @bigmemtest(minsize=_2G + 10, memuse=8)
     def test_remove(self, size):
         l = [10] * size
-        self.assertEquals(len(l), size)
+        self.assertEqual(len(l), size)
 
         l.remove(10)
         size -= 1
-        self.assertEquals(len(l), size)
+        self.assertEqual(len(l), size)
 
         # Because of the earlier l.remove(), this append doesn't trigger
         # a resize.
         l.append(5)
         size += 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-2:], [10, 5])
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-2:], [10, 5])
         l.remove(5)
         size -= 1
-        self.assertEquals(len(l), size)
-        self.assertEquals(l[-2:], [10, 10])
+        self.assertEqual(len(l), size)
+        self.assertEqual(l[-2:], [10, 10])
 
     @bigmemtest(minsize=_2G // 5 + 2, memuse=8 * 5)
     def test_reverse(self, size):
         l = [1, 2, 3, 4, 5] * size
         l.reverse()
-        self.assertEquals(len(l), size * 5)
-        self.assertEquals(l[-5:], [5, 4, 3, 2, 1])
-        self.assertEquals(l[:5], [5, 4, 3, 2, 1])
+        self.assertEqual(len(l), size * 5)
+        self.assertEqual(l[-5:], [5, 4, 3, 2, 1])
+        self.assertEqual(l[:5], [5, 4, 3, 2, 1])
 
     @bigmemtest(minsize=_2G // 5 + 2, memuse=8 * 5)
     def test_sort(self, size):
         l = [1, 2, 3, 4, 5] * size
         l.sort()
-        self.assertEquals(len(l), size * 5)
-        self.assertEquals(l.count(1), size)
-        self.assertEquals(l[:10], [1] * 10)
-        self.assertEquals(l[-10:], [5] * 10)
+        self.assertEqual(len(l), size * 5)
+        self.assertEqual(l.count(1), size)
+        self.assertEqual(l[:10], [1] * 10)
+        self.assertEqual(l[-10:], [5] * 10)
 
 class BufferTest(unittest.TestCase):
 
@@ -1060,9 +1060,9 @@
         else:
             count = 0
             for c in b:
-                self.assertEquals(c, 'A')
+                self.assertEqual(c, 'A')
                 count += 1
-            self.assertEquals(count, size*4)
+            self.assertEqual(count, size*4)
 
 def test_main():
     test_support.run_unittest(StrTest, TupleTest, ListTest, BufferTest)

diff --git a/lib-python/2.7.0/test/test_time.py b/lib-python/2.7.0/test/test_time.py
--- a/lib-python/2.7.0/test/test_time.py
+++ b/lib-python/2.7.0/test/test_time.py
@@ -94,7 +94,7 @@
         # based on its value.
         expected = "2000 01 01 00 00 00 1 001"
         result = time.strftime("%Y %m %d %H %M %S %w %j", (0,)*9)
-        self.assertEquals(expected, result)
+        self.assertEqual(expected, result)
 
     def test_strptime(self):
         # Should be able to go round-trip from strftime to strptime without

diff --git a/lib-python/2.7.0/imaplib.py b/lib-python/2.7.0/imaplib.py
--- a/lib-python/2.7.0/imaplib.py
+++ b/lib-python/2.7.0/imaplib.py
@@ -22,7 +22,7 @@
 
 __version__ = "2.58"
 
-import binascii, random, re, socket, subprocess, sys, time
+import binascii, errno, random, re, socket, subprocess, sys, time
 
 __all__ = ["IMAP4", "IMAP4_stream", "Internaldate2tuple",
            "Int2AP", "ParseFlags", "Time2Internaldate"]
@@ -248,7 +248,14 @@
     def shutdown(self):
         """Close I/O established in "open"."""
         self.file.close()
-        self.sock.close()
+        try:
+            self.sock.shutdown(socket.SHUT_RDWR)
+        except socket.error as e:
+            # The server might already have closed the connection
+            if e.errno != errno.ENOTCONN:
+                raise
+        finally:
+            self.sock.close()
 
 
     def socket(self):
@@ -883,14 +890,17 @@
 
 
     def _command_complete(self, name, tag):
-        self._check_bye()
+        # BYE is expected after LOGOUT
+        if name != 'LOGOUT':
+            self._check_bye()
         try:
             typ, data = self._get_tagged_response(tag)
         except self.abort, val:
             raise self.abort('command: %s => %s' % (name, val))
         except self.error, val:
             raise self.error('command: %s => %s' % (name, val))
-        self._check_bye()
+        if name != 'LOGOUT':
+            self._check_bye()
         if typ == 'BAD':
             raise self.error('%s command error: %s %s' % (name, typ, data))
         return typ, data

diff --git a/lib-python/2.7.0/test/test_ast.py b/lib-python/2.7.0/test/test_ast.py
--- a/lib-python/2.7.0/test/test_ast.py
+++ b/lib-python/2.7.0/test/test_ast.py
@@ -147,7 +147,7 @@
                                     (eval_tests, eval_results, "eval")):
             for i, o in itertools.izip(input, output):
                 ast_tree = compile(i, "?", kind, ast.PyCF_ONLY_AST)
-                self.assertEquals(to_tuple(ast_tree), o)
+                self.assertEqual(to_tuple(ast_tree), o)
                 self._assertTrueorder(ast_tree, (0, 0))
 
     def test_slice(self):
@@ -171,20 +171,20 @@
 
     def test_nodeclasses(self):
         x = ast.BinOp(1, 2, 3, lineno=0)
-        self.assertEquals(x.left, 1)
-        self.assertEquals(x.op, 2)
-        self.assertEquals(x.right, 3)
-        self.assertEquals(x.lineno, 0)
+        self.assertEqual(x.left, 1)
+        self.assertEqual(x.op, 2)
+        self.assertEqual(x.right, 3)
+        self.assertEqual(x.lineno, 0)
 
         # node raises exception when not given enough arguments
         self.assertRaises(TypeError, ast.BinOp, 1, 2)
 
         # can set attributes through kwargs too
         x = ast.BinOp(left=1, op=2, right=3, lineno=0)
-        self.assertEquals(x.left, 1)
-        self.assertEquals(x.op, 2)
-        self.assertEquals(x.right, 3)
-        self.assertEquals(x.lineno, 0)
+        self.assertEqual(x.left, 1)
+        self.assertEqual(x.op, 2)
+        self.assertEqual(x.right, 3)
+        self.assertEqual(x.lineno, 0)
 
         # this used to fail because Sub._fields was None
         x = ast.Sub()
@@ -202,7 +202,7 @@
             for protocol in protocols:
                 for ast in (compile(i, "?", "exec", 0x400) for i in exec_tests):
                     ast2 = mod.loads(mod.dumps(ast, protocol))
-                    self.assertEquals(to_tuple(ast2), to_tuple(ast))
+                    self.assertEqual(to_tuple(ast2), to_tuple(ast))
 
 
 class ASTHelpers_Test(unittest.TestCase):

diff --git a/lib-python/2.7.0/test/test_dircache.py b/lib-python/2.7.0/test/test_dircache.py
--- a/lib-python/2.7.0/test/test_dircache.py
+++ b/lib-python/2.7.0/test/test_dircache.py
@@ -35,7 +35,7 @@
     def test_listdir(self):
         ## SUCCESSFUL CASES
         entries = dircache.listdir(self.tempdir)
-        self.assertEquals(entries, [])
+        self.assertEqual(entries, [])
 
         # Check that cache is actually caching, not just passing through.
         self.assertTrue(dircache.listdir(self.tempdir) is entries)
@@ -52,7 +52,7 @@
             time.sleep(1)
             self.writeTemp("test1")
             entries = dircache.listdir(self.tempdir)
-            self.assertEquals(entries, ['test1'])
+            self.assertEqual(entries, ['test1'])
             self.assertTrue(dircache.listdir(self.tempdir) is entries)
 
         ## UNSUCCESSFUL CASES
@@ -63,7 +63,7 @@
         self.mkdirTemp("A")
         lst = ['A', 'test2', 'test_nonexistent']
         dircache.annotate(self.tempdir, lst)
-        self.assertEquals(lst, ['A/', 'test2', 'test_nonexistent'])
+        self.assertEqual(lst, ['A/', 'test2', 'test_nonexistent'])
 
 
 def test_main():


More information about the Pypy-commit mailing list