Merged revisions 85728,85731,85735,85766-85771,85773,85777 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r85728 | georg.brandl | 2010-10-19 20:54:25 +0200 (Di, 19 Okt 2010) | 1 line

  #10092: Properly reset locale in Locale*Calendar classes.  The context manager was buggy because setlocale() returns the *new* locale, not the old.  Also add a test for this.
........
  r85731 | georg.brandl | 2010-10-19 23:07:16 +0200 (Di, 19 Okt 2010) | 1 line

  Be consistent in the spelling of thread-safe(ty).
........
  r85735 | georg.brandl | 2010-10-20 08:50:19 +0200 (Mi, 20 Okt 2010) | 1 line

  Fix r85728: use "" to mean the system default locale, which should work on more systems.
........
  r85766 | georg.brandl | 2010-10-21 09:40:03 +0200 (Do, 21 Okt 2010) | 1 line

  #10159: sort completion matches before comparing to dir() result.
........
  r85767 | georg.brandl | 2010-10-21 14:49:28 +0200 (Do, 21 Okt 2010) | 1 line

  #9095, #8912, #8999: add support in patchcheck for Mercurial checkouts, C file reindenting, and docs whitespace fixing.
........
  r85768 | georg.brandl | 2010-10-21 14:59:14 +0200 (Do, 21 Okt 2010) | 1 line

  #9919: fix off-by-one error in lineno command in Misc/gdbinit; also add newline to its output.
........
  r85769 | georg.brandl | 2010-10-21 15:01:23 +0200 (Do, 21 Okt 2010) | 1 line

  Fix missing import.
........
  r85770 | georg.brandl | 2010-10-21 15:29:10 +0200 (Do, 21 Okt 2010) | 1 line

  #3077: fix h2py substitution of character literals.
........
  r85771 | georg.brandl | 2010-10-21 15:34:51 +0200 (Do, 21 Okt 2010) | 1 line

  #1203650: allow larger list of files in windows makefile for freeze.
........
  r85773 | georg.brandl | 2010-10-21 15:45:52 +0200 (Do, 21 Okt 2010) | 1 line

  #4829: better error message for invalid file mode
........
  r85777 | georg.brandl | 2010-10-21 17:44:51 +0200 (Do, 21 Okt 2010) | 1 line

  Add .hgeol file for the Mercurial EOL extension.
........
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index a176e5a..f821ee1 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -416,7 +416,7 @@
    single: interpreter lock
    single: lock, interpreter
 
-The Python interpreter is not fully thread safe.  In order to support
+The Python interpreter is not fully thread-safe.  In order to support
 multi-threaded Python programs, there's a global lock, called the :dfn:`global
 interpreter lock` or :dfn:`GIL`, that must be held by the current thread before
 it can safely access Python objects. Without the lock, even the simplest
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index 2228920..c8dac49 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -170,9 +170,9 @@
 .. class:: LocaleTextCalendar(firstweekday=0, locale=None)
 
    This subclass of :class:`TextCalendar` can be passed a locale name in the
-   constructor and will return month and weekday names in the specified
-   locale. If this locale includes an encoding all strings containing month and
-   weekday names will be returned as unicode.
+   constructor and will return month and weekday names in the specified locale.
+   If this locale includes an encoding all strings containing month and weekday
+   names will be returned as unicode.
 
 
 .. class:: LocaleHTMLCalendar(firstweekday=0, locale=None)
@@ -182,6 +182,12 @@
    locale. If this locale includes an encoding all strings containing month and
    weekday names will be returned as unicode.
 
+.. note::
+
+   The :meth:`formatweekday` and :meth:`formatmonthname` methods of these two
+   classes temporarily change the current locale to the given *locale*.  Because
+   the current locale is a process-wide setting, they are not thread-safe.
+
 
 For simple text calendars this module provides the following functions.
 
diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst
index b9c001f..601c949 100644
--- a/Doc/library/locale.rst
+++ b/Doc/library/locale.rst
@@ -39,7 +39,7 @@
    If *locale* is omitted or ``None``, the current setting for *category* is
    returned.
 
-   :func:`setlocale` is not thread safe on most systems. Applications typically
+   :func:`setlocale` is not thread-safe on most systems. Applications typically
    start with a call of ::
 
       import locale
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 264d432..c4ee87e 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -214,7 +214,7 @@
    The ``'d'`` and ``'i'`` arguments used when creating ``num`` and ``arr`` are
    typecodes of the kind used by the :mod:`array` module: ``'d'`` indicates a
    double precision float and ``'i'`` indicates a signed integer.  These shared
-   objects will be process and thread safe.
+   objects will be process and thread-safe.
 
    For more flexibility in using shared memory one can use the
    :mod:`multiprocessing.sharedctypes` module which supports the creation of
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index 2e36402..8b4babc 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -753,9 +753,9 @@
 Importing in threaded code
 --------------------------
 
-While the import machinery is thread safe, there are two key
-restrictions on threaded imports due to inherent limitations in the way
-that thread safety is provided:
+While the import machinery is thread-safe, there are two key restrictions on
+threaded imports due to inherent limitations in the way that thread-safety is
+provided:
 
 * Firstly, other than in the main module, an import should not have the
   side effect of spawning a new thread and then waiting for that thread in