Author: Philip Jenvey <pjen...@underboss.org>
Branch: vendor/stdlib
Changeset: r87504:e6575c58d3aa
Date: 2016-10-01 11:14 -0700
http://bitbucket.org/pypy/pypy/changeset/e6575c58d3aa/

Log:    update the 2.7 stdlib to 2.7.12

diff too long, truncating to 2000 out of 26235 lines

diff --git a/lib-python/2.7/BaseHTTPServer.py b/lib-python/2.7/BaseHTTPServer.py
--- a/lib-python/2.7/BaseHTTPServer.py
+++ b/lib-python/2.7/BaseHTTPServer.py
@@ -362,14 +362,25 @@
             message = short
         explain = long
         self.log_error("code %d, message %s", code, message)
-        # using _quote_html to prevent Cross Site Scripting attacks (see bug 
#1100201)
-        content = (self.error_message_format %
-                   {'code': code, 'message': _quote_html(message), 'explain': 
explain})
         self.send_response(code, message)
-        self.send_header("Content-Type", self.error_content_type)
         self.send_header('Connection', 'close')
+
+        # Message body is omitted for cases described in:
+        #  - RFC7230: 3.3. 1xx, 204(No Content), 304(Not Modified)
+        #  - RFC7231: 6.3.6. 205(Reset Content)
+        content = None
+        if code >= 200 and code not in (204, 205, 304):
+            # HTML encode to prevent Cross Site Scripting attacks
+            # (see bug #1100201)
+            content = (self.error_message_format % {
+                'code': code,
+                'message': _quote_html(message),
+                'explain': explain
+            })
+            self.send_header("Content-Type", self.error_content_type)
         self.end_headers()
-        if self.command != 'HEAD' and code >= 200 and code not in (204, 304):
+
+        if self.command != 'HEAD' and content:
             self.wfile.write(content)
 
     error_message_format = DEFAULT_ERROR_MESSAGE
diff --git a/lib-python/2.7/Cookie.py b/lib-python/2.7/Cookie.py
--- a/lib-python/2.7/Cookie.py
+++ b/lib-python/2.7/Cookie.py
@@ -190,7 +190,7 @@
 Backwards Compatibility
 -----------------------
 
-In order to keep compatibilty with earlier versions of Cookie.py,
+In order to keep compatibility with earlier versions of Cookie.py,
 it is still possible to use Cookie.Cookie() to create a Cookie.  In
 fact, this simply returns a SmartCookie.
 
diff --git a/lib-python/2.7/SimpleHTTPServer.py 
b/lib-python/2.7/SimpleHTTPServer.py
--- a/lib-python/2.7/SimpleHTTPServer.py
+++ b/lib-python/2.7/SimpleHTTPServer.py
@@ -167,9 +167,9 @@
         words = filter(None, words)
         path = os.getcwd()
         for word in words:
-            drive, word = os.path.splitdrive(word)
-            head, word = os.path.split(word)
-            if word in (os.curdir, os.pardir): continue
+            if os.path.dirname(word) or word in (os.curdir, os.pardir):
+                # Ignore components that are not a simple file/directory name
+                continue
             path = os.path.join(path, word)
         if trailing_slash:
             path += '/'
diff --git a/lib-python/2.7/SocketServer.py b/lib-python/2.7/SocketServer.py
--- a/lib-python/2.7/SocketServer.py
+++ b/lib-python/2.7/SocketServer.py
@@ -121,11 +121,6 @@
 
 # Author of the BaseServer patch: Luke Kenneth Casson Leighton
 
-# XXX Warning!
-# There is a test suite for this module, but it cannot be run by the
-# standard regression test.
-# To run it manually, run Lib/test/test_socketserver.py.
-
 __version__ = "0.4"
 
 
@@ -296,6 +291,8 @@
             except:
                 self.handle_error(request, client_address)
                 self.shutdown_request(request)
+        else:
+            self.shutdown_request(request)
 
     def handle_timeout(self):
         """Called if no new request arrives within self.timeout.
@@ -642,7 +639,7 @@
     client address as self.client_address, and the server (in case it
     needs access to per-server information) as self.server.  Since a
     separate instance is created for each request, the handle() method
-    can define arbitrary other instance variariables.
+    can define other arbitrary instance variables.
 
     """
 
@@ -710,7 +707,7 @@
             try:
                 self.wfile.flush()
             except socket.error:
-                # An final socket error may have occurred here, such as
+                # A final socket error may have occurred here, such as
                 # the local error ECONNABORTED.
                 pass
         self.wfile.close()
@@ -719,9 +716,6 @@
 
 class DatagramRequestHandler(BaseRequestHandler):
 
-    # XXX Regrettably, I cannot get this working on Linux;
-    # s.recvfrom() doesn't return a meaningful client address.
-
     """Define self.rfile and self.wfile for datagram sockets."""
 
     def setup(self):
