summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2014-03-12 23:51:50 (GMT)
committerÉric Araujo <merwok@netwok.org>2014-03-12 23:51:50 (GMT)
commitabdc16ee1bb9819ecc6500a8f1d8720fc2072643 (patch)
tree6a51cc8277861c729d6d72e75b29a76e504fe7a8
parent8546e226bd0b6332ea5af551b9bbd74c2707a3ea (diff)
parentfa5e6e4773ea959a7cc354d54c50df507cf005c3 (diff)
downloadcpython-abdc16ee1bb9819ecc6500a8f1d8720fc2072643.zip
cpython-abdc16ee1bb9819ecc6500a8f1d8720fc2072643.tar.gz
cpython-abdc16ee1bb9819ecc6500a8f1d8720fc2072643.tar.bz2
Merge 3.3 (#16805)
-rw-r--r--Doc/c-api/arg.rst1
-rw-r--r--Doc/c-api/init.rst1
-rw-r--r--Doc/faq/library.rst1
-rw-r--r--Doc/library/fractions.rst8
-rw-r--r--Doc/library/getopt.rst1
-rw-r--r--Doc/library/io.rst1
-rw-r--r--Doc/library/logging.config.rst8
-rw-r--r--Doc/library/os.rst4
-rw-r--r--Doc/library/pkgutil.rst2
-rw-r--r--Doc/library/socket.rst1
-rw-r--r--Doc/library/ssl.rst1
-rw-r--r--Doc/library/sys.rst4
-rw-r--r--Doc/library/test.rst1
13 files changed, 28 insertions, 6 deletions
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index bf13eed..2f02241 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -45,6 +45,7 @@ in any early abort case).
Unless otherwise stated, buffers are not NUL-terminated.
.. note::
+
For all ``#`` variants of formats (``s#``, ``y#``, etc.), the type of
the length argument (int or :c:type:`Py_ssize_t`) is controlled by
defining the macro :c:macro:`PY_SSIZE_T_CLEAN` before including
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index 6439d7f..0587e15 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -582,6 +582,7 @@ code, or when embedding the Python interpreter:
.. index:: module: _thread
.. note::
+
When only the main thread exists, no GIL operations are needed. This is a
common situation (most Python programs do not use threads), and the lock
operations slow the interpreter down a bit. Therefore, the lock is not
diff --git a/Doc/faq/library.rst b/Doc/faq/library.rst
index 34e2fdf..5f4ff17 100644
--- a/Doc/faq/library.rst
+++ b/Doc/faq/library.rst
@@ -513,6 +513,7 @@ For data that is more regular (e.g. a homogeneous list of ints or floats),
you can also use the :mod:`array` module.
.. note::
+
To read and write binary data, it is mandatory to open the file in
binary mode (here, passing ``"rb"`` to :func:`open`). If you use
``"r"`` instead (the default), the file will be open in text mode
diff --git a/Doc/library/fractions.rst b/Doc/library/fractions.rst
index fba199b..c2c7401 100644
--- a/Doc/library/fractions.rst
+++ b/Doc/library/fractions.rst
@@ -99,7 +99,9 @@ another rational number, or from a string.
value of *flt*, which must be a :class:`float`. Beware that
``Fraction.from_float(0.3)`` is not the same value as ``Fraction(3, 10)``
- .. note:: From Python 3.2 onwards, you can also construct a
+ .. note::
+
+ From Python 3.2 onwards, you can also construct a
:class:`Fraction` instance directly from a :class:`float`.
@@ -108,7 +110,9 @@ another rational number, or from a string.
This class method constructs a :class:`Fraction` representing the exact
value of *dec*, which must be a :class:`decimal.Decimal` instance.
- .. note:: From Python 3.2 onwards, you can also construct a
+ .. note::
+
+ From Python 3.2 onwards, you can also construct a
:class:`Fraction` instance directly from a :class:`decimal.Decimal`
instance.
diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst
index b6ab3df..f9a1e53 100644
--- a/Doc/library/getopt.rst
+++ b/Doc/library/getopt.rst
@@ -10,6 +10,7 @@
--------------
.. note::
+
The :mod:`getopt` module is a parser for command line options whose API is
designed to be familiar to users of the C :c:func:`getopt` function. Users who
are unfamiliar with the C :c:func:`getopt` function or who would like to write
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index c80198b..79f65e0 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -686,6 +686,7 @@ than raw I/O does.
:exc:`UnsupportedOperation`.
.. warning::
+
:class:`BufferedRWPair` does not attempt to synchronize accesses to
its underlying raw streams. You should not pass it the same object
as reader and writer; use :class:`BufferedRandom` instead.
diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst
index 5fb1b7a..171b0a3 100644
--- a/Doc/library/logging.config.rst
+++ b/Doc/library/logging.config.rst
@@ -148,7 +148,9 @@ in :mod:`logging` itself) and defining handlers which are declared either in
send it to the socket as a string of bytes preceded by a four-byte length
string packed in binary using ``struct.pack('>L', n)``.
- .. note:: Because portions of the configuration are passed through
+ .. note::
+
+ Because portions of the configuration are passed through
:func:`eval`, use of this function may open its users to a security risk.
While the function only binds to a socket on ``localhost``, and so does
not accept connections from remote machines, there are scenarios where
@@ -752,7 +754,9 @@ The ``class`` entry is optional. It indicates the name of the formatter's class
:class:`~logging.Formatter` can present exception tracebacks in an expanded or
condensed format.
-.. note:: Due to the use of :func:`eval` as described above, there are
+.. note::
+
+ Due to the use of :func:`eval` as described above, there are
potential security risks which result from using the :func:`listen` to send
and receive configurations via sockets. The risks are limited to where
multiple users with no mutual trust run code on the same machine; see the
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 7ae303b..f50e5d9 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -260,7 +260,9 @@ process and user.
Availability: Unix.
- .. note:: On Mac OS X, :func:`getgroups` behavior differs somewhat from
+ .. note::
+
+ On Mac OS X, :func:`getgroups` behavior differs somewhat from
other Unix platforms. If the Python interpreter was built with a
deployment target of :const:`10.5` or earlier, :func:`getgroups` returns
the list of effective group ids associated with the current user process;
diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst
index 10b7848..13ea7b9 100644
--- a/Doc/library/pkgutil.rst
+++ b/Doc/library/pkgutil.rst
@@ -147,6 +147,7 @@ support.
*prefix* is a string to output on the front of every module name on output.
.. note::
+
Only works for a :term:`finder` which defines an ``iter_modules()``
method. This interface is non-standard, so the module also provides
implementations for :class:`importlib.machinery.FileFinder` and
@@ -185,6 +186,7 @@ support.
walk_packages(ctypes.__path__, ctypes.__name__ + '.')
.. note::
+
Only works for a :term:`finder` which defines an ``iter_modules()``
method. This interface is non-standard, so the module also provides
implementations for :class:`importlib.machinery.FileFinder` and
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 8b1b8fb..54c6bad 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -799,6 +799,7 @@ to sockets.
:keyword:`with` statement around them.
.. note::
+
:meth:`close()` releases the resource associated with a connection but
does not necessarily close the connection immediately. If you want
to close the connection in a timely fashion, call :meth:`shutdown()`
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
index ec8f067..0ed5fb2 100644
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -818,6 +818,7 @@ SSL sockets also have the following additional methods and attributes:
'version': 3}
.. note::
+
To validate a certificate for a particular service, you can use the
:func:`match_hostname` function.
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index ab612c2..e3cc866 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -227,7 +227,9 @@ always available.
installed in :file:`{exec_prefix}/lib/python{X.Y}/lib-dynload`, where *X.Y*
is the version number of Python, for example ``3.2``.
- .. note:: If a :ref:`virtual environment <venv-def>` is in effect, this
+ .. note::
+
+ If a :ref:`virtual environment <venv-def>` is in effect, this
value will be changed in ``site.py`` to point to the virtual environment.
The value for the Python installation will still be available, via
:data:`base_exec_prefix`.
diff --git a/Doc/library/test.rst b/Doc/library/test.rst
index 2c51549..83026d8 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -199,6 +199,7 @@ The :mod:`test.support` module provides support for Python's regression
test suite.
.. note::
+
:mod:`test.support` is not a public module. It is documented here to help
Python developers write tests. The API of this module is subject to change
without backwards compatibility concerns between releases.