Skip to content

Commit

Permalink
Merged revisions 70712,70714,70764-70765,70769-70771,70773,70776-7077…
Browse files Browse the repository at this point in the history
…7,70788-70789,70824,70828,70832,70836,70842,70851,70855,70857,70866-70872,70883,70885,70893-70894,70896-70897,70903,70905-70907,70915,70927,70933,70951,70960,70962-70964,70998,71001,71006,71008,71010-71011,71019,71037,71056,71094,71101-71103,71106,71119,71123,71149-71150,71203,71212,71214-71217,71221,71240 via svnmerge from

svn+ssh://[email protected]/python/trunk

........
  r70712 | benjamin.peterson | 2009-03-30 10:15:38 -0500 (Mon, 30 Mar 2009) | 1 line

  don't rely on the order dict repr python#5605
........
  r70714 | brett.cannon | 2009-03-30 10:20:53 -0500 (Mon, 30 Mar 2009) | 1 line

  Add an entry to developers.txt.
........
  r70764 | martin.v.loewis | 2009-03-30 17:06:33 -0500 (Mon, 30 Mar 2009) | 2 lines

  Add several VM developers.
........
  r70765 | georg.brandl | 2009-03-30 17:09:34 -0500 (Mon, 30 Mar 2009) | 1 line

  python#5199: make warning about vars() assignment more visible.
........
  r70769 | andrew.kuchling | 2009-03-30 17:29:53 -0500 (Mon, 30 Mar 2009) | 1 line

  Remove comment
........
  r70770 | andrew.kuchling | 2009-03-30 17:30:20 -0500 (Mon, 30 Mar 2009) | 1 line

  Add several items and placeholders
........
  r70771 | andrew.kuchling | 2009-03-30 17:31:11 -0500 (Mon, 30 Mar 2009) | 1 line

  Many edits
........
  r70773 | georg.brandl | 2009-03-30 17:43:00 -0500 (Mon, 30 Mar 2009) | 1 line

  python#5039: make it clear that the impl. note refers to CPython.
........
  r70776 | andrew.kuchling | 2009-03-30 18:08:24 -0500 (Mon, 30 Mar 2009) | 1 line

  typo fix
........
  r70777 | andrew.kuchling | 2009-03-30 18:09:46 -0500 (Mon, 30 Mar 2009) | 1 line

  Add more items
........
  r70788 | andrew.kuchling | 2009-03-30 20:21:01 -0500 (Mon, 30 Mar 2009) | 1 line

  Add various items
........
  r70789 | georg.brandl | 2009-03-30 20:25:15 -0500 (Mon, 30 Mar 2009) | 1 line

  Fix a wrong struct field assignment (docstring as closure).
........
  r70824 | georg.brandl | 2009-03-31 10:43:20 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5519: remove reference to Kodos, which seems dead.
........
  r70828 | georg.brandl | 2009-03-31 10:50:16 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5581: fget argument of abstractproperty is optional as well.
........
  r70832 | georg.brandl | 2009-03-31 11:31:11 -0500 (Tue, 31 Mar 2009) | 1 line

  #1386675: specify WindowsError as the exception, because it has a winerror attribute that EnvironmentError doesnt have.
........
  r70836 | georg.brandl | 2009-03-31 11:50:25 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5417: replace references to undocumented functions by ones to documented functions.
........
  r70842 | georg.brandl | 2009-03-31 12:13:06 -0500 (Tue, 31 Mar 2009) | 1 line

  #970783: document PyObject_Generic[GS]etAttr.
........
  r70851 | georg.brandl | 2009-03-31 13:26:55 -0500 (Tue, 31 Mar 2009) | 1 line

  #837577: note cryptic return value of spawn*e on invalid env dicts.
........
  r70855 | georg.brandl | 2009-03-31 13:30:37 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5245: note that PyRun_SimpleString doesnt return on SystemExit.
........
  r70857 | georg.brandl | 2009-03-31 13:33:10 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5227: note that Py_Main doesnt return on SystemExit.
