Skip to content

Commit 47fe981

Browse files
committed
Merged revisions 67952-67953,67955,67957-67958,67960-67961,67963,67965,67967,67970-67971,67973,67982,67988,67990,67995,68014,68016,68030,68057,68061,68112,68115-68118,68120-68121,68123-68128 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67952 | georg.brandl | 2008-12-27 18:42:40 +0100 (Sat, 27 Dec 2008) | 2 lines python#4752: actually use custom handler in example. ........ r67953 | georg.brandl | 2008-12-27 19:20:04 +0100 (Sat, 27 Dec 2008) | 3 lines Patch python#4739 by David Laban: add symbols to pydoc help topics, so that ``help('@')`` works as expected. ........ r67955 | georg.brandl | 2008-12-27 19:27:53 +0100 (Sat, 27 Dec 2008) | 3 lines Follow-up to r67746 in order to restore backwards-compatibility for those who (monkey-)patch TextWrapper.wordsep_re with a custom RE. ........ r67957 | georg.brandl | 2008-12-27 19:49:19 +0100 (Sat, 27 Dec 2008) | 2 lines python#4754: improve winsound documentation. ........ r67958 | georg.brandl | 2008-12-27 20:02:59 +0100 (Sat, 27 Dec 2008) | 2 lines python#4682: 'b' is actually unsigned char. ........ r67960 | georg.brandl | 2008-12-27 20:04:44 +0100 (Sat, 27 Dec 2008) | 2 lines python#4695: fix backslashery. ........ r67961 | georg.brandl | 2008-12-27 20:06:04 +0100 (Sat, 27 Dec 2008) | 2 lines Use :samp: role. ........ r67963 | georg.brandl | 2008-12-27 20:11:15 +0100 (Sat, 27 Dec 2008) | 2 lines python#4671: document that pydoc imports modules. ........ r67965 | antoine.pitrou | 2008-12-27 21:34:52 +0100 (Sat, 27 Dec 2008) | 3 lines Issue python#4677: add two list comprehension tests to pybench. ........ r67967 | benjamin.peterson | 2008-12-27 23:18:58 +0100 (Sat, 27 Dec 2008) | 1 line fix markup ........ r67970 | alexandre.vassalotti | 2008-12-28 02:52:58 +0100 (Sun, 28 Dec 2008) | 2 lines Fix name mangling of PyUnicode_ClearFreeList. ........ r67971 | alexandre.vassalotti | 2008-12-28 03:10:35 +0100 (Sun, 28 Dec 2008) | 2 lines Sort UCS-2/UCS-4 name mangling list. ........ r67973 | alexandre.vassalotti | 2008-12-28 03:58:22 +0100 (Sun, 28 Dec 2008) | 2 lines Document Py_VaBuildValue. ........ r67982 | benjamin.peterson | 2008-12-28 16:37:31 +0100 (Sun, 28 Dec 2008) | 1 line fix WORD_BIGEDIAN declaration in Universal builds; fixes python#4060 and python#4728 ........ r67988 | ronald.oussoren | 2008-12-28 20:40:56 +0100 (Sun, 28 Dec 2008) | 1 line Issue4064: architecture string for universal builds on OSX ........ r67990 | ronald.oussoren | 2008-12-28 20:50:40 +0100 (Sun, 28 Dec 2008) | 3 lines Update the fix for issue4064 to deal correctly with all three variants of universal builds that are presented by the configure script. ........ r67995 | benjamin.peterson | 2008-12-28 22:16:07 +0100 (Sun, 28 Dec 2008) | 1 line python#4763 PyErr_ExceptionMatches won't blow up with NULL arguments ........ r68014 | benjamin.peterson | 2008-12-29 18:47:42 +0100 (Mon, 29 Dec 2008) | 1 line python#4764 set IOError.filename when trying to open a directory on POSIX platforms ........ r68016 | benjamin.peterson | 2008-12-29 18:56:58 +0100 (Mon, 29 Dec 2008) | 1 line python#4764 in io.open, set IOError.filename when trying to open a directory on POSIX platforms ........ r68030 | benjamin.peterson | 2008-12-29 22:38:14 +0100 (Mon, 29 Dec 2008) | 1 line fix French ........ r68057 | vinay.sajip | 2008-12-30 08:01:25 +0100 (Tue, 30 Dec 2008) | 1 line Minor documentation change relating to NullHandler. ........ r68061 | georg.brandl | 2008-12-30 11:15:49 +0100 (Tue, 30 Dec 2008) | 2 lines python#4778: attributes can't be called. ........ r68112 | benjamin.peterson | 2009-01-01 00:48:39 +0100 (Thu, 01 Jan 2009) | 1 line python#4795 inspect.isgeneratorfunction() should return False instead of None ........ r68115 | benjamin.peterson | 2009-01-01 05:04:41 +0100 (Thu, 01 Jan 2009) | 1 line simplfy code ........ r68116 | georg.brandl | 2009-01-01 12:46:51 +0100 (Thu, 01 Jan 2009) | 2 lines python#4100: note that element children are not necessarily present on "start" events. ........ r68117 | georg.brandl | 2009-01-01 12:53:55 +0100 (Thu, 01 Jan 2009) | 2 lines python#4156: make clear that "protocol" is to be replaced with the protocol name. ........ r68118 | georg.brandl | 2009-01-01 13:00:19 +0100 (Thu, 01 Jan 2009) | 2 lines python#4185: clarify escape behavior of replacement strings. ........ r68120 | georg.brandl | 2009-01-01 13:15:31 +0100 (Thu, 01 Jan 2009) | 4 lines python#4228: Pack negative values the same way as 2.4 in struct's L format. ........ r68121 | georg.brandl | 2009-01-01 13:43:33 +0100 (Thu, 01 Jan 2009) | 2 lines Point to types module in new module deprecation notice. ........ r68123 | georg.brandl | 2009-01-01 13:52:29 +0100 (Thu, 01 Jan 2009) | 2 lines python#4784: ... on three counts ... ........ r68124 | georg.brandl | 2009-01-01 13:53:19 +0100 (Thu, 01 Jan 2009) | 2 lines python#4782: Fix markup error that hid load() and loads(). ........ r68125 | georg.brandl | 2009-01-01 14:02:09 +0100 (Thu, 01 Jan 2009) | 2 lines python#4776: add data_files and package_dir arguments. ........ r68126 | georg.brandl | 2009-01-01 14:05:13 +0100 (Thu, 01 Jan 2009) | 2 lines Handlers are in the `logging.handlers` module. ........ r68127 | georg.brandl | 2009-01-01 14:14:49 +0100 (Thu, 01 Jan 2009) | 2 lines python#4767: Use correct submodules for all MIME classes. ........ r68128 | antoine.pitrou | 2009-01-01 15:11:22 +0100 (Thu, 01 Jan 2009) | 3 lines Issue python#3680: Reference cycles created through a dict, set or deque iterator did not get collected. ........
1 parent b5fc36c commit 47fe981

