Skip to content

Commit 25c95f1

Browse files
committed
Merged revisions 70768,71657,71721,71729,71794,71976,72036-72037,72079,72085,72131-72134,72191,72197-72198,72219,72221,72225,72303,72434,72467,72476 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r70768 | andrew.kuchling | 2009-03-30 17:29:15 -0500 (Mon, 30 Mar 2009) | 1 line Typo fixes ........ r71657 | vinay.sajip | 2009-04-16 14:07:37 -0500 (Thu, 16 Apr 2009) | 1 line Issue #5768: Change to Unicode output logic and test case for same. ........ r71721 | benjamin.peterson | 2009-04-18 14:26:19 -0500 (Sat, 18 Apr 2009) | 1 line fix a few nits in unittest.py #5771 ........ r71729 | benjamin.peterson | 2009-04-18 16:03:10 -0500 (Sat, 18 Apr 2009) | 1 line move test to a more appropiate one ........ r71794 | vinay.sajip | 2009-04-22 07:10:47 -0500 (Wed, 22 Apr 2009) | 2 lines Issue #5170: Fixed regression caused when fixing #5768. ........ r71976 | mark.dickinson | 2009-04-26 14:54:55 -0500 (Sun, 26 Apr 2009) | 2 lines Fix typo in function name ........ r72036 | georg.brandl | 2009-04-27 12:04:23 -0500 (Mon, 27 Apr 2009) | 1 line #5848: small unittest doc patch. ........ r72037 | georg.brandl | 2009-04-27 12:09:53 -0500 (Mon, 27 Apr 2009) | 1 line #5840: dont claim we dont support TLS. ........ r72079 | r.david.murray | 2009-04-28 14:02:55 -0500 (Tue, 28 Apr 2009) | 2 lines Remove spurious 'u'. ........ r72085 | georg.brandl | 2009-04-28 16:48:35 -0500 (Tue, 28 Apr 2009) | 1 line Make the doctests in the docs pass, except for those in the turtle module. ........ r72131 | benjamin.peterson | 2009-04-29 17:43:35 -0500 (Wed, 29 Apr 2009) | 1 line fix test_shutil on ZFS #5676 ........ r72132 | georg.brandl | 2009-04-29 17:44:07 -0500 (Wed, 29 Apr 2009) | 1 line #5878: fix repr of re object. ........ r72133 | benjamin.peterson | 2009-04-29 17:44:15 -0500 (Wed, 29 Apr 2009) | 1 line make sure mode is removable while cleaning up test droppings ........ r72134 | benjamin.peterson | 2009-04-29 19:06:33 -0500 (Wed, 29 Apr 2009) | 1 line make sure to close file ........ r72191 | michael.foord | 2009-05-02 06:43:06 -0500 (Sat, 02 May 2009) | 9 lines Adds an exit parameter to unittest.main(). If False main no longer calls sys.exit. Closes issue 3379. Michael Foord ........ r72197 | benjamin.peterson | 2009-05-02 11:24:37 -0500 (Sat, 02 May 2009) | 1 line don't let sys.argv be used in the tests ........ r72198 | andrew.kuchling | 2009-05-02 12:12:15 -0500 (Sat, 02 May 2009) | 1 line Add items ........ r72219 | michael.foord | 2009-05-02 15:15:05 -0500 (Sat, 02 May 2009) | 8 lines Add addCleanup and doCleanups to unittest.TestCase. Closes issue 5679. Michael Foord ........ r72221 | benjamin.peterson | 2009-05-02 15:26:53 -0500 (Sat, 02 May 2009) | 1 line add myself ........ r72225 | michael.foord | 2009-05-02 17:43:34 -0500 (Sat, 02 May 2009) | 1 line ........ r72303 | benjamin.peterson | 2009-05-04 19:55:24 -0500 (Mon, 04 May 2009) | 1 line using sys._getframe(x), where x > 0 doesnt' work on IronPython ........ r72434 | r.david.murray | 2009-05-07 13:09:58 -0500 (Thu, 07 May 2009) | 2 lines Pre-opened test file needs to be opened in binary mode. ........ r72467 | georg.brandl | 2009-05-08 07:17:34 -0500 (Fri, 08 May 2009) | 1 line Fix name. ........ r72476 | thomas.heller | 2009-05-08 15:09:40 -0500 (Fri, 08 May 2009) | 4 lines Add a file that contains diffs between offical libffi files and the files in this repository. Should make it easier to merge new libffi versions. ........
1 parent 8a282d1 commit 25c95f1

File tree

22 files changed

+910
-146
lines changed

22 files changed

+910
-146
lines changed

Doc/c-api/init.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,9 @@ the I/O is waiting for the I/O operation to complete.
416416
The Python interpreter needs to keep some bookkeeping information separate per
417417
thread --- for this it uses a data structure called :ctype:`PyThreadState`.
418418
There's one global variable, however: the pointer to the current
419-
:ctype:`PyThreadState` structure. While most thread packages have a way to
420-
store "per-thread global data," Python's internal platform independent thread
421-
abstraction doesn't support this yet. Therefore, the current thread state must
422-
be manipulated explicitly.
419+
:ctype:`PyThreadState` structure. Before the addition of :dfn:`thread-local
420+
storage` (:dfn:`TLS`) the current thread state had to be manipulated
421+
explicitly.
423422

424423
This is easy enough in most cases. Most code manipulating the global
425424
interpreter lock has the following simple structure::

Doc/howto/functional.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ Here's a sample usage of the ``generate_ints()`` generator:
473473