........
  r70866 | georg.brandl | 2009-03-31 14:06:57 -0500 (Tue, 31 Mar 2009) | 1 line

  python#4882: document named group behavior a bit better.
........
  r70867 | georg.brandl | 2009-03-31 14:10:35 -0500 (Tue, 31 Mar 2009) | 1 line

  #1096310: document usage of sys.__std*__ a bit better.
........
  r70868 | georg.brandl | 2009-03-31 14:12:17 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5190: export make_option in __all__.
........
  r70869 | georg.brandl | 2009-03-31 14:14:42 -0500 (Tue, 31 Mar 2009) | 1 line

  Fix-up unwanted change.
........
  r70870 | georg.brandl | 2009-03-31 14:26:24 -0500 (Tue, 31 Mar 2009) | 1 line

  python#4411: document mro() and __mro__. (I hope I got it right.)
........
  r70871 | georg.brandl | 2009-03-31 14:30:56 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5618: fix typo.
........
  r70872 | r.david.murray | 2009-03-31 14:31:17 -0500 (Tue, 31 Mar 2009) | 3 lines

  Delete out-of-date and little-known README from the test
  directory by consensus of devs at pycon sprint.
........
  r70883 | georg.brandl | 2009-03-31 15:41:08 -0500 (Tue, 31 Mar 2009) | 1 line

  #1674032: return value of flag from Event.wait(). OKed by Guido.
........
  r70885 | tarek.ziade | 2009-03-31 15:48:31 -0500 (Tue, 31 Mar 2009) | 1 line

  using log.warn for sys.stderr
........
  r70893 | georg.brandl | 2009-03-31 15:56:32 -0500 (Tue, 31 Mar 2009) | 1 line

  #1530012: move TQS section before raw strings.
........
  r70894 | benjamin.peterson | 2009-03-31 16:06:30 -0500 (Tue, 31 Mar 2009) | 1 line

  take the usual lock precautions around _active_limbo_lock
........
  r70896 | georg.brandl | 2009-03-31 16:15:33 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5598: document DocFileSuite *args argument.
........
  r70897 | benjamin.peterson | 2009-03-31 16:34:42 -0500 (Tue, 31 Mar 2009) | 1 line

  fix Thread.ident when it is the main thread or a dummy thread python#5632
........
  r70903 | georg.brandl | 2009-03-31 16:45:18 -0500 (Tue, 31 Mar 2009) | 1 line

  #1676135: remove trailing slashes from --prefix argument.
........
  r70905 | georg.brandl | 2009-03-31 17:03:40 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5563: more documentation for bdist_msi.
........
  r70906 | georg.brandl | 2009-03-31 17:11:53 -0500 (Tue, 31 Mar 2009) | 1 line

  #1651995: fix _convert_ref for non-ASCII characters.
........
  r70907 | georg.brandl | 2009-03-31 17:18:19 -0500 (Tue, 31 Mar 2009) | 1 line

  python#3427: document correct return type for urlopen().info().
........
  r70915 | georg.brandl | 2009-03-31 17:40:16 -0500 (Tue, 31 Mar 2009) | 1 line

  python#5018: remove confusing paragraph.
........
  r70927 | georg.brandl | 2009-03-31 18:01:27 -0500 (Tue, 31 Mar 2009) | 1 line

  Dont shout to users.
........
  r70933 | georg.brandl | 2009-03-31 19:04:33 -0500 (Tue, 31 Mar 2009) | 2 lines

  Issue python#5635: Fix running test_sys with tracing enabled.
........
  r70951 | georg.brandl | 2009-04-01 09:02:27 -0500 (Wed, 01 Apr 2009) | 1 line

  Add Maksim, who worked on several issues at the sprint.
........
  r70960 | jesse.noller | 2009-04-01 11:42:19 -0500 (Wed, 01 Apr 2009) | 1 line

  Issue 3270: document Listener address restrictions on windows