35 files changed

Lines changed: 438 additions & 110 deletions

Doc/c-api/arg.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ variable(s) whose address should be passed.
136136
them. Instead, the implementation assumes that the string object uses the
137137
encoding passed in as parameter.
138138

139-
``b`` (integer) [char]
140-
Convert a Python integer to a tiny int, stored in a C :ctype:`char`.
139+
``b`` (integer) [unsigned char]
140+
Convert a nonnegative Python integer to an unsigned tiny int, stored in a C
141+
:ctype:`unsigned char`.
141142

142143
``B`` (integer) [unsigned char]
143144
Convert a Python integer to a tiny int without overflow checking, stored in a C
@@ -533,3 +534,8 @@ and the following format units are left untouched.
533534

534535
If there is an error in the format string, the :exc:`SystemError` exception is
535536
set and *NULL* returned.
537+
538+
.. cfunction:: PyObject* Py_VaBuildValue(const char *format, va_list vargs)
539+
540+
Identical to :cfunc:`Py_BuildValue`, except that it accepts a va_list
541+
rather than a variable number of arguments.

Doc/c-api/exceptions.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ is a separate error indicator for each thread.
7373

7474
.. cfunction:: int PyErr_GivenExceptionMatches(PyObject *given, PyObject *exc)
7575

76-
Return true if the *given* exception matches the exception in *exc*. If *exc*
77-
is a class object, this also returns true when *given* is an instance of a
78-
subclass. If *exc* is a tuple, all exceptions in the tuple (and recursively in
79-
subtuples) are searched for a match. If *given* is *NULL*, a memory access
80-
violation will occur.
76+
Return true if the *given* exception matches the exception in *exc*. If
77+
*exc* is a class object, this also returns true when *given* is an instance
78+
of a subclass. If *exc* is a tuple, all exceptions in the tuple (and
79+
recursively in subtuples) are searched for a match.
8180

8281

8382
.. cfunction:: void PyErr_NormalizeException(PyObject**exc, PyObject**val, PyObject**tb)

