[Python-checkins] r86770 - in python/branches/release27-maint: Doc/c-api/init.rst Doc/library/locale.rst Doc/library/multiprocessing.rst Doc/library/runpy.rst Doc/library/threading.rst Lib/test/test_calendar.py
georg.brandl
python-checkins at python.org
Fri Nov 26 08:58:55 CET 2010
Author: georg.brandl
Date: Fri Nov 26 08:58:55 2010
New Revision: 86770
Log:
Merged revisions 85731,85735 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
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.
........
Modified:
python/branches/release27-maint/ (props changed)
python/branches/release27-maint/Doc/c-api/init.rst
python/branches/release27-maint/Doc/library/locale.rst
python/branches/release27-maint/Doc/library/multiprocessing.rst
python/branches/release27-maint/Doc/library/runpy.rst
python/branches/release27-maint/Doc/library/threading.rst
python/branches/release27-maint/Lib/test/test_calendar.py
Modified: python/branches/release27-maint/Doc/c-api/init.rst
==============================================================================
--- python/branches/release27-maint/Doc/c-api/init.rst (original)
+++ python/branches/release27-maint/Doc/c-api/init.rst Fri Nov 26 08:58:55 2010
@@ -418,7 +418,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
Modified: python/branches/release27-maint/Doc/library/locale.rst
==============================================================================
--- python/branches/release27-maint/Doc/library/locale.rst (original)
+++ python/branches/release27-maint/Doc/library/locale.rst Fri Nov 26 08:58:55 2010
@@ -40,7 +40,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
Modified: python/branches/release27-maint/Doc/library/multiprocessing.rst
==============================================================================
--- python/branches/release27-maint/Doc/library/multiprocessing.rst (original)
+++ python/branches/release27-maint/Doc/library/multiprocessing.rst Fri Nov 26 08:58:55 2010
@@ -216,7 +216,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
Modified: python/branches/release27-maint/Doc/library/runpy.rst
==============================================================================
--- python/branches/release27-maint/Doc/library/runpy.rst (original)
+++ python/branches/release27-maint/Doc/library/runpy.rst Fri Nov 26 08:58:55 2010
@@ -120,7 +120,7 @@
Note that, unlike :func:`run_module`, the alterations made to :mod:`sys`
are not optional in this function as these adjustments are essential to
- allowing the execution of sys.path entries. As the thread safety
+ allowing the execution of sys.path entries. As the thread-safety
limitations still apply, use of this function in threaded code should be
either serialised with the import lock or delegated to a separate process.
Modified: python/branches/release27-maint/Doc/library/threading.rst
==============================================================================
--- python/branches/release27-maint/Doc/library/threading.rst (original)
+++ python/branches/release27-maint/Doc/library/threading.rst Fri Nov 26 08:58:55 2010
@@ -781,9 +781,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
Modified: python/branches/release27-maint/Lib/test/test_calendar.py
==============================================================================
--- python/branches/release27-maint/Lib/test/test_calendar.py (original)
+++ python/branches/release27-maint/Lib/test/test_calendar.py Fri Nov 26 08:58:55 2010
@@ -252,16 +252,13 @@
def test_localecalendars(self):
# ensure that Locale{Text,HTML}Calendar resets the locale properly
# (it is still not thread-safe though)
+ old_october = calendar.TextCalendar().formatmonthname(2010, 10, 10)
try:
- def_locale = locale.getdefaultlocale()
+ calendar.LocaleTextCalendar(locale='').formatmonthname(2010, 10, 10)
except locale.Error:
- # cannot determine a default locale -- skip test
+ # cannot set the system default locale -- skip rest of test
return
- old_october = calendar.TextCalendar().formatmonthname(2010, 10, 10)
- calendar.LocaleTextCalendar(
- locale=def_locale).formatmonthname(2010, 10, 10)
- calendar.LocaleHTMLCalendar(
- locale=def_locale).formatmonthname(2010, 10)
+ calendar.LocaleHTMLCalendar(locale='').formatmonthname(2010, 10)
new_october = calendar.TextCalendar().formatmonthname(2010, 10, 10)
self.assertEquals(old_october, new_october)
More information about the Python-checkins
mailing list