........
  r70962 | brett.cannon | 2009-04-01 12:07:16 -0500 (Wed, 01 Apr 2009) | 2 lines

  Ron DuPlain was given commit privileges at PyCon 2009 to work on 3to2.
........
  r70963 | georg.brandl | 2009-04-01 12:46:01 -0500 (Wed, 01 Apr 2009) | 1 line

  python#5655: fix docstring oversight.
........
  r70964 | brett.cannon | 2009-04-01 12:52:13 -0500 (Wed, 01 Apr 2009) | 2 lines

  Paul Kippes was given commit privileges to work on 3to2.
........
  r70998 | georg.brandl | 2009-04-01 16:54:21 -0500 (Wed, 01 Apr 2009) | 1 line

  In Pdb, stop assigning values to __builtin__._ which interferes with the one commonly installed by gettext.
........
  r71001 | brett.cannon | 2009-04-01 18:01:12 -0500 (Wed, 01 Apr 2009) | 3 lines

  Add my initials to Misc/developers.txt. Names are now sorted by number of
  characters in the person's name.
........
  r71006 | georg.brandl | 2009-04-01 18:32:17 -0500 (Wed, 01 Apr 2009) | 1 line

  Cache the f_locals dict of the current frame, since every access to frame.f_locals overrides its contents with the real locals which undoes modifications made by the debugging user.
........
  r71008 | andrew.kuchling | 2009-04-01 19:02:14 -0500 (Wed, 01 Apr 2009) | 1 line

  Typo fix
........
  r71010 | benjamin.peterson | 2009-04-01 19:11:52 -0500 (Wed, 01 Apr 2009) | 1 line

  fix markup
........
  r71011 | benjamin.peterson | 2009-04-01 19:12:47 -0500 (Wed, 01 Apr 2009) | 1 line

  this should be :noindex:
........
  r71019 | georg.brandl | 2009-04-01 21:00:01 -0500 (Wed, 01 Apr 2009) | 1 line

  Fix test_doctest, missed two assignments to curframe.
........
  r71037 | r.david.murray | 2009-04-01 23:34:04 -0500 (Wed, 01 Apr 2009) | 6 lines

  Clarify that datetime strftime does not produce leap seconds and datetime
  strptime does not accept it in the strftime behavior section of the
  datetime docs.

  Closes issue 2568.
........
  r71056 | georg.brandl | 2009-04-02 12:43:07 -0500 (Thu, 02 Apr 2009) | 2 lines

  Actually the displayhook should print the repr.
........
  r71094 | vinay.sajip | 2009-04-03 05:23:18 -0500 (Fri, 03 Apr 2009) | 1 line

  Added warning about logging use from asynchronous signal handlers.
........
  r71101 | andrew.kuchling | 2009-04-03 16:43:00 -0500 (Fri, 03 Apr 2009) | 1 line

  Add some items
........
  r71102 | andrew.kuchling | 2009-04-03 16:44:49 -0500 (Fri, 03 Apr 2009) | 1 line

  Fix 'the the'; grammar fix
........
  r71103 | andrew.kuchling | 2009-04-03 16:45:29 -0500 (Fri, 03 Apr 2009) | 1 line

  Fix 'the the' duplication
........
  r71106 | vinay.sajip | 2009-04-03 16:58:16 -0500 (Fri, 03 Apr 2009) | 1 line

  Clarified warning about logging use from asynchronous signal handlers.
........
  r71119 | raymond.hettinger | 2009-04-04 00:37:47 -0500 (Sat, 04 Apr 2009) | 1 line

  Add helpful link.
........
  r71123 | r.david.murray | 2009-04-04 01:39:56 -0500 (Sat, 04 Apr 2009) | 2 lines

  Fix error in description of 'oct' (issue 5678).
........
  r71149 | georg.brandl | 2009-04-04 08:42:39 -0500 (Sat, 04 Apr 2009) | 1 line

  python#5642: clarify map() compatibility to the builtin.
........
  r71150 | georg.brandl | 2009-04-04 08:45:49 -0500 (Sat, 04 Apr 2009) | 1 line

  python#5601: clarify that webbrowser is not meant for file names.