diff --git a/lib-python/2.7/_LWPCookieJar.py b/lib-python/2.7/_LWPCookieJar.py
--- a/lib-python/2.7/_LWPCookieJar.py
+++ b/lib-python/2.7/_LWPCookieJar.py
@@ -49,7 +49,7 @@
 class LWPCookieJar(FileCookieJar):
     """
     The LWPCookieJar saves a sequence of "Set-Cookie3" lines.
-    "Set-Cookie3" is the format used by the libwww-perl libary, not known
+    "Set-Cookie3" is the format used by the libwww-perl library, not known
     to be compatible with any browser, but which is easy to read and
     doesn't lose information about RFC 2965 cookies.
 
diff --git a/lib-python/2.7/_osx_support.py b/lib-python/2.7/_osx_support.py
--- a/lib-python/2.7/_osx_support.py
+++ b/lib-python/2.7/_osx_support.py
@@ -151,13 +151,13 @@
     #    can only be found inside Xcode.app if the "Command Line Tools"
     #    are not installed.
     #
-    #    Futhermore, the compiler that can be used varies between
+    #    Furthermore, the compiler that can be used varies between
     #    Xcode releases. Up to Xcode 4 it was possible to use 'gcc-4.2'
     #    as the compiler, after that 'clang' should be used because
     #    gcc-4.2 is either not present, or a copy of 'llvm-gcc' that
     #    miscompiles Python.
 
-    # skip checks if the compiler was overriden with a CC env variable
+    # skip checks if the compiler was overridden with a CC env variable
     if 'CC' in os.environ:
         return _config_vars
 
@@ -193,7 +193,7 @@
     if cc != oldcc:
         # Found a replacement compiler.
         # Modify config vars using new compiler, if not already explicitly
-        # overriden by an env variable, preserving additional arguments.
+        # overridden by an env variable, preserving additional arguments.
         for cv in _COMPILER_CONFIG_VARS:
             if cv in _config_vars and cv not in os.environ:
                 cv_split = _config_vars[cv].split()
@@ -207,7 +207,7 @@
     """Remove all universal build arguments from config vars"""
 
     for cv in _UNIVERSAL_CONFIG_VARS:
-        # Do not alter a config var explicitly overriden by env var
+        # Do not alter a config var explicitly overridden by env var
         if cv in _config_vars and cv not in os.environ:
             flags = _config_vars[cv]
             flags = re.sub('-arch\s+\w+\s', ' ', flags)
@@ -228,7 +228,7 @@
     # build extensions on OSX 10.7 and later with the prebuilt
     # 32-bit installer on the python.org website.
 
-    # skip checks if the compiler was overriden with a CC env variable
+    # skip checks if the compiler was overridden with a CC env variable
     if 'CC' in os.environ:
         return _config_vars
 
@@ -244,7 +244,7 @@
             # across Xcode and compiler versions, there is no reliable way
             # to be sure why it failed.  Assume here it was due to lack of
             # PPC support and remove the related '-arch' flags from each
-            # config variables not explicitly overriden by an environment
+            # config variables not explicitly overridden by an environment
             # variable.  If the error was for some other reason, we hope the
             # failure will show up again when trying to compile an extension
             # module.
@@ -292,7 +292,7 @@
         sdk = m.group(1)
         if not os.path.exists(sdk):
             for cv in _UNIVERSAL_CONFIG_VARS:
-                # Do not alter a config var explicitly overriden by env var
+                # Do not alter a config var explicitly overridden by env var
                 if cv in _config_vars and cv not in os.environ:
                     flags = _config_vars[cv]
                     flags = re.sub(r'-isysroot\s+\S+(?:\s|$)', ' ', flags)
diff --git a/lib-python/2.7/_pyio.py b/lib-python/2.7/_pyio.py
--- a/lib-python/2.7/_pyio.py
+++ b/lib-python/2.7/_pyio.py
@@ -277,8 +277,9 @@
     may raise a IOError when operations they do not support are called.
 
     The basic type used for binary data read from or written to a file is
-    bytes. bytearrays are accepted too, and in some cases (such as
-    readinto) needed. Text I/O classes work with str data.
+    the bytes type. Method arguments may also be bytearray or memoryview of
+    arrays of bytes. In some cases, such as readinto, a writable object such
+    as bytearray is required. Text I/O classes work with unicode data.
 
     Note that calling any method (even inquiries) on a closed stream is
     undefined. Implementations may raise IOError in this case.
@@ -420,7 +421,7 @@
         return self.__closed
 
     def _checkClosed(self, msg=None):
-        """Internal: raise an ValueError if file is closed
+        """Internal: raise a ValueError if file is closed
         """
         if self.closed:
             raise ValueError("I/O operation on closed file."
@@ -649,7 +650,6 @@
         Raises BlockingIOError if the underlying raw stream has no
         data at the moment.
         """
-        # XXX This ought to work with anything that supports the buffer API
         data = self.read(len(b))
         n = len(data)
         try:
@@ -664,8 +664,7 @@
     def write(self, b):
         """Write the given buffer to the IO stream.
 
-        Return the number of bytes written, which is never less than
-        len(b).
+        Return the number of bytes written, which is always len(b).
 
         Raises BlockingIOError if the buffer is full and the
         underlying raw stream cannot accept more data at the moment.
@@ -997,7 +996,7 @@
                 break
             avail += len(chunk)
             chunks.append(chunk)
-        # n is more then avail only when an EOF occurred or when
+        # n is more than avail only when an EOF occurred or when
         # read() would have blocked.
         n = min(n, avail)
         out = b"".join(chunks)
@@ -2022,7 +2021,7 @@
 
     def __repr__(self):
         # TextIOWrapper tells the encoding in its repr. In StringIO,
-        # that's a implementation detail.
+        # that's an implementation detail.
         return object.__repr__(self)
 
     @property
diff --git a/lib-python/2.7/_strptime.py b/lib-python/2.7/_strptime.py
--- a/lib-python/2.7/_strptime.py
+++ b/lib-python/2.7/_strptime.py
@@ -75,6 +75,8 @@
         self.__calc_date_time()
         if _getlang() != self.lang:
             raise ValueError("locale changed during initialization")
+        if time.tzname != self.tzname or time.daylight != self.daylight:
+            raise ValueError("timezone changed during initialization")
 
     def __pad(self, seq, front):
         # Add '' to seq to either the front (is True), else the back.
@@ -159,15 +161,17 @@
 
     def __calc_timezone(self):
         # Set self.timezone by using time.tzname.
-        # Do not worry about possibility of time.tzname[0] == timetzname[1]
-        # and time.daylight; handle that in strptime .
+        # Do not worry about possibility of time.tzname[0] == time.tzname[1]
+        # and time.daylight; handle that in strptime.
         try:
             time.tzset()
         except AttributeError:
             pass
-        no_saving = frozenset(["utc", "gmt", time.tzname[0].lower()])
-        if time.daylight:
-            has_saving = frozenset([time.tzname[1].lower()])
+        self.tzname = time.tzname
+        self.daylight = time.daylight
+        no_saving = frozenset(["utc", "gmt", self.tzname[0].lower()])
+        if self.daylight:
+            has_saving = frozenset([self.tzname[1].lower()])
         else:
             has_saving = frozenset()
         self.timezone = (no_saving, has_saving)
@@ -296,12 +300,15 @@
     """Return a time struct based on the input string and the format string."""
     global _TimeRE_cache, _regex_cache
     with _cache_lock:
-        if _getlang() != _TimeRE_cache.locale_time.lang:
+        locale_time = _TimeRE_cache.locale_time
+        if (_getlang() != locale_time.lang or
+            time.tzname != locale_time.tzname or
+            time.daylight != locale_time.daylight):
             _TimeRE_cache = TimeRE()
             _regex_cache.clear()
+            locale_time = _TimeRE_cache.locale_time
         if len(_regex_cache) > _CACHE_MAX_SIZE:
             _regex_cache.clear()
-        locale_time = _TimeRE_cache.locale_time
         format_regex = _regex_cache.get(format)
         if not format_regex:
             try:
@@ -438,6 +445,10 @@
         week_starts_Mon = True if week_of_year_start == 0 else False
         julian = _calc_julian_from_U_or_W(year, week_of_year, weekday,
                                             week_starts_Mon)
+        if julian <= 0:
+            year -= 1
+            yday = 366 if calendar.isleap(year) else 365
+            julian += yday
     # Cannot pre-calculate datetime_date() since can change in Julian
     # calculation and thus could have different value for the day of the week
     # calculation.
diff --git a/lib-python/2.7/base64.py b/lib-python/2.7/base64.py
--- a/lib-python/2.7/base64.py
+++ b/lib-python/2.7/base64.py
@@ -64,9 +64,10 @@
     length 2 (additional characters are ignored) which specifies the
     alternative alphabet used instead of the '+' and '/' characters.
 
-    The decoded string is returned.  A TypeError is raised if s were
-    incorrectly padded or if there are non-alphabet characters present in the
-    string.
+    The decoded string is returned.  A TypeError is raised if s is
+    incorrectly padded.  Characters that are neither in the normal base-64
+    alphabet nor the alternative alphabet are discarded prior to the padding
+    check.
     """
     if altchars is not None:
         s = s.translate(string.maketrans(altchars[:2], '+/'))
@@ -87,9 +88,10 @@
 def standard_b64decode(s):
     """Decode a string encoded with the standard Base64 alphabet.
 
-    s is the string to decode.  The decoded string is returned.  A TypeError
-    is raised if the string is incorrectly padded or if there are non-alphabet
-    characters present in the string.
+    Argument s is the string to decode.  The decoded string is returned.  A
+    TypeError is raised if the string is incorrectly padded.  Characters that
+    are not in the standard alphabet are discarded prior to the padding
+    check.
     """
     return b64decode(s)
 
@@ -97,19 +99,20 @@
 _urlsafe_decode_translation = string.maketrans(b'-_', b'+/')
 
 def urlsafe_b64encode(s):
-    """Encode a string using a url-safe Base64 alphabet.
+    """Encode a string using the URL- and filesystem-safe Base64 alphabet.
 
-    s is the string to encode.  The encoded string is returned.  The alphabet
-    uses '-' instead of '+' and '_' instead of '/'.
+    Argument s is the string to encode.  The encoded string is returned.  The
+    alphabet uses '-' instead of '+' and '_' instead of '/'.
     """
     return b64encode(s).translate(_urlsafe_encode_translation)
 
 def urlsafe_b64decode(s):
-    """Decode a string encoded with the standard Base64 alphabet.
+    """Decode a string using the URL- and filesystem-safe Base64 alphabet.
 
-    s is the string to decode.  The decoded string is returned.  A TypeError
-    is raised if the string is incorrectly padded or if there are non-alphabet
-    characters present in the string.
+    Argument s is the string to decode.  The decoded string is returned.  A
+    TypeError is raised if the string is incorrectly padded.  Characters that
+    are not in the URL-safe base-64 alphabet, and are not a plus '+' or slash
+    '/', are discarded prior to the padding check.
 
     The alphabet uses '-' instead of '+' and '_' instead of '/'.
     """
@@ -267,7 +270,7 @@
     a lowercase alphabet is acceptable as input.  For security purposes, the
     default is False.
 
-    The decoded string is returned.  A TypeError is raised if s were
+    The decoded string is returned.  A TypeError is raised if s is
     incorrectly padded or if there are non-alphabet characters present in the
     string.
     """
diff --git a/lib-python/2.7/bsddb/test/test_all.py 
b/lib-python/2.7/bsddb/test/test_all.py
--- a/lib-python/2.7/bsddb/test/test_all.py
+++ b/lib-python/2.7/bsddb/test/test_all.py
@@ -523,7 +523,7 @@
     return path
 
 
-# This path can be overriden via "set_test_path_prefix()".
+# This path can be overridden via "set_test_path_prefix()".
 import os, os.path
 get_new_path.prefix=os.path.join(os.environ.get("TMPDIR",
     os.path.join(os.sep,"tmp")), "z-Berkeley_DB")
diff --git a/lib-python/2.7/bsddb/test/test_lock.py 
b/lib-python/2.7/bsddb/test/test_lock.py
--- a/lib-python/2.7/bsddb/test/test_lock.py
+++ b/lib-python/2.7/bsddb/test/test_lock.py
@@ -41,7 +41,7 @@
             print "locker ID: %s" % anID
         lock = self.env.lock_get(anID, "some locked thing", db.DB_LOCK_WRITE)
         if verbose:
-            print "Aquired lock: %s" % lock
+            print "Acquired lock: %s" % lock
         self.env.lock_put(lock)
         if verbose:
             print "Released lock: %s" % lock
@@ -158,7 +158,7 @@
         for i in xrange(1000) :
             lock = self.env.lock_get(anID, "some locked thing", lockType)
             if verbose:
-                print "%s: Aquired %s lock: %s" % (name, lt, lock)
+                print "%s: Acquired %s lock: %s" % (name, lt, lock)
 
             self.env.lock_put(lock)
             if verbose:
diff --git a/lib-python/2.7/calendar.py b/lib-python/2.7/calendar.py
--- a/lib-python/2.7/calendar.py
+++ b/lib-python/2.7/calendar.py
@@ -142,7 +142,7 @@
 
     def iterweekdays(self):
         """
-        Return a iterator for one week of weekday numbers starting with the
+        Return an iterator for one week of weekday numbers starting with the
         configured first one.
         """
         for i in range(self.firstweekday, self.firstweekday + 7):
diff --git a/lib-python/2.7/cgi.py b/lib-python/2.7/cgi.py
--- a/lib-python/2.7/cgi.py
+++ b/lib-python/2.7/cgi.py
@@ -175,7 +175,7 @@
 
 
 # parse query string function called from urlparse,
-# this is done in order to maintain backward compatiblity.
+# this is done in order to maintain backward compatibility.
 
 def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
     """Parse a query given as a string argument."""
diff --git a/lib-python/2.7/collections.py b/lib-python/2.7/collections.py
--- a/lib-python/2.7/collections.py
+++ b/lib-python/2.7/collections.py
@@ -1,3 +1,15 @@
+'''This module implements specialized container datatypes providing
+alternatives to Python's general purpose built-in containers, dict,
+list, set, and tuple.
+
+* namedtuple   factory function for creating tuple subclasses with named fields
+* deque        list-like container with fast appends and pops on either end
+* Counter      dict subclass for counting hashable objects
+* OrderedDict  dict subclass that remembers the order entries were added
+* defaultdict  dict subclass that calls a factory function to supply missing 
values
+
+'''
+
 __all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict']
 # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py.
 # They should however be considered an integral part of collections.py.
@@ -302,7 +314,7 @@
     >>> x, y = p                        # unpack like a regular tuple
     >>> x, y
     (11, 22)
-    >>> p.x + p.y                       # fields also accessable by name
+    >>> p.x + p.y                       # fields also accessible by name
     33
     >>> d = p._asdict()                 # convert to a dictionary
     >>> d['x']
diff --git a/lib-python/2.7/copy.py b/lib-python/2.7/copy.py
--- a/lib-python/2.7/copy.py
+++ b/lib-python/2.7/copy.py
@@ -315,7 +315,7 @@
     if n > 2:
         state = info[2]
     else:
-        state = {}
+        state = None
     if n > 3:
         listiter = info[3]
     else:
@@ -329,7 +329,7 @@
     y = callable(*args)
     memo[id(x)] = y
 
-    if state:
+    if state is not None:
         if deep:
             state = deepcopy(state, memo)
         if hasattr(y, '__setstate__'):
diff --git a/lib-python/2.7/ctypes/__init__.py 
b/lib-python/2.7/ctypes/__init__.py
--- a/lib-python/2.7/ctypes/__init__.py
+++ b/lib-python/2.7/ctypes/__init__.py
@@ -1,6 +1,3 @@
-######################################################################
-#  This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
 """create and manipulate C data types in Python"""
 
 import os as _os, sys as _sys
@@ -386,8 +383,8 @@
         return func
 
 class PyDLL(CDLL):
-    """This class represents the Python library itself.  It allows to
-    access Python API functions.  The GIL is not released, and
+    """This class represents the Python library itself.  It allows
+    accessing Python API functions.  The GIL is not released, and
     Python exceptions are handled correctly.
     """
     _func_flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI
diff --git a/lib-python/2.7/ctypes/_endian.py b/lib-python/2.7/ctypes/_endian.py
--- a/lib-python/2.7/ctypes/_endian.py
+++ b/lib-python/2.7/ctypes/_endian.py
@@ -1,6 +1,3 @@
-######################################################################
-#  This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
 import sys
 from ctypes import *
 
diff --git a/lib-python/2.7/ctypes/macholib/README.ctypes 
b/lib-python/2.7/ctypes/macholib/README.ctypes
--- a/lib-python/2.7/ctypes/macholib/README.ctypes
+++ b/lib-python/2.7/ctypes/macholib/README.ctypes
@@ -1,4 +1,4 @@
-Files in this directory from from Bob Ippolito's py2app.
+Files in this directory come from Bob Ippolito's py2app.
 
 License: Any components of the py2app suite may be distributed under
 the MIT or PSF open source licenses.
diff --git a/lib-python/2.7/ctypes/macholib/__init__.py 
b/lib-python/2.7/ctypes/macholib/__init__.py
--- a/lib-python/2.7/ctypes/macholib/__init__.py
+++ b/lib-python/2.7/ctypes/macholib/__init__.py
@@ -1,6 +1,3 @@
-######################################################################
-#  This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
 """
 Enough Mach-O to make your head spin.
 
diff --git a/lib-python/2.7/ctypes/macholib/dyld.py 
b/lib-python/2.7/ctypes/macholib/dyld.py
--- a/lib-python/2.7/ctypes/macholib/dyld.py
+++ b/lib-python/2.7/ctypes/macholib/dyld.py
@@ -1,6 +1,3 @@
-######################################################################
-#  This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
 """
 dyld emulation
 """
diff --git a/lib-python/2.7/ctypes/macholib/dylib.py 
b/lib-python/2.7/ctypes/macholib/dylib.py
--- a/lib-python/2.7/ctypes/macholib/dylib.py
+++ b/lib-python/2.7/ctypes/macholib/dylib.py
@@ -1,6 +1,3 @@
-######################################################################
-#  This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
 """
 Generic dylib path manipulation
 """
diff --git a/lib-python/2.7/ctypes/macholib/framework.py 
b/lib-python/2.7/ctypes/macholib/framework.py
--- a/lib-python/2.7/ctypes/macholib/framework.py
+++ b/lib-python/2.7/ctypes/macholib/framework.py
@@ -1,6 +1,3 @@
-######################################################################
-#  This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
 """
 Generic framework path manipulation
 """
diff --git a/lib-python/2.7/ctypes/test/test_arrays.py 
b/lib-python/2.7/ctypes/test/test_arrays.py
--- a/lib-python/2.7/ctypes/test/test_arrays.py
+++ b/lib-python/2.7/ctypes/test/test_arrays.py
@@ -24,20 +24,24 @@
             self.assertEqual(len(ia), alen)
 
             # slot values ok?
-            values = [ia[i] for i in range(len(init))]
+            values = [ia[i] for i in range(alen)]
             self.assertEqual(values, init)
 
+            # out-of-bounds accesses should be caught
+            with self.assertRaises(IndexError): ia[alen]
+            with self.assertRaises(IndexError): ia[-alen-1]
+
             # change the items
             from operator import setitem
             new_values = range(42, 42+alen)
             [setitem(ia, n, new_values[n]) for n in range(alen)]
-            values = [ia[i] for i in range(len(init))]
+            values = [ia[i] for i in range(alen)]
             self.assertEqual(values, new_values)
 
             # are the items initialized to 0?
             ia = int_array()
-            values = [ia[i] for i in range(len(init))]
-            self.assertEqual(values, [0] * len(init))
+            values = [ia[i] for i in range(alen)]
+            self.assertEqual(values, [0] * alen)
 
             # Too many initializers should be caught
             self.assertRaises(IndexError, int_array, *range(alen*2))
diff --git a/lib-python/2.7/ctypes/test/test_pointers.py 
b/lib-python/2.7/ctypes/test/test_pointers.py
--- a/lib-python/2.7/ctypes/test/test_pointers.py
+++ b/lib-python/2.7/ctypes/test/test_pointers.py
@@ -53,9 +53,13 @@
         # C code:
         #   int x = 12321;
         #   res = &x
-        res.contents = c_int(12321)
+        x = c_int(12321)
+        res.contents = x
         self.assertEqual(i.value, 54345)
 
+        x.value = -99
+        self.assertEqual(res.contents.value, -99)
+
     def test_callbacks_with_pointers(self):
         # a function type receiving a pointer
         PROTOTYPE = CFUNCTYPE(c_int, POINTER(c_int))
@@ -128,9 +132,10 @@
 
     def test_basic(self):
         p = pointer(c_int(42))
-        # Although a pointer can be indexed, it ha no length
+        # Although a pointer can be indexed, it has no length
         self.assertRaises(TypeError, len, p)
         self.assertEqual(p[0], 42)
+        self.assertEqual(p[0:1], [42])
         self.assertEqual(p.contents.value, 42)
 
     def test_charpp(self):
diff --git a/lib-python/2.7/ctypes/test/test_structures.py 
b/lib-python/2.7/ctypes/test/test_structures.py
--- a/lib-python/2.7/ctypes/test/test_structures.py
+++ b/lib-python/2.7/ctypes/test/test_structures.py
@@ -326,6 +326,7 @@
                                  "(Phone) <type 'exceptions.TypeError'>: "
                                  "expected string or Unicode object, int 
found")
         else:
+            # Compatibility no longer strictly required
             self.assertEqual(msg,
                                  "(Phone) exceptions.TypeError: "
                                  "expected string or Unicode object, int 
found")
diff --git a/lib-python/2.7/ctypes/test/test_values.py 
b/lib-python/2.7/ctypes/test/test_values.py
--- a/lib-python/2.7/ctypes/test/test_values.py
+++ b/lib-python/2.7/ctypes/test/test_values.py
@@ -22,8 +22,7 @@
         ctdll = CDLL(_ctypes_test.__file__)
         self.assertRaises(ValueError, c_int.in_dll, ctdll, "Undefined_Symbol")
 
-@unittest.skipUnless(sys.platform == 'win32', 'Windows-specific test')
-class Win_ValuesTestCase(unittest.TestCase):
+class PythonValuesTestCase(unittest.TestCase):
     """This test only works when python itself is a dll/shared library"""
 
     def test_optimizeflag(self):
diff --git a/lib-python/2.7/ctypes/util.py b/lib-python/2.7/ctypes/util.py
--- a/lib-python/2.7/ctypes/util.py
+++ b/lib-python/2.7/ctypes/util.py
@@ -1,6 +1,3 @@
-######################################################################
-#  This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
 import sys, os
 
 # find_library(name) returns the pathname of a library, or None.
@@ -137,16 +134,13 @@
             cmd = 'if ! type objdump >/dev/null 2>&1; then exit 10; fi;' \
                   "objdump -p -j .dynamic 2>/dev/null " + f
             f = os.popen(cmd)
-            dump = f.read()
-            rv = f.close()
+            try:
+                dump = f.read()
+            finally:
+                rv = f.close()
             if rv == 10:
                 raise OSError, 'objdump command not found'
-            f = os.popen(cmd)
-            try:
-                data = f.read()
-            finally:
-                f.close()
-            res = re.search(r'\sSONAME\s+([^\s]+)', data)
+            res = re.search(r'\sSONAME\s+([^\s]+)', dump)
             if not res:
                 return None
             return res.group(1)
@@ -191,6 +185,7 @@
             else:
                 cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null'
 
+            paths = None
             for line in os.popen(cmd).readlines():
                 line = line.strip()
                 if line.startswith('Default Library Path (ELF):'):
@@ -228,7 +223,7 @@
 
             # XXX assuming GLIBC's ldconfig (with option -p)
             expr = r'\s+(lib%s\.[^\s]+)\s+\(%s' % (re.escape(name), abi_type)
-            f = os.popen('/sbin/ldconfig -p 2>/dev/null')
+            f = os.popen('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null')
             try:
                 data = f.read()
             finally:
diff --git a/lib-python/2.7/ctypes/wintypes.py 
b/lib-python/2.7/ctypes/wintypes.py
--- a/lib-python/2.7/ctypes/wintypes.py
+++ b/lib-python/2.7/ctypes/wintypes.py
@@ -1,7 +1,3 @@
-######################################################################
-#  This file should be kept compatible with Python 2.3, see PEP 291. #
-######################################################################
-
 # The most useful windows datatypes
 from ctypes import *
 
diff --git a/lib-python/2.7/decimal.py b/lib-python/2.7/decimal.py
--- a/lib-python/2.7/decimal.py
+++ b/lib-python/2.7/decimal.py
@@ -224,7 +224,7 @@
 class ConversionSyntax(InvalidOperation):
     """Trying to convert badly formed string.
 
-    This occurs and signals invalid-operation if an string is being
+    This occurs and signals invalid-operation if a string is being
     converted to a number and it does not conform to the numeric string
     syntax.  The result is [0,qNaN].
     """
@@ -1082,7 +1082,7 @@
     def __pos__(self, context=None):
         """Returns a copy, unless it is a sNaN.
 
-        Rounds the number (if more then precision digits)
+        Rounds the number (if more than precision digits)
         """
         if self._is_special:
             ans = self._check_nans(context=context)
diff --git a/lib-python/2.7/difflib.py b/lib-python/2.7/difflib.py
--- a/lib-python/2.7/difflib.py
+++ b/lib-python/2.7/difflib.py
@@ -1487,7 +1487,7 @@
                 yield _make_line(lines,'-',0), None, True
                 continue
             elif s.startswith(('--?+', '--+', '- ')):
-                # in delete block and see a intraline change or unchanged line
+                # in delete block and see an intraline change or unchanged line
                 # coming: yield the delete line and then blanks
                 from_line,to_line = _make_line(lines,'-',0), None
                 num_blanks_to_yield,num_blanks_pending = num_blanks_pending-1,0
diff --git a/lib-python/2.7/distutils/ccompiler.py 
b/lib-python/2.7/distutils/ccompiler.py
--- a/lib-python/2.7/distutils/ccompiler.py
+++ b/lib-python/2.7/distutils/ccompiler.py
@@ -842,8 +842,9 @@
     def library_filename(self, libname, lib_type='static',     # or 'shared'
                          strip_dir=0, output_dir=''):
         assert output_dir is not None
-        if lib_type not in ("static", "shared", "dylib"):
-            raise ValueError, "'lib_type' must be \"static\", \"shared\" or 
\"dylib\""
+        if lib_type not in ("static", "shared", "dylib", "xcode_stub"):
+            raise ValueError, ("""'lib_type' must be "static", "shared", """
+                               """"dylib", or "xcode_stub".""")
         fmt = getattr(self, lib_type + "_lib_format")
         ext = getattr(self, lib_type + "_lib_extension")
 
diff --git a/lib-python/2.7/distutils/cygwinccompiler.py 
b/lib-python/2.7/distutils/cygwinccompiler.py
--- a/lib-python/2.7/distutils/cygwinccompiler.py
+++ b/lib-python/2.7/distutils/cygwinccompiler.py
@@ -10,9 +10,9 @@
 #
 # * if you use a msvc compiled python version (1.5.2)
 #   1. you have to insert a __GNUC__ section in its config.h
-#   2. you have to generate a import library for its dll
+#   2. you have to generate an import library for its dll
 #      - create a def-file for python??.dll
-#      - create a import library using
+#      - create an import library using
 #             dlltool --dllname python15.dll --def python15.def \
 #                       --output-lib libpython15.a
 #
diff --git a/lib-python/2.7/distutils/msvc9compiler.py 
b/lib-python/2.7/distutils/msvc9compiler.py
--- a/lib-python/2.7/distutils/msvc9compiler.py
+++ b/lib-python/2.7/distutils/msvc9compiler.py
@@ -54,7 +54,7 @@
 
 # A map keyed by get_platform() return values to values accepted by
 # 'vcvarsall.bat'.  Note a cross-compile may combine these (eg, 'x86_amd64' is
-# the param to cross-compile on x86 targetting amd64.)
+# the param to cross-compile on x86 targeting amd64.)
 PLAT_TO_VCVARS = {
     'win32' : 'x86',
     'win-amd64' : 'amd64',
diff --git a/lib-python/2.7/distutils/tests/test_build_ext.py 
b/lib-python/2.7/distutils/tests/test_build_ext.py
--- a/lib-python/2.7/distutils/tests/test_build_ext.py
+++ b/lib-python/2.7/distutils/tests/test_build_ext.py
@@ -251,7 +251,7 @@
 
     def test_compiler_option(self):
         # cmd.compiler is an option and
-        # should not be overriden by a compiler instance
+        # should not be overridden by a compiler instance
         # when the command is run
         dist = Distribution()
         cmd = build_ext(dist)
diff --git a/lib-python/2.7/distutils/tests/test_unixccompiler.py 
b/lib-python/2.7/distutils/tests/test_unixccompiler.py
--- a/lib-python/2.7/distutils/tests/test_unixccompiler.py
+++ b/lib-python/2.7/distutils/tests/test_unixccompiler.py
@@ -135,7 +135,7 @@
         self.assertEqual(self.cc.linker_so[0], 'my_cc')
 
     @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for OS 
X')
-    def test_osx_explict_ldshared(self):
+    def test_osx_explicit_ldshared(self):
         # Issue #18080:
         # ensure that setting CC env variable does not change
         #   explicit LDSHARED setting for linker
diff --git a/lib-python/2.7/distutils/unixccompiler.py 
b/lib-python/2.7/distutils/unixccompiler.py
--- a/lib-python/2.7/distutils/unixccompiler.py
+++ b/lib-python/2.7/distutils/unixccompiler.py
@@ -79,7 +79,9 @@
     static_lib_extension = ".a"
     shared_lib_extension = ".so"
     dylib_lib_extension = ".dylib"
+    xcode_stub_lib_extension = ".tbd"
     static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
+    xcode_stub_lib_format = dylib_lib_format
     if sys.platform == "cygwin":
         exe_extension = ".exe"
 
@@ -245,12 +247,28 @@
     def find_library_file(self, dirs, lib, debug=0):
         shared_f = self.library_filename(lib, lib_type='shared')
         dylib_f = self.library_filename(lib, lib_type='dylib')
+        xcode_stub_f = self.library_filename(lib, lib_type='xcode_stub')
         static_f = self.library_filename(lib, lib_type='static')
 
         if sys.platform == 'darwin':
             # On OSX users can specify an alternate SDK using
             # '-isysroot', calculate the SDK root if it is specified
             # (and use it further on)
+            #
+            # Note that, as of Xcode 7, Apple SDKs may contain textual stub
+            # libraries with .tbd extensions rather than the normal .dylib
+            # shared libraries installed in /.  The Apple compiler tool
+            # chain handles this transparently but it can cause problems
+            # for programs that are being built with an SDK and searching
+            # for specific libraries.  Callers of find_library_file need to
+            # keep in mind that the base filename of the returned SDK library
+            # file might have a different extension from that of the library
+            # file installed on the running system, for example:
+            #   /Applications/Xcode.app/Contents/Developer/Platforms/
+            #       MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
+            #       usr/lib/libedit.tbd
+            # vs
+            #   /usr/lib/libedit.dylib
             cflags = sysconfig.get_config_var('CFLAGS')
             m = re.search(r'-isysroot\s+(\S+)', cflags)
             if m is None:
@@ -264,6 +282,7 @@
             shared = os.path.join(dir, shared_f)
             dylib = os.path.join(dir, dylib_f)
             static = os.path.join(dir, static_f)
+            xcode_stub = os.path.join(dir, xcode_stub_f)
 
             if sys.platform == 'darwin' and (
                 dir.startswith('/System/') or (
@@ -272,6 +291,7 @@
                 shared = os.path.join(sysroot, dir[1:], shared_f)
                 dylib = os.path.join(sysroot, dir[1:], dylib_f)
                 static = os.path.join(sysroot, dir[1:], static_f)
+                xcode_stub = os.path.join(sysroot, dir[1:], xcode_stub_f)
 
             # We're second-guessing the linker here, with not much hard
             # data to go on: GCC seems to prefer the shared library, so I'm
@@ -279,6 +299,8 @@
             # ignoring even GCC's "-static" option.  So sue me.
             if os.path.exists(dylib):
                 return dylib
+            elif os.path.exists(xcode_stub):
+                return xcode_stub
             elif os.path.exists(shared):
                 return shared
             elif os.path.exists(static):
diff --git a/lib-python/2.7/email/message.py b/lib-python/2.7/email/message.py
--- a/lib-python/2.7/email/message.py
+++ b/lib-python/2.7/email/message.py
@@ -579,7 +579,7 @@
         message, it will be set to "text/plain" and the new parameter and
         value will be appended as per RFC 2045.
 
-        An alternate header can specified in the header argument, and all
+        An alternate header can be specified in the header argument, and all
         parameters will be quoted as necessary unless requote is False.
 
         If charset is specified, the parameter will be encoded according to RFC
diff --git a/lib-python/2.7/email/parser.py b/lib-python/2.7/email/parser.py
--- a/lib-python/2.7/email/parser.py
+++ b/lib-python/2.7/email/parser.py
@@ -23,7 +23,7 @@
         textual representation of the message.
 
         The string must be formatted as a block of RFC 2822 headers and header
-        continuation lines, optionally preceeded by a `Unix-from' header.  The
+        continuation lines, optionally preceded by a `Unix-from' header.  The
         header block is terminated either by the end of the string or by a
         blank line.
 
diff --git a/lib-python/2.7/encodings/utf_32.py 
b/lib-python/2.7/encodings/utf_32.py
--- a/lib-python/2.7/encodings/utf_32.py
+++ b/lib-python/2.7/encodings/utf_32.py
@@ -68,7 +68,7 @@
         self.decoder = None
 
     def getstate(self):
-        # additonal state info from the base class must be None here,
+        # additional state info from the base class must be None here,
         # as it isn't passed along to the caller
         state = codecs.BufferedIncrementalDecoder.getstate(self)[0]
         # additional state info we pass to the caller:
diff --git a/lib-python/2.7/ensurepip/__init__.py 
b/lib-python/2.7/ensurepip/__init__.py
--- a/lib-python/2.7/ensurepip/__init__.py
+++ b/lib-python/2.7/ensurepip/__init__.py
@@ -12,9 +12,9 @@
 __all__ = ["version", "bootstrap"]
 
 
-_SETUPTOOLS_VERSION = "18.2"
+_SETUPTOOLS_VERSION = "20.10.1"
 
-_PIP_VERSION = "7.1.2"
+_PIP_VERSION = "8.1.1"
 
 # pip currently requires ssl support, so we try to provide a nicer
 # error message when that is missing (http://bugs.python.org/issue19744)
diff --git a/lib-python/2.7/ensurepip/_bundled/pip-7.1.2-py2.py3-none-any.whl 
b/lib-python/2.7/ensurepip/_bundled/pip-7.1.2-py2.py3-none-any.whl
deleted file mode 100644
index 
5e490155f0ca7f4ddb64c93c39fb2efb8795cd08..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch

[cut]

diff --git a/lib-python/2.7/ensurepip/_bundled/pip-8.1.1-py2.py3-none-any.whl 
b/lib-python/2.7/ensurepip/_bundled/pip-8.1.1-py2.py3-none-any.whl
new file mode 100644
index 
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8632eb7af04c6337f0442a878ecb99cd2b1a67e0
GIT binary patch

[cut]

diff --git 
a/lib-python/2.7/ensurepip/_bundled/setuptools-18.2-py2.py3-none-any.whl 
b/lib-python/2.7/ensurepip/_bundled/setuptools-18.2-py2.py3-none-any.whl
deleted file mode 100644
index 
f4288d68e074466894d8a2342e113737df7b7649..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch

[cut]

diff --git 
a/lib-python/2.7/ensurepip/_bundled/setuptools-20.10.1-py2.py3-none-any.whl 
b/lib-python/2.7/ensurepip/_bundled/setuptools-20.10.1-py2.py3-none-any.whl
new file mode 100644
index 
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9d1319a24aba103fe956ef6298e3649efacc0b93
GIT binary patch

[cut]

diff --git a/lib-python/2.7/fileinput.py b/lib-python/2.7/fileinput.py
--- a/lib-python/2.7/fileinput.py
+++ b/lib-python/2.7/fileinput.py
@@ -64,13 +64,6 @@
 disabled when standard input is read.  XXX The current implementation
 does not work for MS-DOS 8+3 filesystems.
 
-Performance: this module is unfortunately one of the slower ways of
-processing large numbers of input lines.  Nevertheless, a significant
-speed-up has been obtained by using readlines(bufsize) instead of
-readline().  A new keyword argument, bufsize=N, is present on the
-input() function and the FileInput() class to override the default
-buffer size.
-
 XXX Possible additions:
 
 - optional getopt argument processing
@@ -86,6 +79,7 @@
 
 _state = None
 
+# No longer used
 DEFAULT_BUFSIZE = 8*1024
 
 def input(files=None, inplace=0, backup="", bufsize=0,
@@ -207,17 +201,14 @@
         self._files = files
         self._inplace = inplace
         self._backup = backup
-        self._bufsize = bufsize or DEFAULT_BUFSIZE
         self._savestdout = None
         self._output = None
         self._filename = None
-        self._lineno = 0
+        self._startlineno = 0
         self._filelineno = 0
         self._file = None
         self._isstdin = False
         self._backupfilename = None
-        self._buffer = []
-        self._bufindex = 0
         # restrict mode argument to reading modes
         if mode not in ('r', 'rU', 'U', 'rb'):
             raise ValueError("FileInput opening mode must be one of "
@@ -242,22 +233,18 @@
         return self
 
     def next(self):
-        try:
-            line = self._buffer[self._bufindex]
-        except IndexError:
-            pass
-        else:
-            self._bufindex += 1
-            self._lineno += 1
-            self._filelineno += 1
-            return line
-        line = self.readline()
-        if not line:
-            raise StopIteration
-        return line
+        while 1:
+            line = self._readline()
+            if line:
+                self._filelineno += 1
+                return line
+            if not self._file:
+                raise StopIteration
+            self.nextfile()
+            # repeat with next file
 
     def __getitem__(self, i):
-        if i != self._lineno:
+        if i != self.lineno():
             raise RuntimeError, "accessing lines out of order"
         try:
             return self.next()
@@ -277,7 +264,11 @@
                 output.close()
         finally:
             file = self._file
-            self._file = 0
+            self._file = None
+            try:
+                del self._readline  # restore FileInput._readline
+            except AttributeError:
+                pass
             try:
                 if file and not self._isstdin:
                     file.close()
@@ -289,75 +280,72 @@
                     except OSError: pass
 
                 self._isstdin = False
-                self._buffer = []
-                self._bufindex = 0
 
     def readline(self):
-        try:
-            line = self._buffer[self._bufindex]
-        except IndexError:
-            pass
+        while 1:
+            line = self._readline()
+            if line:
+                self._filelineno += 1
+                return line
+            if not self._file:
+                return line
+            self.nextfile()
+            # repeat with next file
+
+    def _readline(self):
+        if not self._files:
+            return ""
+        self._filename = self._files[0]
+        self._files = self._files[1:]
+        self._startlineno = self.lineno()
+        self._filelineno = 0
+        self._file = None
+        self._isstdin = False
+        self._backupfilename = 0
+        if self._filename == '-':
+            self._filename = '<stdin>'
+            self._file = sys.stdin
+            self._isstdin = True
         else:
-            self._bufindex += 1
-            self._lineno += 1
-            self._filelineno += 1
-            return line
-        if not self._file:
-            if not self._files:
-                return ""
-            self._filename = self._files[0]
-            self._files = self._files[1:]
-            self._filelineno = 0
-            self._file = None
-            self._isstdin = False
-            self._backupfilename = 0
-            if self._filename == '-':
-                self._filename = '<stdin>'
-                self._file = sys.stdin
-                self._isstdin = True
+            if self._inplace:
+                self._backupfilename = (
+                    self._filename + (self._backup or os.extsep+"bak"))
+                try: os.unlink(self._backupfilename)
+                except os.error: pass
+                # The next few lines may raise IOError
+                os.rename(self._filename, self._backupfilename)
+                self._file = open(self._backupfilename, self._mode)
+                try:
+                    perm = os.fstat(self._file.fileno()).st_mode
+                except OSError:
+                    self._output = open(self._filename, "w")
+                else:
+                    fd = os.open(self._filename,
+                                    os.O_CREAT | os.O_WRONLY | os.O_TRUNC,
+                                    perm)
+                    self._output = os.fdopen(fd, "w")
+                    try:
+                        if hasattr(os, 'chmod'):
+                            os.chmod(self._filename, perm)
+                    except OSError:
+                        pass
+                self._savestdout = sys.stdout
+                sys.stdout = self._output
             else:
-                if self._inplace:
-                    self._backupfilename = (
-                        self._filename + (self._backup or os.extsep+"bak"))
-                    try: os.unlink(self._backupfilename)
-                    except os.error: pass
-                    # The next few lines may raise IOError
-                    os.rename(self._filename, self._backupfilename)
-                    self._file = open(self._backupfilename, self._mode)
-                    try:
-                        perm = os.fstat(self._file.fileno()).st_mode
-                    except OSError:
-                        self._output = open(self._filename, "w")
-                    else:
-                        fd = os.open(self._filename,
-                                     os.O_CREAT | os.O_WRONLY | os.O_TRUNC,
-                                     perm)
-                        self._output = os.fdopen(fd, "w")
-                        try:
-                            if hasattr(os, 'chmod'):
-                                os.chmod(self._filename, perm)
-                        except OSError:
-                            pass
-                    self._savestdout = sys.stdout
-                    sys.stdout = self._output
+                # This may raise IOError
+                if self._openhook:
+                    self._file = self._openhook(self._filename, self._mode)
                 else:
-                    # This may raise IOError
-                    if self._openhook:
-                        self._file = self._openhook(self._filename, self._mode)
-                    else:
-                        self._file = open(self._filename, self._mode)
-        self._buffer = self._file.readlines(self._bufsize)
-        self._bufindex = 0
-        if not self._buffer:
-            self.nextfile()
-        # Recursive call
-        return self.readline()
+                    self._file = open(self._filename, self._mode)
+
+        self._readline = self._file.readline  # hide FileInput._readline
+        return self._readline()
 
     def filename(self):
         return self._filename
 
     def lineno(self):
-        return self._lineno
+        return self._startlineno + self._filelineno
 
     def filelineno(self):
         return self._filelineno
diff --git a/lib-python/2.7/getopt.py b/lib-python/2.7/getopt.py
--- a/lib-python/2.7/getopt.py
+++ b/lib-python/2.7/getopt.py
@@ -28,7 +28,7 @@
 # - RETURN_IN_ORDER option
 # - GNU extension with '-' as first character of option string
 # - optional arguments, specified by double colons
-# - a option string with a W followed by semicolon should
+# - an option string with a W followed by semicolon should
 #   treat "-W foo" as "--foo"
 
 __all__ = ["GetoptError","error","getopt","gnu_getopt"]
diff --git a/lib-python/2.7/gzip.py b/lib-python/2.7/gzip.py
--- a/lib-python/2.7/gzip.py
+++ b/lib-python/2.7/gzip.py
@@ -55,7 +55,7 @@
         a file object.
 
         When fileobj is not None, the filename argument is only used to be
-        included in the gzip file header, which may includes the original
+        included in the gzip file header, which may include the original
         filename of the uncompressed file.  It defaults to the filename of
         fileobj, if discernible; otherwise, it defaults to the empty string,
         and in this case the original filename is not included in the header.
diff --git a/lib-python/2.7/heapq.py b/lib-python/2.7/heapq.py
--- a/lib-python/2.7/heapq.py
+++ b/lib-python/2.7/heapq.py
@@ -56,7 +56,7 @@
 
 
 In the tree above, each cell `k' is topping `2*k+1' and `2*k+2'.  In
-an usual binary tournament we see in sports, each cell is the winner
+a usual binary tournament we see in sports, each cell is the winner
 over the two cells it tops, and we can trace the winner down the tree
 to see all opponents s/he had.  However, in many computer applications
 of such tournaments, we do not need to trace the history of a winner.
diff --git a/lib-python/2.7/hotshot/__init__.py 
b/lib-python/2.7/hotshot/__init__.py
--- a/lib-python/2.7/hotshot/__init__.py
+++ b/lib-python/2.7/hotshot/__init__.py
@@ -72,7 +72,7 @@
 
         Additional positional and keyword arguments may be passed
         along; the result of the call is returned, and exceptions are
-        allowed to propogate cleanly, while ensuring that profiling is
+        allowed to propagate cleanly, while ensuring that profiling is
         disabled on the way out.
         """
         return self._prof.runcall(func, args, kw)
diff --git a/lib-python/2.7/idlelib/AutoComplete.py 
b/lib-python/2.7/idlelib/AutoComplete.py
--- a/lib-python/2.7/idlelib/AutoComplete.py
+++ b/lib-python/2.7/idlelib/AutoComplete.py
@@ -1,6 +1,6 @@
 """AutoComplete.py - An IDLE extension for automatically completing names.
 
-This extension can complete either attribute names of file names. It can pop
+This extension can complete either attribute names or file names. It can pop
 a window with all available names, for the user to select from.
 """
 import os
@@ -67,7 +67,7 @@
 
     def try_open_completions_event(self, event):
         """Happens when it would be nice to open a completion list, but not
-        really necessary, for example after an dot, so function
+        really necessary, for example after a dot, so function
         calls won't be made.
         """
         lastchar = self.text.get("insert-1c")
diff --git a/lib-python/2.7/idlelib/CREDITS.txt 
b/lib-python/2.7/idlelib/CREDITS.txt
--- a/lib-python/2.7/idlelib/CREDITS.txt
+++ b/lib-python/2.7/idlelib/CREDITS.txt
@@ -24,7 +24,7 @@
 integration, debugger integration and persistent breakpoints).
 
 Scott David Daniels, Tal Einat, Hernan Foffani, Christos Georgiou,
-Jim Jewett, Martin v. L&#65533;wis, Jason Orendorff, Guilherme Polo, Josh Robb,
+Jim Jewett, Martin v. L&#246;wis, Jason Orendorff, Guilherme Polo, Josh Robb,
 Nigel Rowe, Bruce Sherwood, Jeff Shute, and Weeble have submitted useful
 patches.  Thanks, guys!
 
diff --git a/lib-python/2.7/idlelib/ChangeLog b/lib-python/2.7/idlelib/ChangeLog
--- a/lib-python/2.7/idlelib/ChangeLog
+++ b/lib-python/2.7/idlelib/ChangeLog
@@ -1574,7 +1574,7 @@
        * Attic/PopupMenu.py: Pass a root to the help window.
 
        * SearchBinding.py:
-       Add parent argument to 'to to line number' dialog box.
+       Add parent argument to 'go to line number' dialog box.
 
 Sat Oct 10 19:15:32 1998  Guido van Rossum  <gu...@cnri.reston.va.us>
 
diff --git a/lib-python/2.7/idlelib/Debugger.py 
b/lib-python/2.7/idlelib/Debugger.py
--- a/lib-python/2.7/idlelib/Debugger.py
+++ b/lib-python/2.7/idlelib/Debugger.py
@@ -373,7 +373,7 @@
     def __init__(self, master, flist, gui):
         if macosxSupport.isAquaTk():
             # At least on with the stock AquaTk version on OSX 10.4 you'll
-            # get an shaking GUI that eventually kills IDLE if the width
+            # get a shaking GUI that eventually kills IDLE if the width
             # argument is specified.
             ScrolledList.__init__(self, master)
         else:
diff --git a/lib-python/2.7/idlelib/IOBinding.py 
b/lib-python/2.7/idlelib/IOBinding.py
--- a/lib-python/2.7/idlelib/IOBinding.py
+++ b/lib-python/2.7/idlelib/IOBinding.py
@@ -17,6 +17,8 @@
 import tkMessageBox
 from SimpleDialog import SimpleDialog
 
+from idlelib.configHandler import idleConf
+
 # Try setting the locale, so that we can find out
 # what encoding to use
 try:
@@ -63,7 +65,7 @@
 
 encoding = encoding.lower()
 
-coding_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)')
+coding_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)')
 blank_re = re.compile(r'^[ \t\f]*(?:[#\r\n]|$)')
 
 class EncodingMessage(SimpleDialog):
@@ -137,7 +139,6 @@
         raise LookupError, "Unknown encoding "+name
     return name
 
-
 class IOBinding:
 
     def __init__(self, editwin):
@@ -567,7 +568,6 @@
 
 def _io_binding(parent):  # htest #
     from Tkinter import Toplevel, Text
-    from idlelib.configHandler import idleConf
 
     root = Toplevel(parent)
     root.title("Test IOBinding")
@@ -578,15 +578,24 @@
             self.text = text
             self.flist = None
             self.text.bind("<Control-o>", self.open)
+            self.text.bind('<Control-p>', self.printer)
             self.text.bind("<Control-s>", self.save)
+            self.text.bind("<Alt-s>", self.saveas)
+            self.text.bind('<Control-c>', self.savecopy)
         def get_saved(self): return 0
         def set_saved(self, flag): pass
         def reset_undo(self): pass
+        def update_recent_files_list(self, filename): pass
         def open(self, event):
             self.text.event_generate("<<open-window-from-file>>")
+        def printer(self, event):
+            self.text.event_generate("<<print-window>>")
         def save(self, event):
             self.text.event_generate("<<save-window>>")
-        def update_recent_files_list(s, f): pass
+        def saveas(self, event):
+            self.text.event_generate("<<save-window-as-file>>")
+        def savecopy(self, event):
+            self.text.event_generate("<<save-copy-of-window-as-file>>")
 
     text = Text(root)
     text.pack()
diff --git a/lib-python/2.7/idlelib/MultiCall.py 
b/lib-python/2.7/idlelib/MultiCall.py
--- a/lib-python/2.7/idlelib/MultiCall.py
+++ b/lib-python/2.7/idlelib/MultiCall.py
@@ -101,7 +101,7 @@
             self.widget.unbind(self.widgetinst, self.sequence, self.handlerid)
 
 # An int in range(1 << len(_modifiers)) represents a combination of modifiers
-# (if the least significent bit is on, _modifiers[0] is on, and so on).
+# (if the least significant bit is on, _modifiers[0] is on, and so on).
 # _state_subsets gives for each combination of modifiers, or *state*,
 # a list of the states which are a subset of it. This list is ordered by the
 # number of modifiers is the state - the most specific state comes first.
diff --git a/lib-python/2.7/idlelib/NEWS.txt b/lib-python/2.7/idlelib/NEWS.txt
--- a/lib-python/2.7/idlelib/NEWS.txt
+++ b/lib-python/2.7/idlelib/NEWS.txt
@@ -1,3 +1,35 @@
+What's New in IDLE 2.7.12?
+==========================
+*Release date: 2015-06-30?*
+
+- Issue #5124: Paste with text selected now replaces the selection on X11.
+  This matches how paste works on Windows, Mac, most modern Linux apps,
+  and ttk widgets.  Original patch by Serhiy Storchaka.
+
+- Issue #24759: Make clear in idlelib.idle_test.__init__ that the directory
+  is a private implementation of test.test_idle and tool for maintainers.
+
+- Issue #26673: When tk reports font size as 0, change to size 10.
+  Such fonts on Linux prevented the configuration dialog from opening.
+
+- Issue #27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks.
+
+- In the 'IDLE-console differences' section of the IDLE doc, clarify
+  how running with IDLE affects sys.modules and the standard streams.
+
+- Issue #25507: fix incorrect change in IOBinding that prevented printing.
+  Change also prevented saving shell window with non-ascii characters.
+  Augment IOBinding htest to include all major IOBinding functions.
+
+- Issue #25905: Revert unwanted conversion of ' to &#65533; RIGHT SINGLE 
QUOTATION
+  MARK in README.txt and open this and NEWS.txt with 'ascii'.
+  Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.
+
+- Issue #26417: Prevent spurious errors and incorrect defaults when
+  installing IDLE 2.7 on OS X: default configuration settings are
+  no longer installed from OS X specific copies.
+
+
 What's New in IDLE 2.7.11?
 ==========================
 *Release date: 2015-12-06*
@@ -162,7 +194,7 @@
   move version to end.
 
 - Issue #14105: Idle debugger breakpoints no longer disappear
-  when inseting or deleting lines.
+  when inserting or deleting lines.
 
 
 What's New in IDLE 2.7.8?
diff --git a/lib-python/2.7/idlelib/PyShell.py 
b/lib-python/2.7/idlelib/PyShell.py
--- a/lib-python/2.7/idlelib/PyShell.py
+++ b/lib-python/2.7/idlelib/PyShell.py
@@ -1408,6 +1408,17 @@
         self.shell.close()
 
 
+def fix_x11_paste(root):
+    "Make paste replace selection on x11.  See issue #5124."
+    if root._windowingsystem == 'x11':
+        for cls in 'Text', 'Entry', 'Spinbox':
+            root.bind_class(
+                cls,
+                '<<Paste>>',
+                'catch {%W delete sel.first sel.last}\n' +
+                        root.bind_class(cls, '<<Paste>>'))
+
+
 usage_msg = """\
 
 USAGE: idle  [-deins] [-t title] [file]*
@@ -1537,8 +1548,10 @@
                                     'editor-on-startup', type='bool')
     enable_edit = enable_edit or edit_start
     enable_shell = enable_shell or not enable_edit
+
     # start editor and/or shell windows:
     root = Tk(className="Idle")
+    root.withdraw()
 
     # set application icon
     icondir = os.path.join(os.path.dirname(__file__), 'Icons')
@@ -1553,7 +1566,7 @@
         root.tk.call('wm', 'iconphoto', str(root), "-default", *icons)
 
     fixwordbreaks(root)
-    root.withdraw()
+    fix_x11_paste(root)
     flist = PyShellFileList(root)
     macosxSupport.setupApp(root, flist)
 
diff --git a/lib-python/2.7/idlelib/README.txt 
b/lib-python/2.7/idlelib/README.txt
--- a/lib-python/2.7/idlelib/README.txt
+++ b/lib-python/2.7/idlelib/README.txt
@@ -1,6 +1,6 @@
 README.txt: an index to idlelib files and the IDLE menu.
 
-IDLE is Python&#65533;s Integrated Development and Learning
+IDLE is Python's Integrated Development and Learning
 Environment.  The user documentation is part of the Library Reference and
 is available in IDLE by selecting Help => IDLE Help.  This README documents
 idlelib for IDLE developers and curious users.
diff --git a/lib-python/2.7/idlelib/WidgetRedirector.py 
b/lib-python/2.7/idlelib/WidgetRedirector.py
--- a/lib-python/2.7/idlelib/WidgetRedirector.py
+++ b/lib-python/2.7/idlelib/WidgetRedirector.py
@@ -68,7 +68,7 @@
         '''Return OriginalCommand(operation) after registering function.
 
         Registration adds an operation: function pair to ._operations.
-        It also adds an widget function attribute that masks the Tkinter
+        It also adds a widget function attribute that masks the Tkinter
         class instance method.  Method masking operates independently
         from command dispatch.
 
diff --git a/lib-python/2.7/idlelib/aboutDialog.py 
b/lib-python/2.7/idlelib/aboutDialog.py
--- a/lib-python/2.7/idlelib/aboutDialog.py
+++ b/lib-python/2.7/idlelib/aboutDialog.py
@@ -110,6 +110,7 @@
                                 command=self.ShowIDLECredits)
         idle_credits_b.pack(side=LEFT, padx=10, pady=10)
 
+    # License, et all, are of type _sitebuiltins._Printer
     def ShowLicense(self):
         self.display_printer_text('About - License', license)
 
@@ -119,14 +120,16 @@
     def ShowPythonCredits(self):
         self.display_printer_text('About - Python Credits', credits)
 
+    # Encode CREDITS.txt to utf-8 for proper version of Loewis.
+    # Specify others as ascii until need utf-8, so catch errors.
     def ShowIDLECredits(self):
-        self.display_file_text('About - Credits', 'CREDITS.txt', 'iso-8859-1')
+        self.display_file_text('About - Credits', 'CREDITS.txt', 'utf-8')
 
     def ShowIDLEAbout(self):
-        self.display_file_text('About - Readme', 'README.txt')
+        self.display_file_text('About - Readme', 'README.txt', 'ascii')
 
     def ShowIDLENEWS(self):
-        self.display_file_text('About - NEWS', 'NEWS.txt')
+        self.display_file_text('About - NEWS', 'NEWS.txt', 'utf-8')
 
     def display_printer_text(self, title, printer):
         printer._Printer__setup()
@@ -141,5 +144,7 @@
         self.destroy()
 
 if __name__ == '__main__':
+    import unittest
+    unittest.main('idlelib.idle_test.test_helpabout', verbosity=2, exit=False)
     from idlelib.idle_test.htest import run
     run(AboutDialog)
diff --git a/lib-python/2.7/idlelib/configDialog.py 
b/lib-python/2.7/idlelib/configDialog.py
--- a/lib-python/2.7/idlelib/configDialog.py
+++ b/lib-python/2.7/idlelib/configDialog.py
@@ -500,6 +500,16 @@
         self.autoSave.trace_variable('w', self.VarChanged_autoSave)
         self.encoding.trace_variable('w', self.VarChanged_encoding)
 
+    def remove_var_callbacks(self):
+        for var in (
+                self.fontSize, self.fontName, self.fontBold,
+                self.spaceNum, self.colour, self.builtinTheme,
+                self.customTheme, self.themeIsBuiltin, self.highlightTarget,
+                self.keyBinding, self.builtinKeys, self.customKeys,
+                self.keysAreBuiltin, self.winWidth, self.winHeight,
+                self.startupEdit, self.autoSave, self.encoding,):
+            var.trace_vdelete('w', var.trace_vinfo()[0][1])
+
     def VarChanged_font(self, *params):
         '''When one font attribute changes, save them all, as they are
         not independent from each other. In particular, when we are
@@ -1213,7 +1223,7 @@
 
         All values are treated as text, and it is up to the user to supply
         reasonable values. The only exception to this are the 'enable*' 
options,
-        which are boolean, and can be toggled with an True/False button.
+        which are boolean, and can be toggled with a True/False button.
         """
         parent = self.parent
         frame = self.tabPages.pages['Extensions'].frame
diff --git a/lib-python/2.7/idlelib/configHandler.py 
b/lib-python/2.7/idlelib/configHandler.py
--- a/lib-python/2.7/idlelib/configHandler.py
+++ b/lib-python/2.7/idlelib/configHandler.py
@@ -721,7 +721,7 @@
                 actualFont = Font.actual(f)
                 family = actualFont['family']
                 size = actualFont['size']
-                if size < 0:
+                if size <= 0:
                     size = 10  # if font in pixels, ignore actual size
                 bold = actualFont['weight']=='bold'
         return (family, size, 'bold' if bold else 'normal')
diff --git a/lib-python/2.7/idlelib/help.html b/lib-python/2.7/idlelib/help.html
--- a/lib-python/2.7/idlelib/help.html
+++ b/lib-python/2.7/idlelib/help.html
@@ -6,15 +6,15 @@
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
-    <title>24.6. IDLE &mdash; Python 2.7.10 documentation</title>
+    <title>24.6. IDLE &mdash; Python 2.7.11 documentation</title>
 
-    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '../',
-        VERSION:     '2.7.10',
+        VERSION:     '2.7.11',
         COLLAPSE_INDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
@@ -25,11 +25,11 @@
     <script type="text/javascript" src="../_static/doctools.js"></script>
     <script type="text/javascript" src="../_static/sidebar.js"></script>
     <link rel="search" type="application/opensearchdescription+xml"
-          title="Search within Python 2.7.10 documentation"
+          title="Search within Python 2.7.11 documentation"
           href="../_static/opensearch.xml"/>
     <link rel="author" title="About these documents" href="../about.html" />
     <link rel="copyright" title="Copyright" href="../copyright.html" />
-    <link rel="top" title="Python 2.7.10 documentation" href="../index.html" />
+    <link rel="top" title="Python 2.7.11 documentation" 
href="../contents.html" />
     <link rel="up" title="24. Graphical User Interfaces with Tk" 
href="tk.html" />
     <link rel="next" title="24.7. Other Graphical User Interface Packages" 
href="othergui.html" />
     <link rel="prev" title="24.5. turtle &#8212; Turtle graphics for Tk" 
href="turtle.html" />
@@ -40,8 +40,8 @@
 
 
   </head>
-  <body>
-    <div class="related">
+  <body role="document">
+    <div class="related" role="navigation" aria-label="related navigation">
       <h3>Navigation</h3>
       <ul>
         <li class="right" style="margin-right: 10px">
@@ -60,25 +60,25 @@
                  style="vertical-align: middle; margin-top: -1px"/></li>
         <li><a href="https://www.python.org/";>Python</a> &raquo;</li>
         <li>
-          <a href="../index.html">Python 2.7.10 documentation</a> &raquo;
+          <a href="../index.html">Python 2.7.11 documentation</a> &raquo;
         </li>
 
-          <li><a href="index.html" >The Python Standard Library</a> 
&raquo;</li>
-          <li><a href="tk.html" accesskey="U">24. Graphical User Interfaces 
with Tk</a> &raquo;</li>
+          <li class="nav-item nav-item-1"><a href="index.html" >The Python 
Standard Library</a> &raquo;</li>
+          <li class="nav-item nav-item-2"><a href="tk.html" accesskey="U">24. 
Graphical User Interfaces with Tk</a> &raquo;</li>
       </ul>
     </div>
 
     <div class="document">
       <div class="documentwrapper">
         <div class="bodywrapper">
-          <div class="body">
+          <div class="body" role="main">
 
   <div class="section" id="idle">
 <span id="id1"></span><h1>24.6. IDLE<a class="headerlink" href="#idle" 
title="Permalink to this headline">&#182;</a></h1>
 <p id="index-0">IDLE is Python&#8217;s Integrated Development and Learning 
Environment.</p>
 <p>IDLE has the following features:</p>
 <ul class="simple">
-<li>coded in 100% pure Python, using the <tt class="xref py py-mod docutils 
literal"><span class="pre">tkinter</span></tt> GUI toolkit</li>
+<li>coded in 100% pure Python, using the <code class="xref py py-mod docutils 
literal"><span class="pre">tkinter</span></code> GUI toolkit</li>
 <li>cross-platform: works mostly the same on Windows, Unix, and Mac OS X</li>
 <li>Python shell window (interactive interpreter) with colorizing
 of code input, output, and error messages</li>
@@ -163,7 +163,7 @@
 <dt>Find Selection</dt>
 <dd>Search for the currently selected string, if there is one.</dd>
 <dt>Find in Files...</dt>
-<dd>Open a file search dialog.  Put results in an new output window.</dd>
+<dd>Open a file search dialog.  Put results in a new output window.</dd>
 <dt>Replace...</dt>
 <dd>Open a search-and-replace dialog.</dd>
 <dt>Go to Line</dt>
@@ -224,10 +224,10 @@
 <dt>Run Module</dt>
 <dd>Do Check Module (above).  If no error, restart the shell to clean the
 environment, then execute the module.  Output is displayed in the Shell
-window.  Note that output requires use of <tt class="docutils literal"><span 
class="pre">print</span></tt> or <tt class="docutils literal"><span 
class="pre">write</span></tt>.
+window.  Note that output requires use of <code class="docutils literal"><span 
class="pre">print</span></code> or <code class="docutils literal"><span 
class="pre">write</span></code>.
 When execution is complete, the Shell retains focus and displays a prompt.
 At this point, one may interactively explore the result of execution.
-This is similar to executing a file with <tt class="docutils literal"><span 
class="pre">python</span> <span class="pre">-i</span> <span 
class="pre">file</span></tt> at a command
+This is similar to executing a file with <code class="docutils literal"><span 
class="pre">python</span> <span class="pre">-i</span> <span 
class="pre">file</span></code> at a command
 line.</dd>
 </dl>
 </div>
@@ -339,47 +339,47 @@
 </div>
 <div class="section" id="editing-and-navigation">
 <h2>24.6.2. Editing and navigation<a class="headerlink" 
href="#editing-and-navigation" title="Permalink to this 
headline">&#182;</a></h2>
-<p>In this section, &#8216;C&#8217; refers to the <tt class="kbd docutils 
literal"><span class="pre">Control</span></tt> key on Windows and Unix and
-the <tt class="kbd docutils literal"><span class="pre">Command</span></tt> key 
on Mac OSX.</p>
+<p>In this section, &#8216;C&#8217; refers to the <code class="kbd docutils 
literal"><span class="pre">Control</span></code> key on Windows and Unix and
+the <code class="kbd docutils literal"><span class="pre">Command</span></code> 
key on Mac OSX.</p>
 <ul>
-<li><p class="first"><tt class="kbd docutils literal"><span 
class="pre">Backspace</span></tt> deletes to the left; <tt class="kbd docutils 
literal"><span class="pre">Del</span></tt> deletes to the right</p>
+<li><p class="first"><code class="kbd docutils literal"><span 
class="pre">Backspace</span></code> deletes to the left; <code class="kbd 
docutils literal"><span class="pre">Del</span></code> deletes to the right</p>
 </li>
-<li><p class="first"><tt class="kbd docutils literal"><span 
class="pre">C-Backspace</span></tt> delete word left; <tt class="kbd docutils 
literal"><span class="pre">C-Del</span></tt> delete word to the right</p>
+<li><p class="first"><code class="kbd docutils literal"><span 
class="pre">C-Backspace</span></code> delete word left; <code class="kbd 
docutils literal"><span class="pre">C-Del</span></code> delete word to the 
right</p>
 </li>
-<li><p class="first">Arrow keys and <tt class="kbd docutils literal"><span 
class="pre">Page</span> <span class="pre">Up</span></tt>/<tt class="kbd 
docutils literal"><span class="pre">Page</span> <span 
class="pre">Down</span></tt> to move around</p>
+<li><p class="first">Arrow keys and <code class="kbd docutils literal"><span 
class="pre">Page</span> <span class="pre">Up</span></code>/<code class="kbd 
docutils literal"><span class="pre">Page</span> <span 
class="pre">Down</span></code> to move around</p>
 </li>
-<li><p class="first"><tt class="kbd docutils literal"><span 
class="pre">C-LeftArrow</span></tt> and <tt class="kbd docutils literal"><span 
class="pre">C-RightArrow</span></tt> moves by words</p>
+<li><p class="first"><code class="kbd docutils literal"><span 
class="pre">C-LeftArrow</span></code> and <code class="kbd docutils 
literal"><span class="pre">C-RightArrow</span></code> moves by words</p>
 </li>
-<li><p class="first"><tt class="kbd docutils literal"><span 
class="pre">Home</span></tt>/<tt class="kbd docutils literal"><span 
class="pre">End</span></tt> go to begin/end of line</p>
+<li><p class="first"><code class="kbd docutils literal"><span 
class="pre">Home</span></code>/<code class="kbd docutils literal"><span 
class="pre">End</span></code> go to begin/end of line</p>
 </li>
-<li><p class="first"><tt class="kbd docutils literal"><span 
class="pre">C-Home</span></tt>/<tt class="kbd docutils literal"><span 
class="pre">C-End</span></tt> go to begin/end of file</p>
+<li><p class="first"><code class="kbd docutils literal"><span 
class="pre">C-Home</span></code>/<code class="kbd docutils literal"><span 
class="pre">C-End</span></code> go to begin/end of file</p>
 </li>
 <li><p class="first">Some useful Emacs bindings are inherited from Tcl/Tk:</p>
 <blockquote>
 <div><ul class="simple">
-<li><tt class="kbd docutils literal"><span class="pre">C-a</span></tt> 
beginning of line</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-e</span></tt> end of 
line</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-k</span></tt> kill 
line (but doesn&#8217;t put it in clipboard)</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-l</span></tt> center 
window around the insertion point</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-b</span></tt> go 
backwards one character without deleting (usually you can
+<li><code class="kbd docutils literal"><span class="pre">C-a</span></code> 
beginning of line</li>
+<li><code class="kbd docutils literal"><span class="pre">C-e</span></code> end 
of line</li>
+<li><code class="kbd docutils literal"><span class="pre">C-k</span></code> 
kill line (but doesn&#8217;t put it in clipboard)</li>
+<li><code class="kbd docutils literal"><span class="pre">C-l</span></code> 
center window around the insertion point</li>
+<li><code class="kbd docutils literal"><span class="pre">C-b</span></code> go 
backwards one character without deleting (usually you can
 also use the cursor key for this)</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-f</span></tt> go 
forward one character without deleting (usually you can
+<li><code class="kbd docutils literal"><span class="pre">C-f</span></code> go 
forward one character without deleting (usually you can
 also use the cursor key for this)</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-p</span></tt> go up 
one line (usually you can also use the cursor key for
+<li><code class="kbd docutils literal"><span class="pre">C-p</span></code> go 
up one line (usually you can also use the cursor key for
 this)</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-d</span></tt> delete 
next character</li>
+<li><code class="kbd docutils literal"><span class="pre">C-d</span></code> 
delete next character</li>
 </ul>
 </div></blockquote>
 </li>
 </ul>
-<p>Standard keybindings (like <tt class="kbd docutils literal"><span 
class="pre">C-c</span></tt> to copy and <tt class="kbd docutils literal"><span 
class="pre">C-v</span></tt> to paste)
+<p>Standard keybindings (like <code class="kbd docutils literal"><span 
class="pre">C-c</span></code> to copy and <code class="kbd docutils 
literal"><span class="pre">C-v</span></code> to paste)
 may work.  Keybindings are selected in the Configure IDLE dialog.</p>
 <div class="section" id="automatic-indentation">
 <h3>24.6.2.1. Automatic indentation<a class="headerlink" 
href="#automatic-indentation" title="Permalink to this headline">&#182;</a></h3>
 <p>After a block-opening statement, the next line is indented by 4 spaces (in 
the
 Python Shell window by one tab).  After certain keywords (break, return etc.)
-the next line is dedented.  In leading indentation, <tt class="kbd docutils 
literal"><span class="pre">Backspace</span></tt> deletes up
-to 4 spaces if they are there. <tt class="kbd docutils literal"><span 
class="pre">Tab</span></tt> inserts spaces (in the Python
+the next line is dedented.  In leading indentation, <code class="kbd docutils 
literal"><span class="pre">Backspace</span></code> deletes up
+to 4 spaces if they are there. <code class="kbd docutils literal"><span 
class="pre">Tab</span></code> inserts spaces (in the Python
 Shell window one tab), number depends on Indent width. Currently tabs
 are restricted to four spaces due to Tcl/Tk limitations.</p>
 <p>See also the indent/dedent region commands in the edit menu.</p>
@@ -394,25 +394,25 @@
 of those characters (plus zero or more other characters) a tab is typed
 the ACW will open immediately if a possible continuation is found.</p>
 <p>If there is only one possible completion for the characters entered, a
-<tt class="kbd docutils literal"><span class="pre">Tab</span></tt> will supply 
that completion without opening the ACW.</p>
+<code class="kbd docutils literal"><span class="pre">Tab</span></code> will 
supply that completion without opening the ACW.</p>
 <p>&#8216;Show Completions&#8217; will force open a completions window, by 
default the
-<tt class="kbd docutils literal"><span class="pre">C-space</span></tt> will 
open a completions window. In an empty
+<code class="kbd docutils literal"><span class="pre">C-space</span></code> 
will open a completions window. In an empty
 string, this will contain the files in the current directory. On a
 blank line, it will contain the built-in and user-defined functions and
 classes in the current name spaces, plus any modules imported. If some
 characters have been entered, the ACW will attempt to be more specific.</p>
 <p>If a string of characters is typed, the ACW selection will jump to the
-entry most closely matching those characters.  Entering a <tt class="kbd 
docutils literal"><span class="pre">tab</span></tt> will
+entry most closely matching those characters.  Entering a <code class="kbd 
docutils literal"><span class="pre">tab</span></code> will
 cause the longest non-ambiguous match to be entered in the Editor window or
-Shell.  Two <tt class="kbd docutils literal"><span class="pre">tab</span></tt> 
in a row will supply the current ACW selection, as
+Shell.  Two <code class="kbd docutils literal"><span 
class="pre">tab</span></code> in a row will supply the current ACW selection, as
 will return or a double click.  Cursor keys, Page Up/Down, mouse selection,
 and the scroll wheel all operate on the ACW.</p>
 <p>&#8220;Hidden&#8221; attributes can be accessed by typing the beginning of 
hidden
 name after a &#8216;.&#8217;, e.g. &#8216;_&#8217;. This allows access to 
modules with
-<tt class="docutils literal"><span class="pre">__all__</span></tt> set, or to 
class-private attributes.</p>
+<code class="docutils literal"><span class="pre">__all__</span></code> set, or 
to class-private attributes.</p>
 <p>Completions and the &#8216;Expand Word&#8217; facility can save a lot of 
typing!</p>
 <p>Completions are currently limited to those in the namespaces. Names in
-an Editor window which are not via <tt class="docutils literal"><span 
class="pre">__main__</span></tt> and <a class="reference internal" 
href="sys.html#sys.modules" title="sys.modules"><tt class="xref py py-data 
docutils literal"><span class="pre">sys.modules</span></tt></a> will
+an Editor window which are not via <code class="docutils literal"><span 
class="pre">__main__</span></code> and <a class="reference internal" 
href="sys.html#sys.modules" title="sys.modules"><code class="xref py py-data 
docutils literal"><span class="pre">sys.modules</span></code></a> will
 not be found.  Run the module once with your imports to correct this situation.
 Note that IDLE itself places quite a few modules in sys.modules, so
 much can be found by default, e.g. the re module.</p>
@@ -421,10 +421,10 @@
 </div>
 <div class="section" id="calltips">
 <h3>24.6.2.3. Calltips<a class="headerlink" href="#calltips" title="Permalink 
to this headline">&#182;</a></h3>
-<p>A calltip is shown when one types <tt class="kbd docutils literal"><span 
class="pre">(</span></tt> after the name of an <em>acccessible</em>
+<p>A calltip is shown when one types <code class="kbd docutils literal"><span 
class="pre">(</span></code> after the name of an <em>acccessible</em>
 function.  A name expression may include dots and subscripts.  A calltip
 remains until it is clicked, the cursor is moved out of the argument area,
-or <tt class="kbd docutils literal"><span class="pre">)</span></tt> is typed.  
When the cursor is in the argument part of a definition,
+or <code class="kbd docutils literal"><span class="pre">)</span></code> is 
typed.  When the cursor is in the argument part of a definition,
 the menu or shortcut display a calltip.</p>
 <p>A calltip consists of the function signature and the first line of the
 docstring.  For builtins without an accessible signature, the calltip
@@ -433,11 +433,11 @@
 <p>The set of <em>accessible</em> functions depends on what modules have been 
imported
 into the user process, including those imported by Idle itself,
 and what definitions have been run, all since the last restart.</p>
-<p>For example, restart the Shell and enter <tt class="docutils literal"><span 
class="pre">itertools.count(</span></tt>.  A calltip
+<p>For example, restart the Shell and enter <code class="docutils 
literal"><span class="pre">itertools.count(</span></code>.  A calltip
 appears because Idle imports itertools into the user process for its own use.
-(This could change.)  Enter <tt class="docutils literal"><span 
class="pre">turtle.write(</span></tt> and nothing appears.  Idle does
+(This could change.)  Enter <code class="docutils literal"><span 
class="pre">turtle.write(</span></code> and nothing appears.  Idle does
 not import turtle.  The menu or shortcut do nothing either.  Enter
-<tt class="docutils literal"><span class="pre">import</span> <span 
class="pre">turtle</span></tt> and then <tt class="docutils literal"><span 
class="pre">turtle.write(</span></tt> will work.</p>
+<code class="docutils literal"><span class="pre">import</span> <span 
class="pre">turtle</span></code> and then <code class="docutils literal"><span 
class="pre">turtle.write(</span></code> will work.</p>
 <p>In an editor, import statements have no effect until one runs the file.  One
 might want to run a file after writing the import statements at the top,
 or immediately run an existing file before editing.</p>
@@ -445,17 +445,17 @@
 <div class="section" id="python-shell-window">
 <h3>24.6.2.4. Python Shell window<a class="headerlink" 
href="#python-shell-window" title="Permalink to this headline">&#182;</a></h3>
 <ul>
-<li><p class="first"><tt class="kbd docutils literal"><span 
class="pre">C-c</span></tt> interrupts executing command</p>
+<li><p class="first"><code class="kbd docutils literal"><span 
class="pre">C-c</span></code> interrupts executing command</p>
 </li>
-<li><p class="first"><tt class="kbd docutils literal"><span 
class="pre">C-d</span></tt> sends end-of-file; closes window if typed at a <tt 
class="docutils literal"><span class="pre">&gt;&gt;&gt;</span></tt> prompt</p>
+<li><p class="first"><code class="kbd docutils literal"><span 
class="pre">C-d</span></code> sends end-of-file; closes window if typed at a 
<code class="docutils literal"><span class="pre">&gt;&gt;&gt;</span></code> 
prompt</p>
 </li>
-<li><p class="first"><tt class="kbd docutils literal"><span 
class="pre">Alt-/</span></tt> (Expand word) is also useful to reduce typing</p>
+<li><p class="first"><code class="kbd docutils literal"><span 
class="pre">Alt-/</span></code> (Expand word) is also useful to reduce 
typing</p>
 <p>Command history</p>
 <ul class="simple">
-<li><tt class="kbd docutils literal"><span class="pre">Alt-p</span></tt> 
retrieves previous command matching what you have typed. On
-OS X use <tt class="kbd docutils literal"><span 
class="pre">C-p</span></tt>.</li>
-<li><tt class="kbd docutils literal"><span class="pre">Alt-n</span></tt> 
retrieves next. On OS X use <tt class="kbd docutils literal"><span 
class="pre">C-n</span></tt>.</li>
-<li><tt class="kbd docutils literal"><span class="pre">Return</span></tt> 
while on any previous command retrieves that command</li>
+<li><code class="kbd docutils literal"><span class="pre">Alt-p</span></code> 
retrieves previous command matching what you have typed. On
+OS X use <code class="kbd docutils literal"><span 
class="pre">C-p</span></code>.</li>
+<li><code class="kbd docutils literal"><span class="pre">Alt-n</span></code> 
retrieves next. On OS X use <code class="kbd docutils literal"><span 
class="pre">C-n</span></code>.</li>
+<li><code class="kbd docutils literal"><span class="pre">Return</span></code> 
while on any previous command retrieves that command</li>
 </ul>
 </li>
 </ul>
@@ -465,8 +465,8 @@
 <p>Idle defaults to black on white text, but colors text with special meanings.
 For the shell, these are shell output, shell error, user output, and
 user error.  For Python code, at the shell prompt or in an editor, these are
-keywords, builtin class and function names, names following <tt 
class="docutils literal"><span class="pre">class</span></tt> and
-<tt class="docutils literal"><span class="pre">def</span></tt>, strings, and 
comments. For any text window, these are the cursor (when
+keywords, builtin class and function names, names following <code 
class="docutils literal"><span class="pre">class</span></code> and
+<code class="docutils literal"><span class="pre">def</span></code>, strings, 
and comments. For any text window, these are the cursor (when
 present), found text (when possible), and selected text.</p>
 <p>Text coloring is done in the background, so uncolorized text is occasionally
 visible.  To change the color scheme, use the Configure IDLE dialog
@@ -476,15 +476,15 @@
 </div>
 <div class="section" id="startup-and-code-execution">
 <h2>24.6.3. Startup and code execution<a class="headerlink" 
href="#startup-and-code-execution" title="Permalink to this 
headline">&#182;</a></h2>
-<p>Upon startup with the <tt class="docutils literal"><span 
class="pre">-s</span></tt> option, IDLE will execute the file referenced by
-the environment variables <span class="target" id="index-5"></span><tt 
class="xref std std-envvar docutils literal"><span 
class="pre">IDLESTARTUP</span></tt> or <span class="target" 
id="index-6"></span><a class="reference internal" 
href="../using/cmdline.html#envvar-PYTHONSTARTUP"><tt class="xref std 
std-envvar docutils literal"><span class="pre">PYTHONSTARTUP</span></tt></a>.
-IDLE first checks for <tt class="docutils literal"><span 
class="pre">IDLESTARTUP</span></tt>; if <tt class="docutils literal"><span 
class="pre">IDLESTARTUP</span></tt> is present the file
-referenced is run.  If <tt class="docutils literal"><span 
class="pre">IDLESTARTUP</span></tt> is not present, IDLE checks for
-<tt class="docutils literal"><span class="pre">PYTHONSTARTUP</span></tt>.  
Files referenced by these environment variables are
+<p>Upon startup with the <code class="docutils literal"><span 
class="pre">-s</span></code> option, IDLE will execute the file referenced by
+the environment variables <span class="target" id="index-5"></span><code 
class="xref std std-envvar docutils literal"><span 
class="pre">IDLESTARTUP</span></code> or <span class="target" 
id="index-6"></span><a class="reference internal" 
href="../using/cmdline.html#envvar-PYTHONSTARTUP"><code class="xref std 
std-envvar docutils literal"><span class="pre">PYTHONSTARTUP</span></code></a>.
+IDLE first checks for <code class="docutils literal"><span 
class="pre">IDLESTARTUP</span></code>; if <code class="docutils literal"><span 
class="pre">IDLESTARTUP</span></code> is present the file
+referenced is run.  If <code class="docutils literal"><span 
class="pre">IDLESTARTUP</span></code> is not present, IDLE checks for
+<code class="docutils literal"><span class="pre">PYTHONSTARTUP</span></code>.  
Files referenced by these environment variables are
 convenient places to store functions that are used frequently from the IDLE
 shell, or for executing import statements to import common modules.</p>
-<p>In addition, <tt class="docutils literal"><span class="pre">Tk</span></tt> 
also loads a startup file if it is present.  Note that the
-Tk file is loaded unconditionally.  This additional file is <tt 
class="docutils literal"><span class="pre">.Idle.py</span></tt> and is
+<p>In addition, <code class="docutils literal"><span 
class="pre">Tk</span></code> also loads a startup file if it is present.  Note 
that the
+Tk file is loaded unconditionally.  This additional file is <code 
class="docutils literal"><span class="pre">.Idle.py</span></code> and is
 looked for in the user&#8217;s home directory.  Statements in this file will be
 executed in the Tk namespace, so this file is not useful for importing
 functions to be used from IDLE&#8217;s Python shell.</p>
@@ -505,25 +505,27 @@
 </div>
 <p>If there are arguments:</p>
 <ul class="simple">
-<li>If <tt class="docutils literal"><span class="pre">-</span></tt>, <tt 
class="docutils literal"><span class="pre">-c</span></tt>, or <tt 
class="docutils literal"><span class="pre">r</span></tt> is used, all arguments 
are placed in
-<tt class="docutils literal"><span class="pre">sys.argv[1:...]</span></tt> and 
<tt class="docutils literal"><span class="pre">sys.argv[0]</span></tt> is set 
to <tt class="docutils literal"><span class="pre">''</span></tt>, <tt 
class="docutils literal"><span class="pre">'-c'</span></tt>,
-or <tt class="docutils literal"><span class="pre">'-r'</span></tt>.  No editor 
window is opened, even if that is the default
+<li>If <code class="docutils literal"><span class="pre">-</span></code>, <code 
class="docutils literal"><span class="pre">-c</span></code>, or <code 
class="docutils literal"><span class="pre">r</span></code> is used, all 
arguments are placed in
+<code class="docutils literal"><span class="pre">sys.argv[1:...]</span></code> 
and <code class="docutils literal"><span class="pre">sys.argv[0]</span></code> 
is set to <code class="docutils literal"><span class="pre">''</span></code>, 
<code class="docutils literal"><span class="pre">'-c'</span></code>,
+or <code class="docutils literal"><span class="pre">'-r'</span></code>.  No 
editor window is opened, even if that is the default
 set in the Options dialog.</li>
 <li>Otherwise, arguments are files opened for editing and
-<tt class="docutils literal"><span class="pre">sys.argv</span></tt> reflects 
the arguments passed to IDLE itself.</li>
+<code class="docutils literal"><span class="pre">sys.argv</span></code> 
reflects the arguments passed to IDLE itself.</li>
 </ul>
 </div>
 <div class="section" id="idle-console-differences">
 <h3>24.6.3.2. IDLE-console differences<a class="headerlink" 
href="#idle-console-differences" title="Permalink to this 
headline">&#182;</a></h3>
 <p>As much as possible, the result of executing Python code with IDLE is the
 same as executing the same code in a console window.  However, the different
-interface and operation occasionally affects results.</p>
-<p>For instance, IDLE normally executes user code in a separate process from
-the IDLE GUI itself.  The IDLE versions of sys.stdin, .stdout, and .stderr in 
the
-execution process get input from and send output to the GUI process,
-which keeps control of the keyboard and screen.  This is normally transparent,
-but code that access these object will see different attribute values.
-Also, functions that directly access the keyboard and screen will not work.</p>
+interface and operation occasionally affects visible results.  For instance,
+<code class="docutils literal"><span class="pre">sys.modules</span></code> 
starts with more entries.</p>
+<p>IDLE also replaces <code class="docutils literal"><span 
class="pre">sys.stdin</span></code>, <code class="docutils literal"><span 
class="pre">sys.stdout</span></code>, and <code class="docutils literal"><span 
class="pre">sys.stderr</span></code> with
+objects that get input from and send output to the Shell window.
+When this window has the focus, it controls the keyboard and screen.
+This is normally transparent, but functions that directly access the keyboard
+and screen will not work.  If <code class="docutils literal"><span 
class="pre">sys</span></code> is reset with <code class="docutils 
literal"><span class="pre">reload(sys)</span></code>,
+IDLE&#8217;s changes are lost and things like <code class="docutils 
literal"><span class="pre">input</span></code>, <code class="docutils 
literal"><span class="pre">raw_input</span></code>, and
+<code class="docutils literal"><span class="pre">print</span></code> will not 
work correctly.</p>
 <p>With IDLE&#8217;s Shell, one enters, edits, and recalls complete statements.
 Some consoles only work with a single physical line at a time.</p>
 </div>
@@ -595,7 +597,7 @@
           </div>
         </div>
       </div>
-      <div class="sphinxsidebar">
+      <div class="sphinxsidebar" role="navigation" aria-label="main 
navigation">
         <div class="sphinxsidebarwrapper">
   <h3><a href="../contents.html">Table Of Contents</a></h3>
   <ul>
@@ -639,7 +641,7 @@
 
   <h4>Previous topic</h4>
   <p class="topless"><a href="turtle.html"
-                        title="previous chapter">24.5. <tt class="docutils 
literal"><span class="pre">turtle</span></tt> &#8212; Turtle graphics for 
Tk</a></p>
+                        title="previous chapter">24.5. <code class="docutils 
literal"><span class="pre">turtle</span></code> &#8212; Turtle graphics for 
Tk</a></p>
   <h4>Next topic</h4>
   <p class="topless"><a href="othergui.html"
                         title="next chapter">24.7. Other Graphical User 
Interface Packages</a></p>
@@ -650,7 +652,7 @@
          rel="nofollow">Show Source</a></li>
 </ul>
 
-<div id="searchbox" style="display: none">
+<div id="searchbox" style="display: none" role="search">
   <h3>Quick search</h3>
     <form class="search" action="../search.html" method="get">
       <input type="text" name="q" />
@@ -667,7 +669,7 @@
       </div>
       <div class="clearer"></div>
     </div>
-    <div class="related">
+    <div class="related" role="navigation" aria-label="related navigation">
       <h3>Navigation</h3>
       <ul>
         <li class="right" style="margin-right: 10px">
@@ -686,23 +688,23 @@
                  style="vertical-align: middle; margin-top: -1px"/></li>
         <li><a href="https://www.python.org/";>Python</a> &raquo;</li>
         <li>
-          <a href="../index.html">Python 2.7.10 documentation</a> &raquo;
+          <a href="../index.html">Python 2.7.11 documentation</a> &raquo;
         </li>
 
-          <li><a href="index.html" >The Python Standard Library</a> 
&raquo;</li>
-          <li><a href="tk.html" >24. Graphical User Interfaces with Tk</a> 
&raquo;</li>
+          <li class="nav-item nav-item-1"><a href="index.html" >The Python 
Standard Library</a> &raquo;</li>
+          <li class="nav-item nav-item-2"><a href="tk.html" >24. Graphical 
User Interfaces with Tk</a> &raquo;</li>
       </ul>
     </div>
     <div class="footer">
-    &copy; <a href="../copyright.html">Copyright</a> 1990-2015, Python 
Software Foundation.
+    &copy; <a href="../copyright.html">Copyright</a> 1990-2016, Python 
Software Foundation.
     <br />
     The Python Software Foundation is a non-profit corporation.
     <a href="https://www.python.org/psf/donations/";>Please donate.</a>
     <br />
-    Last updated on Oct 13, 2015.
+    Last updated on May 02, 2016.
     <a href="../bugs.html">Found a bug</a>?
     <br />
-    Created using <a href="http://sphinx.pocoo.org/";>Sphinx</a> 1.2.3.
+    Created using <a href="http://sphinx.pocoo.org/";>Sphinx</a> 1.3.3.
     </div>
 
   </body>
diff --git a/lib-python/2.7/idlelib/help.py b/lib-python/2.7/idlelib/help.py
--- a/lib-python/2.7/idlelib/help.py
+++ b/lib-python/2.7/idlelib/help.py
@@ -11,7 +11,7 @@
 Doc/library/idle.rst (Sphinx)=> Doc/build/html/library/idle.html
 (help.copy_strip)=> Lib/idlelib/help.html
 
-HelpParser - Parse help.html and and render to tk Text.
+HelpParser - Parse help.html and render to tk Text.
 
 HelpText - Display formatted help.html.
 
@@ -45,6 +45,8 @@
     The overridden handle_xyz methods handle a subset of html tags.
     The supplied text should have the needed tag configurations.
     The behavior for unsupported tags, such as table, is undefined.
+    If the tags generated by Sphinx change, this class, especially
+    the handle_starttag and handle_endtags methods, might have to also.
     """
     def __init__(self, text):
         HTMLParser.__init__(self)
@@ -229,7 +231,28 @@
 
 
 def copy_strip():
-    "Copy idle.html to idlelib/help.html, stripping trailing whitespace."
+    """Copy idle.html to idlelib/help.html, stripping trailing whitespace.
+
+    Files with trailing whitespace cannot be pushed to the hg cpython
+    repository.  For 3.x (on Windows), help.html is generated, after
+    editing idle.rst in the earliest maintenance version, with
+      sphinx-build -bhtml . build/html
+      python_d.exe -c "from idlelib.help import copy_strip; copy_strip()"
+    After refreshing TortoiseHG workshop to generate a diff,
+    check  both the diff and displayed text.  Push the diff along with
+    the idle.rst change and merge both into default (or an intermediate
+    maintenance version).
+
+    When the 'earlist' version gets its final maintenance release,
+    do an update as described above, without editing idle.rst, to
+    rebase help.html on the next version of idle.rst.  Do not worry
+    about version changes as version is not displayed.  Examine other
+    changes and the result of Help -> IDLE Help.
+
+    If maintenance and default versions of idle.rst diverge, and
+    merging does not go smoothly, then consider generating
+    separate help.html files from separate idle.htmls.
+    """
     src = join(abspath(dirname(dirname(dirname(__file__)))),
                'Doc', 'build', 'html', 'library', 'idle.html')
     dst = join(abspath(dirname(__file__)), 'help.html')
diff --git a/lib-python/2.7/idlelib/idle_test/README.txt 
b/lib-python/2.7/idlelib/idle_test/README.txt
--- a/lib-python/2.7/idlelib/idle_test/README.txt
+++ b/lib-python/2.7/idlelib/idle_test/README.txt
@@ -16,7 +16,7 @@
 
 The idle directory, idlelib, has over 60 xyz.py files. The idle_test
 subdirectory should contain a test_xyz.py for each, where 'xyz' is lowercased
-even if xyz.py is not. Here is a possible template, with the blanks after after
+even if xyz.py is not. Here is a possible template, with the blanks after
 '.' and 'as', and before and after '_' to be filled in.
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to