From bffc872828a4bf2e38d3fc81f05dabc81841ca50 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 17 Aug 2007 00:24:54 +0000 Subject: Manually patched a few things that didn't get merged in, but should. --- Doc/library/aifc.rst | 7 ++++--- Doc/library/codeop.rst | 12 +++++++----- Doc/library/fileinput.rst | 6 ++++-- Doc/library/logging.rst | 2 +- Doc/library/marshal.rst | 18 ++++++++++-------- Doc/library/mimetools.rst | 1 + Doc/library/multifile.rst | 1 + Doc/library/rfc822.rst | 1 + Doc/library/shutil.rst | 8 +++++--- Doc/library/stringprep.rst | 1 + Doc/library/unicodedata.rst | 6 +++++- Doc/library/zipfile.rst | 6 +++--- 12 files changed, 43 insertions(+), 26 deletions(-) (limited to 'Doc/library') diff --git a/Doc/library/aifc.rst b/Doc/library/aifc.rst index 0cfcb52cec..7f7d7feeaf 100644 --- a/Doc/library/aifc.rst +++ b/Doc/library/aifc.rst @@ -16,9 +16,10 @@ 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 ability to compress the audio data. -**Caveat:** 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. +.. warning:: + + 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. 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 diff --git a/Doc/library/codeop.rst b/Doc/library/codeop.rst index 8a730ec027..419e8735d1 100644 --- a/Doc/library/codeop.rst +++ b/Doc/library/codeop.rst @@ -46,11 +46,13 @@ To do just the former: (``'single'``, the default) or as an expression (``'eval'``). Any other value will cause :exc:`ValueError` to be raised. - **Caveat:** 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, trailing - symbols may be ignored instead of causing an error. For example, a backslash - followed by two newlines may be followed by arbitrary garbage. This will be - fixed once the API for the parser is better. + .. warning:: + + 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, + trailing symbols may be ignored instead of causing an error. For example, + a backslash followed by two newlines may be followed by arbitrary garbage. + This will be fixed once the API for the parser is better. .. class:: Compile() diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index d0a3ed903f..d45def1d20 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -149,10 +149,12 @@ 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 when standard input is read. -**Caveat:** The current implementation does not work for MS-DOS 8+3 filesystems. +.. warning:: + + The current implementation does not work for MS-DOS 8+3 filesystems. -The two following opening hooks are provided by this module: +The two following opening hooks are provided by this module: .. function:: hook_compressed(filename, mode) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 218fb0d8e7..7e8703ab47 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -536,7 +536,7 @@ instantiated directly, but always through the module-level function Finds the caller's source filename and line number. Returns the filename, line number and function name as a 3-element tuple. - .. versionchanged:: 2.5 + .. versionchanged:: 2.4 The function name was added. In earlier versions, the filename and line number were returned as a 2-element tuple.. diff --git a/Doc/library/marshal.rst b/Doc/library/marshal.rst index 010ebc3c77..6927067ab6 100644 --- a/Doc/library/marshal.rst +++ b/Doc/library/marshal.rst @@ -42,14 +42,16 @@ and dictionaries are only supported as long as the values contained therein are themselves supported; and recursive lists and dictionaries should not be written (they will cause infinite loops). -**Caveat:** On machines where C's ``long int`` type has more than 32 bits (such -as the DEC Alpha), it is possible to create plain Python integers that are -longer than 32 bits. If such an integer is marshaled and read back in on a -machine where C's ``long int`` type has only 32 bits, a Python long integer -object is returned instead. While of a different type, the numeric value is the -same. (This behavior is new in Python 2.2. In earlier versions, all but the -least-significant 32 bits of the value were lost, and a warning message was -printed.) +.. warning:: + + On machines where C's ``long int`` type has more than 32 bits (such as the + DEC Alpha), it is possible to create plain Python integers that are longer + than 32 bits. If such an integer is marshaled and read back in on a machine + where C's ``long int`` type has only 32 bits, a Python long integer object + is returned instead. While of a different type, the numeric value is the + same. (This behavior is new in Python 2.2. In earlier versions, all but the + least-significant 32 bits of the value were lost, and a warning message was + printed.) There are functions that read/write files as well as functions operating on strings. diff --git a/Doc/library/mimetools.rst b/Doc/library/mimetools.rst index 603bec6ef2..8da385e0ce 100644 --- a/Doc/library/mimetools.rst +++ b/Doc/library/mimetools.rst @@ -4,6 +4,7 @@ .. module:: mimetools :synopsis: Tools for parsing MIME-style message bodies. + :deprecated: .. deprecated:: 2.3 diff --git a/Doc/library/multifile.rst b/Doc/library/multifile.rst index c36ccb7a0f..3e7922968b 100644 --- a/Doc/library/multifile.rst +++ b/Doc/library/multifile.rst @@ -4,6 +4,7 @@ .. module:: multifile :synopsis: Support for reading files which contain distinct parts, such as some MIME data. + :deprecated: .. sectionauthor:: Eric S. Raymond diff --git a/Doc/library/rfc822.rst b/Doc/library/rfc822.rst index fa25ba5b1b..52df0130bf 100644 --- a/Doc/library/rfc822.rst +++ b/Doc/library/rfc822.rst @@ -4,6 +4,7 @@ .. module:: rfc822 :synopsis: Parse 2822 style mail messages. + :deprecated: .. deprecated:: 2.3 diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index ef0758dc80..31d898a135 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -17,9 +17,11 @@ The :mod:`shutil` module offers a number of high-level operations on files and collections of files. In particular, functions are provided which support file copying and removal. -**Caveat:** On MacOS, the resource fork and other metadata are not used. For -file copies, this means that resources will be lost and file type and creator -codes will not be correct. +.. warning:: + + On MacOS, the resource fork and other metadata are not used. For file copies, + this means that resources will be lost and file type and creator codes will + not be correct. .. function:: copyfile(src, dst) diff --git a/Doc/library/stringprep.rst b/Doc/library/stringprep.rst index b0944e4373..d2f269c119 100644 --- a/Doc/library/stringprep.rst +++ b/Doc/library/stringprep.rst @@ -4,6 +4,7 @@ .. module:: stringprep :synopsis: String preparation, as per RFC 3453 + :deprecated: .. moduleauthor:: Martin v. Löwis .. sectionauthor:: Martin v. Löwis diff --git a/Doc/library/unicodedata.rst b/Doc/library/unicodedata.rst index 017d4ee785..ec788c5f06 100644 --- a/Doc/library/unicodedata.rst +++ b/Doc/library/unicodedata.rst @@ -107,7 +107,7 @@ the following functions: based on the definition of canonical equivalence and compatibility equivalence. In Unicode, several characters can be expressed in various way. For example, the character U+00C7 (LATIN CAPITAL LETTER C WITH CEDILLA) can also be expressed as - the sequence U+0043 (LATIN CAPITAL LETTER C) U+0327 (COMBINING CEDILLA). + the sequence U+0327 (COMBINING CEDILLA) U+0043 (LATIN CAPITAL LETTER C). For each character, there are two normal forms: normal form C and normal form D. Normal form D (NFD) is also known as canonical decomposition, and translates @@ -126,6 +126,10 @@ the following functions: (NFKC) first applies the compatibility decomposition, followed by the canonical composition. + Even if two unicode strings are normalized and look the same to + a human reader, if one has combining characters and the other + doesn't, they may not compare equal. + .. versionadded:: 2.3 In addition, the module exposes the following constant: diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 5e51bfc854..ccc3114c84 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -168,11 +168,11 @@ ZipFile Objects .. note:: If the ZipFile was created by passing in a file-like object as the first - argument to the constructor, then the object returned by :meth:`open` shares the + argument to the constructor, then the object returned by :meth:`.open` shares the ZipFile's file pointer. Under these circumstances, the object returned by - :meth:`open` should not be used after any additional operations are performed + :meth:`.open` should not be used after any additional operations are performed on the ZipFile object. If the ZipFile was created by passing in a string (the - filename) as the first argument to the constructor, then :meth:`open` will + filename) as the first argument to the constructor, then :meth:`.open` will create a new file object that will be held by the ZipExtFile, allowing it to operate independently of the ZipFile. -- cgit v1.2.1