........
  r71203 | benjamin.peterson | 2009-04-04 18:46:34 -0500 (Sat, 04 Apr 2009) | 1 line

  note how using iter* are unsafe while mutating and document iter(dict)
........
  r71212 | georg.brandl | 2009-04-05 05:24:20 -0500 (Sun, 05 Apr 2009) | 1 line

  #1742837: expand HTTP server docs, and fix SocketServer ones to document methods as methods, not functions.
........
  r71214 | georg.brandl | 2009-04-05 05:29:57 -0500 (Sun, 05 Apr 2009) | 1 line

  Normalize spelling of Mac OS X.
........
  r71215 | georg.brandl | 2009-04-05 05:32:26 -0500 (Sun, 05 Apr 2009) | 1 line

  Avoid sure signs of a diseased mind.
........
  r71216 | georg.brandl | 2009-04-05 05:41:02 -0500 (Sun, 05 Apr 2009) | 1 line

  #1718017: document the relation of os.path and the posixpath, ntpath etc. modules better.
........
  r71217 | georg.brandl | 2009-04-05 05:48:47 -0500 (Sun, 05 Apr 2009) | 1 line

  #1726172: dont raise an unexpected IndexError if a voidresp() call has an empty response.
........
  r71221 | vinay.sajip | 2009-04-05 06:06:24 -0500 (Sun, 05 Apr 2009) | 1 line

  Issue python#5695: Moved logging.captureWarnings() call inside with statement in WarningsTest.test_warnings.
........
  r71240 | georg.brandl | 2009-04-05 09:40:06 -0500 (Sun, 05 Apr 2009) | 1 line

  python#5370: doc update about unpickling objects with custom __getattr__ etc. methods.
........
  • Loading branch information
benjaminp committed Apr 5, 2009
1 parent 5b9082a commit d23f822
Show file tree
Hide file tree
Showing 50 changed files with 678 additions and 759 deletions.
2 changes: 1 addition & 1 deletion Doc/c-api/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ created.
Asynchronous Notifications
==========================

A mechanism is provided to make asynchronous notifications to the the main
A mechanism is provided to make asynchronous notifications to the main
interpreter thread. These notifications take the form of a function
pointer and a void argument.

Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/number.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ Number Protocol

.. cfunction:: PyObject* PyNumber_ToBase(PyObject *n, int base)

Returns the the integer *n* converted to *base* as a string with a base
marker of ``'0b'``, ``'0o'``, or ``'0x'`` if appended applicable. When
Returns the integer *n* converted to *base* as a string with a base
marker of ``'0b'``, ``'0o'``, or ``'0x'`` if applicable. When
*base* is not 2, 8, 10, or 16, the format is ``'x#num'`` where x is the
base. If *n* is not an int object, it is converted with
:cfunc:`PyNumber_Index` first.
Expand Down
20 changes: 20 additions & 0 deletions Doc/c-api/object.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ Object Protocol
expression ``o.attr_name``.


.. cfunction:: PyObject* PyObject_GenericGetAttr(PyObject *o, PyObject *name)

Generic attribute getter function that is meant to be put into a type
object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary
of classes in the object's MRO as well as an attribute in the object's
:attr:`__dict__` (if present). As outlined in :ref:`descriptors`, data
descriptors take preference over instance attributes, while non-data
descriptors don't. Otherwise, an :exc:`AttributeError` is raised.


.. cfunction:: int PyObject_SetAttr(PyObject *o, PyObject *attr_name, PyObject *v)

Set the value of the attribute named *attr_name*, for object *o*, to the value
Expand All @@ -56,6 +66,16 @@ Object Protocol
``o.attr_name = v``.


.. cfunction:: int PyObject_GenericSetAttr(PyObject *o, PyObject *name, PyObject *value)