Doc/distutils/apiref.rst

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,23 @@ setup script). Indirectly provides the :class:`distutils.dist.Distribution` and
8888
| *options* | default options for the setup | a string |
8989
| | script | |
9090
+--------------------+--------------------------------+-------------------------------------------------------------+
91-
| *license* | The license for the package | |
91+
| *license* | The license for the package | a string |
9292
+--------------------+--------------------------------+-------------------------------------------------------------+
93-
| *keywords* | Descriptive meta-data. See | |
93+
| *keywords* | Descriptive meta-data, see | |
9494
| | :pep:`314` | |
9595
+--------------------+--------------------------------+-------------------------------------------------------------+
9696
| *platforms* | | |
9797
+--------------------+--------------------------------+-------------------------------------------------------------+
9898
| *cmdclass* | A mapping of command names to | a dictionary |
9999
| | :class:`Command` subclasses | |
100100
+--------------------+--------------------------------+-------------------------------------------------------------+
101+
| *data_files* | A list of data files to | a list |
102+
| | install | |
103+
+--------------------+--------------------------------+-------------------------------------------------------------+
104+
| *package_dir* | A mapping of package to | a dictionary |
105+
| | directory names | |
106+
+--------------------+--------------------------------+-------------------------------------------------------------+
107+
101108

102109

103110
.. function:: run_setup(script_name[, script_args=None, stop_after='run'])
@@ -1100,6 +1107,24 @@ other utility module.
11001107

11011108
For non-POSIX platforms, currently just returns ``sys.platform``.
11021109

1110+
For MacOS X systems the OS version reflects the minimal version on which
1111+
binaries will run (that is, the value of ``MACOSX_DEPLOYMENT_TARGET``
1112+
during the build of Python), not the OS version of the current system.
1113+
1114+
For universal binary builds on MacOS X the architecture value reflects
1115+
the univeral binary status instead of the architecture of the current
1116+
processor. For 32-bit universal binaries the architecture is ``fat``,
1117+
for 64-bit universal binaries the architecture is ``fat64``, and
1118+
for 4-way universal binaries the architecture is ``universal``.
1119+
1120+
Examples of returned values on MacOS X:
1121+
1122+
* ``macosx-10.3-ppc``
1123+
1124+
* ``macosx-10.3-fat``
1125+
1126+
* ``macosx-10.5-universal``
1127+
11031128
.. % XXX isn't this also provided by some other non-distutils module?
11041129
11051130

Doc/howto/unicode.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ For a while people just wrote programs that didn't display accents. I remember
3030
looking at Apple ][ BASIC programs, published in French-language publications in
3131
the mid-1980s, that had lines like these::
3232

33-
PRINT "FICHER EST COMPLETE."
33+
PRINT "FICHIER EST COMPLETE."
3434
PRINT "CARACTERE NON ACCEPTE."
3535

3636
Those messages should contain accents, and they just look wrong to someone who

Doc/library/email.mime.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ things easier.
1919

2020
Here are the classes:
2121

22+
.. currentmodule:: email.mime.base
2223

2324
.. class:: MIMEBase(_maintype, _subtype, **_params)
2425

@@ -39,6 +40,8 @@ Here are the classes:
3940
:mailheader:`MIME-Version` header (always set to ``1.0``).
4041

4142

43+
.. currentmodule:: email.mime.nonmultipart
44+
4245
.. class:: MIMENonMultipart()
4346

4447
Module: :mod:`email.mime.nonmultipart`
@@ -52,6 +55,8 @@ Here are the classes:
5255
.. versionadded:: 2.2.2
5356

5457

58+
.. currentmodule:: email.mime.multipart
59+
5560
.. class:: MIMEMultipart([subtype[, boundary[, _subparts[, _params]]]])
5661

5762
Module: :mod:`email.mime.multipart`
@@ -77,6 +82,8 @@ Here are the classes:
7782
.. versionadded:: 2.2.2
7883

7984

85+
.. currentmodule:: email.mime.application
86+
8087
.. class:: MIMEApplication(_data[, _subtype[, _encoder[, **_params]]])
8188

8289
Module: :mod:`email.mime.application`
@@ -99,6 +106,8 @@ Here are the classes:
99106
.. versionadded:: 2.5
100107

101108

109+
.. currentmodule:: email.mime.audio
110+
102111
.. class:: MIMEAudio(_audiodata[, _subtype[, _encoder[, **_params]]])
103112

104113
Module: :mod:`email.mime.audio`
@@ -122,6 +131,8 @@ Here are the classes:
122131
*_params* are passed straight through to the base class constructor.
123132

124133

134+
.. currentmodule:: email.mime.image
135+
125136
.. class:: MIMEImage(_imagedata[, _subtype[, _encoder[, **_params]]])
126137

127138
Module: :mod:`email.mime.image`
@@ -145,6 +156,8 @@ Here are the classes:
145156
*_params* are passed straight through to the :class:`MIMEBase` constructor.
146157

147158

159+
.. currentmodule:: email.mime.message
160+
148161
.. class:: MIMEMessage(_msg[, _subtype])
149162

150163
Module: :mod:`email.mime.message`
@@ -158,6 +171,8 @@ Here are the classes:
158171
:mimetype:`rfc822`.
159172

160173

174+
.. currentmodule:: email.mime.text
175+
161176
.. class:: MIMEText(_text[, _subtype[, _charset]])
162177

163178
Module: :mod:`email.mime.text`

Doc/library/json.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Basic Usage
166166
:func:`dump`.
167167

168168

169-
.. function load(fp[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, **kw]]]]]]])
169+
.. function:: load(fp[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, **kw]]]]]]])
170170

