mirror of https://github.com/python/cpython.git
Merged revisions 72009 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72009 | georg.brandl | 2009-04-27 17:29:09 +0200 (Mo, 27 Apr 2009) | 3 lines Demote warnings to notices where appropriate, following the goal that as few "red box" warnings should clutter the docs as possible. Part 1: stuff that gets merged to Py3k. ........
This commit is contained in:
parent
c67d362a89
commit
e720c0aa74
|
@ -44,7 +44,7 @@ This implies inclusion of the following standard headers: ``<stdio.h>``,
|
||||||
``<string.h>``, ``<errno.h>``, ``<limits.h>``, and ``<stdlib.h>`` (if
|
``<string.h>``, ``<errno.h>``, ``<limits.h>``, and ``<stdlib.h>`` (if
|
||||||
available).
|
available).
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
Since Python may define some pre-processor definitions which affect the standard
|
Since Python may define some pre-processor definitions which affect the standard
|
||||||
headers on some systems, you *must* include :file:`Python.h` before any standard
|
headers on some systems, you *must* include :file:`Python.h` before any standard
|
||||||
|
|
|
@ -594,11 +594,11 @@ units as well as normal text:
|
||||||
|
|
||||||
.. describe:: warning
|
.. describe:: warning
|
||||||
|
|
||||||
An important bit of information about an API that a user should be very aware
|
An important bit of information about an API that a user should be aware of
|
||||||
of when using whatever bit of API the warning pertains to. The content of
|
when using whatever bit of API the warning pertains to. The content of the
|
||||||
the directive should be written in complete sentences and include all
|
directive should be written in complete sentences and include all appropriate
|
||||||
appropriate punctuation. This differs from ``note`` in that it is recommended
|
punctuation. This should only be chosen over ``note`` for information
|
||||||
over ``note`` for information regarding security.
|
regarding the possibility of crashes, data loss, or security implications.
|
||||||
|
|
||||||
.. describe:: versionadded
|
.. describe:: versionadded
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ The first line of our file can be::
|
||||||
which pulls in the Python API (you can add a comment describing the purpose of
|
which pulls in the Python API (you can add a comment describing the purpose of
|
||||||
the module and a copyright notice if you like).
|
the module and a copyright notice if you like).
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
Since Python may define some pre-processor definitions which affect the standard
|
Since Python may define some pre-processor definitions which affect the standard
|
||||||
headers on some systems, you *must* include :file:`Python.h` before any standard
|
headers on some systems, you *must* include :file:`Python.h` before any standard
|
||||||
|
|
|
@ -354,7 +354,7 @@ and off individually. They are described here in more detail.
|
||||||
.. moduleauthor:: Collin Winter
|
.. moduleauthor:: Collin Winter
|
||||||
|
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
The :mod:`lib2to3` API should be considered unstable and may change
|
The :mod:`lib2to3` API should be considered unstable and may change
|
||||||
drastically in the future.
|
drastically in the future.
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
:mod:`aifc` --- Read and write AIFF and AIFC files
|
:mod:`aifc` --- Read and write AIFF and AIFC files
|
||||||
==================================================
|
==================================================
|
||||||
|
|
||||||
|
@ -16,10 +15,11 @@ AIFF is Audio Interchange File Format, a format for storing digital audio
|
||||||
samples in a file. AIFF-C is a newer version of the format that includes the
|
samples in a file. AIFF-C is a newer version of the format that includes the
|
||||||
ability to compress the audio data.
|
ability to compress the audio data.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
Some operations may only work under IRIX; these will raise :exc:`ImportError`
|
Some operations may only work under IRIX; these will raise :exc:`ImportError`
|
||||||
when attempting to import the :mod:`cl` module, which is only available on IRIX.
|
when attempting to import the :mod:`cl` module, which is only available on
|
||||||
|
IRIX.
|
||||||
|
|
||||||
Audio files have a number of parameters that describe the audio data. The
|
Audio files have a number of parameters that describe the audio data. The
|
||||||
sampling rate or frame rate is the number of times per second the sound is
|
sampling rate or frame rate is the number of times per second the sound is
|
||||||
|
|
|
@ -42,7 +42,7 @@ To do just the former:
|
||||||
(``'single'``, the default) or as an :term:`expression` (``'eval'``). Any
|
(``'single'``, the default) or as an :term:`expression` (``'eval'``). Any
|
||||||
other value will cause :exc:`ValueError` to be raised.
|
other value will cause :exc:`ValueError` to be raised.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
It is possible (but not likely) that the parser stops parsing with a
|
It is possible (but not likely) that the parser stops parsing with a
|
||||||
successful outcome before reaching the end of the source; in this case,
|
successful outcome before reaching the end of the source; in this case,
|
||||||
|
|
|
@ -21,10 +21,10 @@ structure similar to what you would find on Microsoft Windows INI files. You
|
||||||
can use this to write Python programs which can be customized by end users
|
can use this to write Python programs which can be customized by end users
|
||||||
easily.
|
easily.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
This library does *not* interpret or write the value-type prefixes used in the
|
This library does *not* interpret or write the value-type prefixes used in
|
||||||
Windows Registry extended version of INI syntax.
|
the Windows Registry extended version of INI syntax.
|
||||||
|
|
||||||
The configuration file consists of sections, led by a ``[section]`` header and
|
The configuration file consists of sections, led by a ``[section]`` header and
|
||||||
followed by ``name: value`` entries, with continuations in the style of
|
followed by ``name: value`` entries, with continuations in the style of
|
||||||
|
|
|
@ -144,7 +144,7 @@ and the backup file remains around; by default, the extension is ``'.bak'`` and
|
||||||
it is deleted when the output file is closed. In-place filtering is disabled
|
it is deleted when the output file is closed. In-place filtering is disabled
|
||||||
when standard input is read.
|
when standard input is read.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
The current implementation does not work for MS-DOS 8+3 filesystems.
|
The current implementation does not work for MS-DOS 8+3 filesystems.
|
||||||
|
|
||||||
|
|
|
@ -359,7 +359,7 @@ are always available. They are listed here in alphabetical order.
|
||||||
global and local dictionary, respectively, which may be useful to pass around
|
global and local dictionary, respectively, which may be useful to pass around
|
||||||
for use as the second and third argument to :func:`exec`.
|
for use as the second and third argument to :func:`exec`.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
The default *locals* act as described for function :func:`locals` below:
|
The default *locals* act as described for function :func:`locals` below:
|
||||||
modifications to the default *locals* dictionary should not be attempted.
|
modifications to the default *locals* dictionary should not be attempted.
|
||||||
|
@ -591,7 +591,7 @@ are always available. They are listed here in alphabetical order.
|
||||||
|
|
||||||
Update and return a dictionary representing the current local symbol table.
|
Update and return a dictionary representing the current local symbol table.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
The contents of this dictionary should not be modified; changes may not affect
|
The contents of this dictionary should not be modified; changes may not affect
|
||||||
the values of local variables used by the interpreter.
|
the values of local variables used by the interpreter.
|
||||||
|
@ -1166,7 +1166,7 @@ are always available. They are listed here in alphabetical order.
|
||||||
else that has a :attr:`__dict__` attribute), returns a dictionary corresponding
|
else that has a :attr:`__dict__` attribute), returns a dictionary corresponding
|
||||||
to the object's symbol table.
|
to the object's symbol table.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
The returned dictionary should not be modified:
|
The returned dictionary should not be modified:
|
||||||
the effects on the corresponding symbol table are undefined. [#]_
|
the effects on the corresponding symbol table are undefined. [#]_
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,9 @@ The module provides the following classes:
|
||||||
formatted file that contains your private key. *cert_file* is a PEM formatted
|
formatted file that contains your private key. *cert_file* is a PEM formatted
|
||||||
certificate chain file.
|
certificate chain file.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
This does not do any certificate verification!
|
This does not do any certificate verification.
|
||||||
|
|
||||||
|
|
||||||
.. class:: HTTPResponse(sock[, debuglevel=0][, strict=0])
|
.. class:: HTTPResponse(sock[, debuglevel=0][, strict=0])
|
||||||
|
|
|
@ -455,7 +455,7 @@ six items: the frame object, the filename, the line number of the current line,
|
||||||
the function name, a list of lines of context from the source code, and the
|
the function name, a list of lines of context from the source code, and the
|
||||||
index of the current line within that list.
|
index of the current line within that list.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
Keeping references to frame objects, as found in the first element of the frame
|
Keeping references to frame objects, as found in the first element of the frame
|
||||||
records these functions return, can cause your program to create reference
|
records these functions return, can cause your program to create reference
|
||||||
|
|
|
@ -377,7 +377,7 @@ descriptions are taken from the corresponding description in the GNU C library.
|
||||||
|
|
||||||
Return name of the n-th day of the week.
|
Return name of the n-th day of the week.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
This follows the US convention of :const:`DAY_1` being Sunday, not the
|
This follows the US convention of :const:`DAY_1` being Sunday, not the
|
||||||
international convention (ISO 8601) that Monday is the first day of the week.
|
international convention (ISO 8601) that Monday is the first day of the week.
|
||||||
|
@ -413,7 +413,7 @@ descriptions are taken from the corresponding description in the GNU C library.
|
||||||
Return a regular expression that can be used with the regex function to
|
Return a regular expression that can be used with the regex function to
|
||||||
recognize a positive response to a yes/no question.
|
recognize a positive response to a yes/no question.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
The expression is in the syntax suitable for the :cfunc:`regex` function from
|
The expression is in the syntax suitable for the :cfunc:`regex` function from
|
||||||
the C library, which might differ from the syntax used in :mod:`re`.
|
the C library, which might differ from the syntax used in :mod:`re`.
|
||||||
|
|
|
@ -73,7 +73,7 @@ The module defines these functions:
|
||||||
file must be an open file object opened in binary mode (``'rb'`` or
|
file must be an open file object opened in binary mode (``'rb'`` or
|
||||||
``'r+b'``).
|
``'r+b'``).
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
If an object containing an unsupported type was marshalled with :func:`dump`,
|
If an object containing an unsupported type was marshalled with :func:`dump`,
|
||||||
:func:`load` will substitute ``None`` for the unmarshallable type.
|
:func:`load` will substitute ``None`` for the unmarshallable type.
|
||||||
|
|
|
@ -23,12 +23,11 @@ applications should use string objects to access all files.
|
||||||
their parameters. The result is an object of the same type, if a path or
|
their parameters. The result is an object of the same type, if a path or
|
||||||
file name is returned.
|
file name is returned.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
On Windows, many of these functions do not properly support UNC pathnames.
|
On Windows, many of these functions do not properly support UNC pathnames.
|
||||||
:func:`splitunc` and :func:`ismount` do handle them correctly.
|
:func:`splitunc` and :func:`ismount` do handle them correctly.
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Since different operating systems have different path name conventions, there
|
Since different operating systems have different path name conventions, there
|
||||||
|
@ -288,6 +287,33 @@ applications should use string objects to access all files.
|
||||||
*unc* will always be the empty string. Availability: Windows.
|
*unc* will always be the empty string. Availability: Windows.
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< .working
|
||||||
|
=======
|
||||||
|
.. function:: walk(path, visit, arg)
|
||||||
|
|
||||||
|
Calls the function *visit* with arguments ``(arg, dirname, names)`` for each
|
||||||
|
directory in the directory tree rooted at *path* (including *path* itself, if it
|
||||||
|
is a directory). The argument *dirname* specifies the visited directory, the
|
||||||
|
argument *names* lists the files in the directory (gotten from
|
||||||
|
``os.listdir(dirname)``). The *visit* function may modify *names* to influence
|
||||||
|
the set of directories visited below *dirname*, e.g. to avoid visiting certain
|
||||||
|
parts of the tree. (The object referred to by *names* must be modified in
|
||||||
|
place, using :keyword:`del` or slice assignment.)
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Symbolic links to directories are not treated as subdirectories, and that
|
||||||
|
:func:`walk` therefore will not visit them. To visit linked directories you must
|
||||||
|
identify them with ``os.path.islink(file)`` and ``os.path.isdir(file)``, and
|
||||||
|
invoke :func:`walk` as necessary.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This function is deprecated and has been removed in 3.0 in favor of
|
||||||
|
:func:`os.walk`.
|
||||||
|
|
||||||
|
|
||||||
|
>>>>>>> .merge-right.r72009
|
||||||
.. data:: supports_unicode_filenames
|
.. data:: supports_unicode_filenames
|
||||||
|
|
||||||
True if arbitrary Unicode strings can be used as file names (within limitations
|
True if arbitrary Unicode strings can be used as file names (within limitations
|
||||||
|
|
|
@ -66,8 +66,8 @@ The :mod:`pickle` module differs from :mod:`marshal` several significant ways:
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
The :mod:`pickle` module is not intended to be secure against erroneous or
|
The :mod:`pickle` module is not intended to be secure against erroneous or
|
||||||
maliciously constructed data. Never unpickle data received from an untrusted or
|
maliciously constructed data. Never unpickle data received from an untrusted
|
||||||
unauthenticated source.
|
or unauthenticated source.
|
||||||
|
|
||||||
Note that serialization is a more primitive notion than persistence; although
|
Note that serialization is a more primitive notion than persistence; although
|
||||||
:mod:`pickle` reads and writes file objects, it does not handle the issue of
|
:mod:`pickle` reads and writes file objects, it does not handle the issue of
|
||||||
|
@ -437,6 +437,7 @@ Refer to the section :ref:`pickle-state` for more information about how to use
|
||||||
the methods :meth:`__getstate__` and :meth:`__setstate__`.
|
the methods :meth:`__getstate__` and :meth:`__setstate__`.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
At unpickling time, some methods like :meth:`__getattr__`,
|
At unpickling time, some methods like :meth:`__getattr__`,
|
||||||
:meth:`__getattribute__`, or :meth:`__setattr__` may be called upon the
|
:meth:`__getattribute__`, or :meth:`__setattr__` may be called upon the
|
||||||
instance. In case those methods rely on some internal invariant being
|
instance. In case those methods rely on some internal invariant being
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
:mod:`string` --- Common string operations
|
:mod:`string` --- Common string operations
|
||||||
==========================================
|
==========================================
|
||||||
|
|
||||||
|
|
|
@ -321,10 +321,10 @@ The following attributes are also available:
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
Use :meth:`communicate` rather than :meth:`.stdin.write`,
|
Use :meth:`communicate` rather than :attr:`.stdin.write <stdin>`,
|
||||||
:meth:`.stdout.read` or :meth:`.stderr.read` to avoid deadlocks due
|
:attr:`.stdout.read <stdout>` or :attr:`.stderr.read <stderr>` to avoid
|
||||||
to any of the other OS pipe buffers filling up and blocking the child
|
deadlocks due to any of the other OS pipe buffers filling up and blocking the
|
||||||
process.
|
child process.
|
||||||
|
|
||||||
|
|
||||||
.. attribute:: Popen.stdin
|
.. attribute:: Popen.stdin
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
:mod:`tabnanny` --- Detection of ambiguous indentation
|
:mod:`tabnanny` --- Detection of ambiguous indentation
|
||||||
======================================================
|
======================================================
|
||||||
|
|
||||||
|
@ -14,9 +13,9 @@ For the time being this module is intended to be called as a script. However it
|
||||||
is possible to import it into an IDE and use the function :func:`check`
|
is possible to import it into an IDE and use the function :func:`check`
|
||||||
described below.
|
described below.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
The API provided by this module is likely to change in future releases; such
|
The API provided by this module is likely to change in future releases; such
|
||||||
changes may not be backward compatible.
|
changes may not be backward compatible.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1085,7 +1085,7 @@ Loading and running tests
|
||||||
creates an instance of the class for each test method defined for the
|
creates an instance of the class for each test method defined for the
|
||||||
class.
|
class.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
While using a hierarchy of :class:`TestCase`\ -derived classes can be
|
While using a hierarchy of :class:`TestCase`\ -derived classes can be
|
||||||
convenient in sharing fixtures and helper functions, defining test
|
convenient in sharing fixtures and helper functions, defining test
|
||||||
|
|
|
@ -186,7 +186,7 @@ the built-in function :func:`range` returns an iterator of integers suitable to
|
||||||
emulate the effect of Pascal's ``for i := a to b do``; e.g., ``range(3)``
|
emulate the effect of Pascal's ``for i := a to b do``; e.g., ``range(3)``
|
||||||
returns the list ``[0, 1, 2]``.
|
returns the list ``[0, 1, 2]``.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
single: loop; over mutable sequence
|
single: loop; over mutable sequence
|
||||||
|
|
|
@ -222,7 +222,7 @@ selected depending on the class of the instance: it must reference the class of
|
||||||
the instance or a base class thereof. The instance can be received by the
|
the instance or a base class thereof. The instance can be received by the
|
||||||
handler and can carry additional information about the exceptional condition.
|
handler and can carry additional information about the exceptional condition.
|
||||||
|
|
||||||
.. warning::
|
.. note::
|
||||||
|
|
||||||
Exception messages are not part of the Python API. Their contents may change
|
Exception messages are not part of the Python API. Their contents may change
|
||||||
from one version of Python to the next without warning and should not be
|
from one version of Python to the next without warning and should not be
|
||||||
|
|
Loading…
Reference in New Issue