Generic attribute setter function that is meant to be put into a type
object's ``tp_setattro`` slot. It looks for a data descriptor in the
dictionary of classes in the object's MRO, and if found it takes preference
over setting the attribute in the instance dictionary. Otherwise, the
attribute is set in the object's :attr:`__dict__` (if present). Otherwise,
an :exc:`AttributeError` is raised and ``-1`` is returned.


.. cfunction:: int PyObject_DelAttr(PyObject *o, PyObject *attr_name)

Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on failure.
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ definition with the same method name.
T_OBJECT_EX PyObject \*
T_CHAR char
T_BYTE char
T_UNBYTE unsigned char
T_UBYTE unsigned char
T_UINT unsigned int
T_USHORT unsigned short
T_ULONG unsigned long
Expand Down
8 changes: 8 additions & 0 deletions Doc/c-api/veryhigh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ the same library that the Python runtime is using.
interpreter exits due to an exception, or ``2`` if the parameter
list does not represent a valid Python command line.

Note that if an otherwise unhandled :exc:`SystemError` is raised, this
function will not return ``1``, but exit the process, as long as
``Py_InspectFlag`` is not set.


.. cfunction:: int PyRun_AnyFile(FILE *fp, const char *filename)

Expand Down Expand Up @@ -80,6 +84,10 @@ the same library that the Python runtime is using.
there was an error, there is no way to get the exception information. For the
meaning of *flags*, see below.

Note that if an otherwise unhandled :exc:`SystemError` is raised, this
function will not return ``-1``, but exit the process, as long as
``Py_InspectFlag`` is not set.


.. cfunction:: int PyRun_SimpleFile(FILE *fp, const char *filename)

Expand Down
20 changes: 14 additions & 6 deletions Doc/distutils/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,8 @@ This module contains some utility functions for operating on individual files.

.. warning::

Handles cross-device moves on Unix using :func:`copy_file`. What about other
systems???
Handles cross-device moves on Unix using :func:`copy_file`. What about
other systems?


.. function:: write_file(filename, contents)
Expand Down Expand Up @@ -1091,17 +1091,17 @@ other utility module.

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

For MacOS X systems the OS version reflects the minimal version on which
For Mac OS X systems the OS version reflects the minimal version on which
binaries will run (that is, the value of ``MACOSX_DEPLOYMENT_TARGET``
during the build of Python), not the OS version of the current system.

For universal binary builds on MacOS X the architecture value reflects
For universal binary builds on Mac OS X the architecture value reflects
the univeral binary status instead of the architecture of the current
processor. For 32-bit universal binaries the architecture is ``fat``,
for 64-bit universal binaries the architecture is ``fat64``, and
for 4-way universal binaries the architecture is ``universal``.

Examples of returned values on MacOS X:
Examples of returned values on Mac OS X:

* ``macosx-10.3-ppc``

Expand Down Expand Up @@ -1758,8 +1758,16 @@ This module supplies the abstract base class :class:`Command`.
.. module:: distutils.command.bdist_msi
:synopsis: Build a binary distribution as a Windows MSI file

.. class:: bdist_msi(Command)

.. % todo
Builds a `Windows Installer`_ (.msi) binary package.

.. _Windows Installer: http://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx

In most cases, the ``bdist_msi`` installer is a better choice than the
``bdist_wininst`` installer, because it provides better support for
Win64 platforms, allows administrators to perform non-interactive
installations, and allows installation through group policies.


:mod:`distutils.command.bdist_rpm` --- Build a binary distribution as a Redhat RPM and SRPM
Expand Down
25 changes: 13 additions & 12 deletions Doc/extending/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,10 @@ reference count of an object and are safe in the presence of *NULL* pointers
(but note that *temp* will not be *NULL* in this context). More info on them
in section :ref:`refcounts`.

.. index:: single: PyEval_CallObject()
.. index:: single: PyObject_CallObject()

