diff options
author | Éric Araujo <merwok@netwok.org> | 2011-07-29 01:11:09 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-07-29 01:11:09 (GMT) |
commit | 2527796a22404d5b8cb0e498a965c6b4a743caac (patch) | |
tree | 5bc07b91dde0085cc09c3336ed740f6817f11fc3 /Doc | |
parent | 1e3a68d36b08cd9d59084a37c8cb6c2d911868ce (diff) | |
parent | cf534817adc49b2562d175fabd3e3992d25063fe (diff) | |
download | cpython-2527796a22404d5b8cb0e498a965c6b4a743caac.zip cpython-2527796a22404d5b8cb0e498a965c6b4a743caac.tar.gz cpython-2527796a22404d5b8cb0e498a965c6b4a743caac.tar.bz2 |
Merge from 3.2 (#10318, #12255, #12043, #12417 and other fixes)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/ACKS.txt | 1 | ||||
-rw-r--r-- | Doc/distutils/apiref.rst | 4 | ||||
-rw-r--r-- | Doc/distutils/install.rst | 2 | ||||
-rw-r--r-- | Doc/glossary.rst | 3 | ||||
-rw-r--r-- | Doc/library/ossaudiodev.rst | 2 | ||||
-rw-r--r-- | Doc/library/packaging.dist.rst | 4 | ||||
-rw-r--r-- | Doc/library/profile.rst | 26 | ||||
-rw-r--r-- | Doc/library/shutil.rst | 26 | ||||
-rw-r--r-- | Doc/license.rst | 30 | ||||
-rw-r--r-- | Doc/tools/sphinxext/susp-ignored.csv | 2 | ||||
-rw-r--r-- | Doc/tutorial/classes.rst | 28 |
11 files changed, 40 insertions, 88 deletions
diff --git a/Doc/ACKS.txt b/Doc/ACKS.txt index 433c9ee..5faa706 100644 --- a/Doc/ACKS.txt +++ b/Doc/ACKS.txt @@ -203,6 +203,7 @@ docs@python.org), and we'll be glad to correct the problem. * Kalle Svensson * Jim Tittsler * David Turner + * Sandro Tosi * Ville Vainio * Nadeem Vawda * Martijn Vries diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index 1fb6f9e..124d891 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -72,8 +72,8 @@ setup script). Indirectly provides the :class:`distutils.dist.Distribution` and | | be built | :class:`distutils.core.Extension` | +--------------------+--------------------------------+-------------------------------------------------------------+ | *classifiers* | A list of categories for the | The list of available | - | | package | categorizations is at | - | | | http://pypi.python.org/pypi?:action=list_classifiers. | + | | package | categorizations is available on `PyPI | + | | | <http://pypi.python.org/pypi?:action=list_classifiers>`_. | +--------------------+--------------------------------+-------------------------------------------------------------+ | *distclass* | the :class:`Distribution` | A subclass of | | | class to use | :class:`distutils.core.Distribution` | diff --git a/Doc/distutils/install.rst b/Doc/distutils/install.rst index f8d6305..6f4de7a 100644 --- a/Doc/distutils/install.rst +++ b/Doc/distutils/install.rst @@ -72,7 +72,7 @@ In that case, you would download the installer appropriate to your platform and do the obvious thing with it: run it if it's an executable installer, ``rpm --install`` it if it's an RPM, etc. You don't need to run Python or a setup script, you don't need to compile anything---you might not even need to read any -instructions (although it's always a good idea to do so anyways). +instructions (although it's always a good idea to do so anyway). Of course, things will not always be that easy. You might be interested in a module distribution that doesn't have an easy-to-use installer for your diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 2961af1..6984bf2 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -431,7 +431,8 @@ Glossary mapping A container object that supports arbitrary key lookups and implements the - methods specified in the :class:`Mapping` or :class:`MutableMapping` + methods specified in the :class:`~collections.Mapping` or + :class:`~collections.MutableMapping` :ref:`abstract base classes <collections-abstract-base-classes>`. Examples include :class:`dict`, :class:`collections.defaultdict`, :class:`collections.OrderedDict` and :class:`collections.Counter`. diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst index 3b5a7e4..0a08428 100644 --- a/Doc/library/ossaudiodev.rst +++ b/Doc/library/ossaudiodev.rst @@ -14,7 +14,7 @@ the standard audio interface for Linux and recent versions of FreeBSD. ALSA is in the standard kernel as of 2.5.x. Presumably if you use ALSA, you'll have to make sure its OSS compatibility layer is active to use ossaudiodev, but you're gonna need it for the vast - majority of Linux audio apps anyways. + majority of Linux audio apps anyway. Sounds like things are also complicated for other BSDs. In response to my python-dev query, Thomas Wouters said: diff --git a/Doc/library/packaging.dist.rst b/Doc/library/packaging.dist.rst index fb05b69..7184f7f 100644 --- a/Doc/library/packaging.dist.rst +++ b/Doc/library/packaging.dist.rst @@ -67,8 +67,8 @@ module distribution being built/packaged/distributed/installed. | | be built | :class:`packaging.compiler.extension.Extension` | +--------------------+--------------------------------+-------------------------------------------------------------+ | *classifiers* | A list of categories for the | The list of available | - | | distribution | categorizations is at | - | | | http://pypi.python.org/pypi?:action=list_classifiers. | + | | distribution | categorizations is available on `PyPI | + | | | <http://pypi.python.org/pypi?:action=list_classifiers>`_. | +--------------------+--------------------------------+-------------------------------------------------------------+ | *distclass* | the :class:`Distribution` | A subclass of | | | class to use | :class:`packaging.dist.Distribution` | diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 3931836..ca54021 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -39,7 +39,7 @@ The Python standard library provides two different profilers: 2. :mod:`profile`, a pure Python module whose interface is imitated by :mod:`cProfile`. Adds significant overhead to profiled programs. If you're trying to extend the profiler in some way, the task might be easier with this - module. Copyright © 1994, by InfoSeek Corporation. + module. The :mod:`profile` and :mod:`cProfile` modules export the same interface, so they are mostly interchangeable; :mod:`cProfile` has a much lower overhead but @@ -592,27 +592,3 @@ The resulting profiler will then call :func:`your_time_func`. functions should be used with care and should be as fast as possible. For the best results with a custom timer, it might be necessary to hard-code it in the C source of the internal :mod:`_lsprof` module. - - -Copyright and License Notices -============================= - -Copyright © 1994, by InfoSeek Corporation, all rights reserved. - -Permission to use, copy, modify, and distribute this Python software and its -associated documentation for any purpose (subject to the restriction in the -following sentence) without fee is hereby granted, provided that the above -copyright notice appears in all copies, and that both that copyright notice and -this permission notice appear in supporting documentation, and that the name of -InfoSeek not be used in advertising or publicity pertaining to distribution of -the software without specific, written prior permission. This permission is -explicitly restricted to the copying and modification of the software to remain -in Python, compiled Python, or other languages (such as C) wherein the modified -or derived code is exclusively imported into a Python module. - -INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT -SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index f8a1b60..799230c 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -159,12 +159,18 @@ Directory and files operations .. function:: move(src, dst) - Recursively move a file or directory to another location. + Recursively move a file or directory (*src*) to another location (*dst*). - Uses :func:`os.rename` to perform the move. If it fails, for reasons such as - when *src* and *dst* are on different filesystems or in case of windows where - rename is not supported when *dst* exists, fallback to copying *src* (with - :func:`copy2`) to the *dst* and then remove *src*. + If the destination is a directory or a symlink to a directory, then *src* is + moved inside that directory. + + The destination directory must not already exist. If the destination already + exists but is not a directory, it may be overwritten depending on + :func:`os.rename` semantics. + + If the destination is on the current filesystem, then :func:`os.rename` is + used. Otherwise, *src* is copied (using :func:`copy2`) to *dst* and then + removed. .. function:: disk_usage(path) @@ -177,9 +183,9 @@ Directory and files operations .. exception:: Error - This exception collects exceptions that raised during a multi-file operation. For - :func:`copytree`, the exception argument is a list of 3-tuples (*srcname*, - *dstname*, *exception*). + This exception collects exceptions that are raised during a multi-file + operation. For :func:`copytree`, the exception argument is a list of 3-tuples + (*srcname*, *dstname*, *exception*). .. _shutil-example: @@ -277,7 +283,7 @@ Archiving operations .. function:: get_archive_formats() - Returns a list of supported formats for archiving. + Return a list of supported formats for archiving. Each element of the returned sequence is a tuple ``(name, description)`` By default :mod:`shutil` provides these formats: @@ -295,7 +301,7 @@ Archiving operations .. function:: register_archive_format(name, function, [extra_args, [description]]) - Registers an archiver for the format *name*. *function* is a callable that + Register an archiver for the format *name*. *function* is a callable that will be used to invoke the archiver. If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be diff --git a/Doc/license.rst b/Doc/license.rst index 615b18c..d0b370f 100644 --- a/Doc/license.rst +++ b/Doc/license.rst @@ -494,36 +494,6 @@ The :mod:`http.cookies` module contains the following notice:: PERFORMANCE OF THIS SOFTWARE. -Profiling ---------- - -The :mod:`profile` and :mod:`pstats` modules contain the following notice:: - - Copyright 1994, by InfoSeek Corporation, all rights reserved. - Written by James Roskind - - Permission to use, copy, modify, and distribute this Python software - and its associated documentation for any purpose (subject to the - restriction in the following sentence) without fee is hereby granted, - provided that the above copyright notice appears in all copies, and - that both that copyright notice and this permission notice appear in - supporting documentation, and that the name of InfoSeek not be used in - advertising or publicity pertaining to distribution of the software - without specific, written prior permission. This permission is - explicitly restricted to the copying and modification of the software - to remain in Python, compiled Python, or other languages (such as C) - wherein the modified or derived code is exclusively imported into a - Python module. - - INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS. IN NO EVENT SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY - SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER - RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - Execution tracing ----------------- diff --git a/Doc/tools/sphinxext/susp-ignored.csv b/Doc/tools/sphinxext/susp-ignored.csv index 57d2f9c..8211d62 100644 --- a/Doc/tools/sphinxext/susp-ignored.csv +++ b/Doc/tools/sphinxext/susp-ignored.csv @@ -5,7 +5,6 @@ c-api/sequence,,:i2,o[i1:i2] c-api/sequence,,:i2,o[i1:i2] = v c-api/sequence,,:i2,del o[i1:i2] c-api/unicode,,:end,str[start:end] -distutils/apiref,,:action,http://pypi.python.org/pypi?:action=list_classifiers distutils/setupscript,,::, extending/embedding,,:numargs,"if(!PyArg_ParseTuple(args, "":numargs""))" extending/extending,,:set,"if (PyArg_ParseTuple(args, ""O:set_callback"", &temp)) {" @@ -495,7 +494,6 @@ library/pprint,209,::,"'Programming Language :: Python :: 2.6'," library/pprint,209,::,"'Programming Language :: Python :: 2.7'," library/pprint,209,::,"'Topic :: Software Development :: Libraries'," library/pprint,209,::,"'Topic :: Software Development :: Libraries :: Python Modules']," -library/packaging.dist,,:action,http://pypi.python.org/pypi?:action=list_classifiers packaging/examples,,`,This is the description of the ``foobar`` project. packaging/setupcfg,,::,Development Status :: 3 - Alpha packaging/setupcfg,,::,License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1) diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 336d074..4926280 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -598,24 +598,24 @@ occurs within the definition of a class. Name mangling is helpful for letting subclasses override methods without breaking intraclass method calls. For example:: - class Mapping: - def __init__(self, iterable): - self.items_list = [] - self.__update(iterable) + class Mapping: + def __init__(self, iterable): + self.items_list = [] + self.__update(iterable) - def update(self, iterable): - for item in iterable: - self.items_list.append(item) + def update(self, iterable): + for item in iterable: + self.items_list.append(item) - __update = update # private copy of original update() method + __update = update # private copy of original update() method - class MappingSubclass(Mapping): + class MappingSubclass(Mapping): - def update(self, keys, values): - # provides new signature for update() - # but does not break __init__() - for item in zip(keys, values): - self.items_list.append(item) + def update(self, keys, values): + # provides new signature for update() + # but does not break __init__() + for item in zip(keys, values): + self.items_list.append(item) Note that the mangling rules are designed mostly to avoid accidents; it still is possible to access or modify a variable that is considered private. This can |