474474
>>> gen = generate_ints(3)
475475
>>> gen
476-
<generator object at ...>
476+
<generator object generate_ints at ...>
477477
>>> next(gen)
478478
0
479479
>>> next(gen)

Doc/howto/regex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ performing string substitutions. ::
264264
>>> import re
265265
>>> p = re.compile('ab*')
266266
>>> p
267-
<re.RegexObject instance at 80b4150>
267+
<_sre.SRE_Pattern object at 80b4150>
268268

269269
:func:`re.compile` also accepts an optional *flags* argument, used to enable
270270
various special features and syntax variations. We'll go over the available

Doc/library/2to3.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ and off individually. They are described here in more detail.
352352
:synopsis: the 2to3 library
353353
.. moduleauthor:: Guido van Rossum
354354
.. moduleauthor:: Collin Winter
355+
.. moduleauthor:: Benjamin Peterson <benjamin@python.org>
355356

356357

357358
.. note::

Doc/library/collections.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,15 @@ For example::
169169
class is similar to bags or multisets in other languages.
170170

171171
Elements are counted from an *iterable* or initialized from another
172-
*mapping* (or counter)::
172+
*mapping* (or counter):
173173

174174
>>> c = Counter() # a new, empty counter
175175
>>> c = Counter('gallahad') # a new counter from an iterable
176176
>>> c = Counter({'red': 4, 'blue': 2}) # a new counter from a mapping
177177
>>> c = Counter(cats=4, dogs=8) # a new counter from keyword args
178178

179179
Counter objects have a dictionary interface except that they return a zero
180-
count for missing items instead of raising a :exc:`KeyError`::
180+
count for missing items instead of raising a :exc:`KeyError`:
181181

182182
>>> c = Counter(['eggs', 'ham'])
183183
>>> c['bacon'] # count of a missing element is zero
@@ -210,7 +210,7 @@ For example::
210210
Return a list of the *n* most common elements and their counts from the
211211
most common to the least. If *n* is not specified, :func:`most_common`
212212
returns *all* elements in the counter. Elements with equal counts are
213-
ordered arbitrarily::
213+
ordered arbitrarily:
214214

215215
>>> Counter('abracadabra').most_common(3)
216216
[('a', 5), ('r', 2), ('b', 2)]

Doc/library/decimal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1746,7 +1746,7 @@ the :const:`Inexact` trap is set, it is also useful for validation:
17461746
>>> Decimal('3.214').quantize(TWOPLACES, context=Context(traps=[Inexact]))
17471747
Traceback (most recent call last):
17481748
...
1749-
Inexact
1749+
Inexact: None
17501750

17511751
Q. Once I have valid two place inputs, how do I maintain that invariant
17521752
throughout an application?

Doc/library/json.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ Basic Usage
165165
document) to a Python object.
166166

167167
*object_hook* is an optional function that will be called with the result of
168-
any object literal decode (a :class:`dict`). The return value of
168+
any object literal decoded (a :class:`dict`). The return value of
169169
*object_hook* will be used instead of the :class:`dict`. This feature can be used
170170
to implement custom decoders (e.g. JSON-RPC class hinting).
171171

172172
*object_pairs_hook* is an optional function that will be called with the
173-
result of any object literal decode with an ordered list of pairs. The
173+
result of any object literal decoded with an ordered list of pairs. The
174174
return value of *object_pairs_hook* will be used instead of the
175175
:class:`dict`. This feature can be used to implement custom decoders that
176176
rely on the order that the key and value pairs are decoded (for example,

Doc/library/shelve.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
:mod:`shelve` --- Python object persistence
32
===========================================
43

@@ -35,7 +34,7 @@ lots of shared sub-objects. The keys are ordinary strings.
3534
accessed entries are written back (there is no way to determine which accessed
3635
entries are mutable, nor which ones were actually mutated).
3736

38-
Shelve objects support all methods supported by dictionaries. This eases the
37+
Shelf objects support all methods supported by dictionaries. This eases the
3938
transition from dictionary based scripts to those requiring persistent storage.
4039

4140
One additional method is supported:

Doc/library/subprocess.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ This module also defines four shortcut functions:
174174
:attr:`returncode`
175175
attribute and output in the :attr:`output` attribute.
176176

177-
The arguments are the same as for the :class:`Popen` constructor. Example:
177+
The arguments are the same as for the :class:`Popen` constructor. Example::
178178

179179
>>> subprocess.check_output(["ls", "-l", "/dev/null"])
180180
'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n'
181181

182182
The stdout argument is not allowed as it is used internally.
183-
To capture standard error in the result, use stderr=subprocess.STDOUT.
183+
To capture standard error in the result, use ``stderr=subprocess.STDOUT``::
184184

185185
>>> subprocess.check_output(
186186
["/bin/sh", "-c", "ls non_existent_file ; exit 0"],

Doc/library/traceback.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ The output for the example would look similar to this:
228228
*** extract_tb:
229229
[('<doctest...>', 10, '<module>', 'lumberjack()'),
230230
('<doctest...>', 4, 'lumberjack', 'bright_side_of_death()'),
231-
(u'<doctest...>', 7, 'bright_side_of_death', 'return tuple()[0]')]
231+
('<doctest...>', 7, 'bright_side_of_death', 'return tuple()[0]')]
232232
*** format_tb:
233233
[' File "<doctest...>", line 10, in <module>\n lumberjack()\n',
234234
' File "<doctest...>", line 4, in lumberjack\n bright_side_of_death()\n',

0 commit comments

Comments
 (0)