Later, when it is time to call the function, you call the C function
:cfunc:`PyEval_CallObject`. This function has two arguments, both pointers to
:cfunc:`PyObject_CallObject`. This function has two arguments, both pointers to
arbitrary Python objects: the Python function, and the argument list. The
argument list must always be a tuple object, whose length is the number of
arguments. To call the Python function with no arguments, pass in NULL, or
Expand All @@ -495,24 +495,24 @@ or more format codes between parentheses. For example::
...
/* Time to call the callback */
arglist = Py_BuildValue("(i)", arg);
result = PyEval_CallObject(my_callback, arglist);
result = PyObject_CallObject(my_callback, arglist);
Py_DECREF(arglist);

:cfunc:`PyEval_CallObject` returns a Python object pointer: this is the return
value of the Python function. :cfunc:`PyEval_CallObject` is
:cfunc:`PyObject_CallObject` returns a Python object pointer: this is the return
value of the Python function. :cfunc:`PyObject_CallObject` is
"reference-count-neutral" with respect to its arguments. In the example a new
tuple was created to serve as the argument list, which is :cfunc:`Py_DECREF`\
-ed immediately after the call.

The return value of :cfunc:`PyEval_CallObject` is "new": either it is a brand
The return value of :cfunc:`PyObject_CallObject` is "new": either it is a brand
new object, or it is an existing object whose reference count has been
incremented. So, unless you want to save it in a global variable, you should
somehow :cfunc:`Py_DECREF` the result, even (especially!) if you are not
interested in its value.

Before you do this, however, it is important to check that the return value
isn't *NULL*. If it is, the Python function terminated by raising an exception.
If the C code that called :cfunc:`PyEval_CallObject` is called from Python, it
If the C code that called :cfunc:`PyObject_CallObject` is called from Python, it
should now return an error indication to its Python caller, so the interpreter
can print a stack trace, or the calling Python code can handle the exception.
If this is not possible or desirable, the exception should be cleared by calling
Expand All @@ -524,7 +524,7 @@ If this is not possible or desirable, the exception should be cleared by calling
Py_DECREF(result);

Depending on the desired interface to the Python callback function, you may also
have to provide an argument list to :cfunc:`PyEval_CallObject`. In some cases
have to provide an argument list to :cfunc:`PyObject_CallObject`. In some cases
the argument list is also provided by the Python program, through the same
interface that specified the callback function. It can then be saved and used
in the same manner as the function object. In other cases, you may have to
Expand All @@ -535,7 +535,7 @@ event code, you might use the following code::
PyObject *arglist;
...
arglist = Py_BuildValue("(l)", eventcode);
result = PyEval_CallObject(my_callback, arglist);
result = PyObject_CallObject(my_callback, arglist);
Py_DECREF(arglist);
if (result == NULL)
return NULL; /* Pass error back */
Expand All @@ -547,19 +547,20 @@ the error check! Also note that strictly speaking this code is not complete:
:cfunc:`Py_BuildValue` may run out of memory, and this should be checked.

You may also call a function with keyword arguments by using
:cfunc:`PyEval_CallObjectWithKeywords`. As in the above example, we use
:cfunc:`Py_BuildValue` to construct the dictionary. ::
:cfunc:`PyObject_Call`, which supports arguments and keyword arguments. As in
the above example, we use :cfunc:`Py_BuildValue` to construct the dictionary. ::

PyObject *dict;
...
dict = Py_BuildValue("{s:i}", "name", val);
result = PyEval_CallObjectWithKeywords(my_callback, NULL, dict);
result = PyObject_Call(my_callback, NULL, dict);
Py_DECREF(dict);
if (result == NULL)
return NULL; /* Pass error back */
/* Here maybe use the result */
Py_DECREF(result);


.. _parsetuple:

Extracting Parameters in Extension Functions
Expand Down
2 changes: 1 addition & 1 deletion Doc/howto/cporting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ In Python 3.0, there is only one integer type. It is called :func:`int` on the
Python level, but actually corresponds to 2.x's :func:`long` type. In the
C-API, ``PyInt_*`` functions are replaced by their ``PyLong_*`` neighbors. The
best course of action here is using the ``PyInt_*`` functions aliased to
``PyLong_*`` found in :file:`intobject.h`. The the abstract ``PyNumber_*`` APIs
``PyLong_*`` found in :file:`intobject.h`. The abstract ``PyNumber_*`` APIs
can also be used in some cases. ::