171171
Deserialize *fp* (a ``.read()``-supporting file-like object containing a JSON
172172
document) to a Python object.
@@ -202,7 +202,7 @@ Basic Usage
202202
class.
203203

204204

205-
.. function loads(s[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, **kw]]]]]]])
205+
.. function:: loads(s[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, **kw]]]]]]])
206206

207207
Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a JSON
208208
document) to a Python object.

Doc/library/logging.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,10 +553,10 @@ provided:
553553
#. :class:`HTTPHandler` instances send error messages to an HTTP server using
554554
either ``GET`` or ``POST`` semantics.
555555

556-
The :class:`StreamHandler` and :class:`FileHandler` classes are defined in the
557-
core logging package. The other handlers are defined in a sub- module,
558-
:mod:`logging.handlers`. (There is also another sub-module,
559-
:mod:`logging.config`, for configuration functionality.)
556+
The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler`
557+
classes are defined in the core logging package. The other handlers are
558+
defined in a sub- module, :mod:`logging.handlers`. (There is also another
559+
sub-module, :mod:`logging.config`, for configuration functionality.)
560560

561561
Logged messages are formatted for presentation through instances of the
562562
:class:`Formatter` class. They are initialized with a format string suitable for
@@ -1544,6 +1544,8 @@ subclasses. However, the :meth:`__init__` method in subclasses needs to call
15441544
StreamHandler
15451545
^^^^^^^^^^^^^
15461546

1547+
.. module:: logging.handlers
1548+
15471549
The :class:`StreamHandler` class, located in the core :mod:`logging` package,
15481550
sends logging output to streams such as *sys.stdout*, *sys.stderr* or any
15491551
file-like object (or, more precisely, any object which supports :meth:`write`
@@ -2050,6 +2052,8 @@ supports sending logging messages to a Web server, using either ``GET`` or
20502052
Formatter Objects
20512053
-----------------
20522054

2055+
.. currentmodule:: logging
2056+
20532057
:class:`Formatter`\ s have the following attributes and methods. They are
20542058
responsible for converting a :class:`LogRecord` to (usually) a string which can
20552059
be interpreted by either a human or an external system. The base

Doc/library/multiprocessing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ The :mod:`multiprocessing` package mostly replicates the API of the
358358

359359
.. attribute:: daemon
360360

361-
The process's daemon flag, a Boolean value. This must be called before
361+
The process's daemon flag, a Boolean value. This must be set before
362362
:meth:`start` is called.
363363

364364
The initial value is inherited from the creating process.
@@ -1810,9 +1810,9 @@ Address Formats
18101810
filesystem.
18111811

18121812
* An ``'AF_PIPE'`` address is a string of the form
1813-
``r'\\\\.\\pipe\\PipeName'``. To use :func:`Client` to connect to a named
1813+
:samp:`r'\\\\.\\pipe\\{PipeName}'`. To use :func:`Client` to connect to a named
18141814
pipe on a remote computer called ServerName* one should use an address of the
1815-
form ``r'\\\\ServerName\\pipe\\PipeName'`` instead.
1815+
form :samp:`r'\\\\{ServerName}\\pipe\\{PipeName}'`` instead.
18161816

18171817
Note that any string beginning with two backslashes is assumed by default to be
18181818
an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.

Doc/library/new.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
:mod:`new` --- Creation of runtime internal objects
32
===================================================
43

@@ -7,7 +6,8 @@
76
:deprecated:
87

98
.. deprecated:: 2.6
10-
The :mod:`new` module has been removed in Python 3.0.
9+
The :mod:`new` module has been removed in Python 3.0. Use the :mod:`types`
10+
module's classes instead.
1111

1212
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
1313

Doc/library/pydoc.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ it contains the path separator for your operating system, such as a slash in
3636
Unix), and refers to an existing Python source file, then documentation is
3737
produced for that file.
3838

39+
.. note::
40+
41+
In order to find objects and their documentation, :mod:`pydoc` imports the
42+
module(s) to be documented. Therefore, any code on module level will be
43+
executed on that occasion. Use an ``if __name__ == '__main__':`` guard to
44+
only execute code when a file is invoked as a script and not just imported.
45+
3946
Specifying a :option:`-w` flag before the argument will cause HTML documentation
4047
to be written out to a file in the current directory, instead of displaying text
4148
on the console.

0 commit comments

Comments
 (0)