#include "Python.h"
Expand Down
3 changes: 2 additions & 1 deletion Doc/library/abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ It also provides the following decorators:
A class that has a metaclass derived from :class:`ABCMeta`
cannot be instantiated unless all of its abstract methods and
properties are overridden.
The abstract methods can be called using any of the the normal 'super' call
The abstract methods can be called using any of the normal 'super' call
mechanisms.

Dynamically adding abstract methods to a class, or attempting to modify the
Expand Down Expand Up @@ -184,6 +184,7 @@ It also provides the following decorators:
def setx(self, value): ...
x = abstractproperty(getx, setx)


.. rubric:: Footnotes

.. [#] C++ programmers should note that Python's virtual base class
Expand Down
62 changes: 32 additions & 30 deletions Doc/library/doctest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ There are two main functions for creating :class:`unittest.TestSuite` instances
from text files and modules with doctests:


.. function:: DocFileSuite([module_relative][, package][, setUp][, tearDown][, globs][, optionflags][, parser][, encoding])
.. function:: DocFileSuite(*paths, [module_relative][, package][, setUp][, tearDown][, globs][, optionflags][, parser][, encoding])

Convert doctest tests from one or more text files to a
:class:`unittest.TestSuite`.
Expand All @@ -923,45 +923,47 @@ from text files and modules with doctests:
Optional argument *module_relative* specifies how the filenames in *paths*
should be interpreted:

* If *module_relative* is ``True`` (the default), then each filename specifies
an OS-independent module-relative path. By default, this path is relative to
the calling module's directory; but if the *package* argument is specified, then
it is relative to that package. To ensure OS-independence, each filename should
use ``/`` characters to separate path segments, and may not be an absolute path
(i.e., it may not begin with ``/``).

* If *module_relative* is ``False``, then each filename specifies an OS-specific
path. The path may be absolute or relative; relative paths are resolved with
respect to the current working directory.

Optional argument *package* is a Python package or the name of a Python package
whose directory should be used as the base directory for module-relative
filenames. If no package is specified, then the calling module's directory is
used as the base directory for module-relative filenames. It is an error to
specify *package* if *module_relative* is ``False``.

Optional argument *setUp* specifies a set-up function for the test suite. This
is called before running the tests in each file. The *setUp* function will be
passed a :class:`DocTest` object. The setUp function can access the test
globals as the *globs* attribute of the test passed.

Optional argument *tearDown* specifies a tear-down function for the test suite.
This is called after running the tests in each file. The *tearDown* function
* If *module_relative* is ``True`` (the default), then each filename in
*paths* specifies an OS-independent module-relative path. By default, this
path is relative to the calling module's directory; but if the *package*
argument is specified, then it is relative to that package. To ensure
OS-independence, each filename should use ``/`` characters to separate path
segments, and may not be an absolute path (i.e., it may not begin with
``/``).

* If *module_relative* is ``False``, then each filename in *paths* specifies
an OS-specific path. The path may be absolute or relative; relative paths
are resolved with respect to the current working directory.

Optional argument *package* is a Python package or the name of a Python
package whose directory should be used as the base directory for
module-relative filenames in *paths*. If no package is specified, then the
calling module's directory is used as the base directory for module-relative
filenames. It is an error to specify *package* if *module_relative* is
``False``.

Optional argument *setUp* specifies a set-up function for the test suite.
This is called before running the tests in each file. The *setUp* function
will be passed a :class:`DocTest` object. The setUp function can access the
test globals as the *globs* attribute of the test passed.

Optional argument *tearDown* specifies a tear-down function for the test
suite. This is called after running the tests in each file. The *tearDown*
function will be passed a :class:`DocTest` object. The setUp function can
access the test globals as the *globs* attribute of the test passed.

Optional argument *globs* is a dictionary containing the initial global
variables for the tests. A new copy of this dictionary is created for each
test. By default, *globs* is a new empty dictionary.

Optional argument *optionflags* specifies the default doctest options for the
tests, created by or-ing together individual option flags. See section
:ref:`doctest-options`. See function :func:`set_unittest_reportflags` below for
a better way to set reporting options.
:ref:`doctest-options`. See function :func:`set_unittest_reportflags` below
for a better way to set reporting options.

Optional argument *parser* specifies a :class:`DocTestParser` (or subclass) that
should be used to extract tests from the files. It defaults to a normal parser
(i.e., ``DocTestParser()``).
Optional argument *parser* specifies a :class:`DocTestParser` (or subclass)
that should be used to extract tests from the files. It defaults to a normal
parser (i.e., ``DocTestParser()``).

Optional argument *encoding* specifies an encoding that should be used to
convert the file to unicode.
Expand Down
6 changes: 4 additions & 2 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1163,9 +1163,11 @@ are always available. They are listed here in alphabetical order.
Without arguments, return a dictionary corresponding to the current local symbol
table. With a module, class or class instance object as argument (or anything
else that has a :attr:`__dict__` attribute), returns a dictionary corresponding
to the object's symbol table. The returned dictionary should not be modified:
the effects on the corresponding symbol table are undefined. [#]_
to the object's symbol table.

.. warning::
The returned dictionary should not be modified:
the effects on the corresponding symbol table are undefined. [#]_

.. function:: zip(*iterables)

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/itertools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ loops that truncate the stream.

Make an iterator that filters elements from *data* returning only those that
have a corresponding element in *selectors* that evaluates to ``True``.
Stops when either the *data* or *selectors* iterables have been exhausted.
Stops when either the *data* or *selectors* iterables has been exhausted.
Equivalent to::

def compress(data, selectors):
Expand Down
4 changes: 4 additions & 0 deletions Doc/library/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2290,6 +2290,10 @@ needing to be done by its clients. It achieves this though using threading
locks; there is one lock to serialize access to the module's shared data, and
each handler also creates a lock to serialize access to its underlying I/O.

If you are implementing asynchronous signal handlers using the :mod:`signal`
module, you may not be able to use logging from within such handlers. This is
because lock implementations in the :mod:`threading` module are not always
re-entrant, and so cannot be invoked from such signal handlers.

Configuration
-------------
Expand Down
12 changes: 9 additions & 3 deletions Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1537,8 +1537,8 @@ with the :class:`Pool` class.

.. method:: map(func, iterable[, chunksize])

A parallel equivalent of the :func:`map` builtin function, collecting the
result in a list. It blocks till the whole result is ready.
A parallel equivalent of the :func:`map` builtin function (it supports only
one *iterable* argument though). It blocks till the result is ready.

This method chops the iterable into a number of chunks which it submits to
the process pool as separate tasks. The (approximate) size of these
Expand Down Expand Up @@ -1697,6 +1697,12 @@ authentication* using the :mod:`hmac` module.
*address* is the address to be used by the bound socket or named pipe of the
listener object.

.. note::

If an address of '0.0.0.0' is used, the address will not be a connectable
end point on Windows. If you require a connectable end-point,
you should use '127.0.0.1'.

*family* is the type of socket (or named pipe) to use. This can be one of
the strings ``'AF_INET'`` (for a TCP socket), ``'AF_UNIX'`` (for a Unix
domain socket) or ``'AF_PIPE'`` (for a Windows named pipe). Of these only
Expand Down Expand Up @@ -1839,7 +1845,7 @@ return value of ``current_process().authkey`` is used (see
any :class:`~multiprocessing.Process` object that the current process creates.
This means that (by default) all processes of a multi-process program will share
a single authentication key which can be used when setting up connections
between the themselves.
between themselves.

Suitable authentication keys can also be generated by using :func:`os.urandom`.

Expand Down
Loading

0 comments on commit d23f822

Please sign in to comment.