diff options
author | Georg Brandl <georg@python.org> | 2007-09-01 13:51:09 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-09-01 13:51:09 (GMT) |
commit | 55ac8f0f26efdbbcb5cc197f9369d23d50bee908 (patch) | |
tree | a0d5b7128c055d8c767652dc3948c3404be06396 /Doc | |
parent | 1617457cff847fed9fadb01f1acf6ba8bb621726 (diff) | |
download | cpython-55ac8f0f26efdbbcb5cc197f9369d23d50bee908.zip cpython-55ac8f0f26efdbbcb5cc197f9369d23d50bee908.tar.gz cpython-55ac8f0f26efdbbcb5cc197f9369d23d50bee908.tar.bz2 |
Get rid of the remaining versionadded/versionchanged directives.
Diffstat (limited to 'Doc')
161 files changed, 335 insertions, 2197 deletions
diff --git a/Doc/distutils/setupscript.rst b/Doc/distutils/setupscript.rst index 26f50e6..3ffcc78 100644 --- a/Doc/distutils/setupscript.rst +++ b/Doc/distutils/setupscript.rst @@ -488,8 +488,6 @@ The corresponding call to :func:`setup` might be:: package_data={'mypkg': ['data/*.dat']}, ) -.. versionadded:: 2.4 - Installing Additional Files =========================== diff --git a/Doc/distutils/uploading.rst b/Doc/distutils/uploading.rst index 0b82184..5be4130 100644 --- a/Doc/distutils/uploading.rst +++ b/Doc/distutils/uploading.rst @@ -4,8 +4,6 @@ Uploading Packages to the Package Index *************************************** -.. versionadded:: 2.5 - The Python Package Index (PyPI) not only stores the package info, but also the package data if the author of the package wishes to. The distutils command :command:`upload` pushes the distribution files to PyPI. diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index 1d9ab1c..c8e49fe 100644 --- a/Doc/extending/newtypes.rst +++ b/Doc/extending/newtypes.rst @@ -1125,8 +1125,6 @@ not been updated to use some of the new generic mechanism that is available. Generic Attribute Management ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. versionadded:: 2.2 - Most extension types only use *simple* attributes. So, what makes the attributes simple? There are only a couple of conditions that must be met: diff --git a/Doc/install/index.rst b/Doc/install/index.rst index 980956a..8c9bd7c 100644 --- a/Doc/install/index.rst +++ b/Doc/install/index.rst @@ -343,9 +343,6 @@ installed to the following directories under the installation base as follows: | data | :file:`{home}/share` | :option:`--install-data` | +------------------------------+---------------------------+-----------------------------+ -.. versionchanged:: 2.4 - The :option:`--home` option used to be supported only on Unix. - .. _inst-alt-install-home: diff --git a/Doc/library/_ast.rst b/Doc/library/_ast.rst index 9b195be..d3cdfb9 100644 --- a/Doc/library/_ast.rst +++ b/Doc/library/_ast.rst @@ -9,8 +9,6 @@ Abstract Syntax Trees .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> -.. versionadded:: 2.5 - The ``_ast`` module helps Python applications to process trees of the Python abstract syntax grammar. The Python compiler currently provides read-only access to such trees, meaning that applications can only create a tree for a given diff --git a/Doc/library/_winreg.rst b/Doc/library/_winreg.rst index fddbfd1..fc185a2 100644 --- a/Doc/library/_winreg.rst +++ b/Doc/library/_winreg.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Mark Hammond <MarkH@ActiveState.com> -.. versionadded:: 2.0 - These functions expose the Windows registry API to Python. Instead of using an integer as the registry handle, a handle object is used to ensure that the handles are closed correctly, even if the programmer neglects to explicitly diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 5194edc..c2b7a44 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -59,9 +59,6 @@ The module defines the following type: from the optional *initializer* value, which must be a list, string, or iterable over elements of the appropriate type. - .. versionchanged:: 2.4 - Formerly, only lists or strings were accepted. - If given a list or string, the initializer is passed to the new array's :meth:`fromlist`, :meth:`fromstring`, or :meth:`fromunicode` method (see below) to add initial items to the array. Otherwise, the iterable initializer is @@ -135,9 +132,6 @@ The following data items and methods are also supported: be raised. If *iterable* is not an array, it must be iterable and its elements must be the right type to be appended to the array. - .. versionchanged:: 2.4 - Formerly, the argument could only be another array. - .. method:: array.fromfile(f, n) diff --git a/Doc/library/atexit.rst b/Doc/library/atexit.rst index 94d750b..cb2199a 100644 --- a/Doc/library/atexit.rst +++ b/Doc/library/atexit.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Skip Montanaro <skip@mojam.com> -.. versionadded:: 2.0 - The :mod:`atexit` module defines functions to register and unregister cleanup functions. Functions thus registered are automatically executed upon normal interpreter termination. @@ -36,9 +34,8 @@ is killed by a signal, when a Python fatal internal error is detected, or when saved. After all exit handlers have had a chance to run the last exception to be raised is re-raised. - .. versionchanged:: 2.6 - This function now returns *func* which makes it possible to use it as a - decorator without binding the original name to ``None``. + This function returns *func* which makes it possible to use it as a decorator + without binding the original name to ``None``. .. function:: unregister(func) @@ -47,8 +44,6 @@ is killed by a signal, when a Python fatal internal error is detected, or when shutdown. After calling :func:`unregister`, *func* is guaranteed not to be called when the interpreter shuts down. - .. versionadded:: 3.0 - .. seealso:: diff --git a/Doc/library/audioop.rst b/Doc/library/audioop.rst index 84a2690..7779610 100644 --- a/Doc/library/audioop.rst +++ b/Doc/library/audioop.rst @@ -53,8 +53,6 @@ The module defines the following variables and functions: a-LAW encoding always uses 8 bits samples, so *width* refers only to the sample width of the output fragment here. - .. versionadded:: 2.5 - .. function:: avg(fragment, width) @@ -133,8 +131,6 @@ The module defines the following variables and functions: range of about 13 bits using only 8 bit samples. It is used by the Sun audio hardware, among others. - .. versionadded:: 2.5 - .. function:: lin2lin(fragment, width, newwidth) diff --git a/Doc/library/basehttpserver.rst b/Doc/library/basehttpserver.rst index 2e8d6a3..0f65b26 100644 --- a/Doc/library/basehttpserver.rst +++ b/Doc/library/basehttpserver.rst @@ -228,9 +228,6 @@ A :class:`BaseHTTPRequestHandler` instance has the following methods: The result looks like ``'Sun, 06 Nov 1994 08:49:37 GMT'``. - .. versionadded:: 2.5 - The *timestamp* parameter. - .. method:: BaseHTTPRequestHandler.log_date_time_string() diff --git a/Doc/library/bisect.rst b/Doc/library/bisect.rst index b8eb348..10f72fb 100644 --- a/Doc/library/bisect.rst +++ b/Doc/library/bisect.rst @@ -30,16 +30,12 @@ The following functions are provided: existing entries. The return value is suitable for use as the first parameter to ``list.insert()``. This assumes that *list* is already sorted. - .. versionadded:: 2.1 - .. function:: bisect_right(list, item[, lo[, hi]]) Similar to :func:`bisect_left`, but returns an insertion point which comes after (to the right of) any existing entries of *item* in *list*. - .. versionadded:: 2.1 - .. function:: bisect(...) @@ -52,16 +48,12 @@ The following functions are provided: ``list.insert(bisect.bisect_left(list, item, lo, hi), item)``. This assumes that *list* is already sorted. - .. versionadded:: 2.1 - .. function:: insort_right(list, item[, lo[, hi]]) Similar to :func:`insort_left`, but inserting *item* in *list* after any existing entries of *item*. - .. versionadded:: 2.1 - .. function:: insort(...) diff --git a/Doc/library/bsddb.rst b/Doc/library/bsddb.rst index 55b7c7d..c5c6276 100644 --- a/Doc/library/bsddb.rst +++ b/Doc/library/bsddb.rst @@ -82,8 +82,6 @@ arguments should be used in most instances. Wrapper class around a DB object that supports string keys (rather than bytes). All keys are encoded as UTF-8, then passed to the underlying object. - - .. versionadded:: 3.0 .. class:: StringValues(db) @@ -91,8 +89,6 @@ arguments should be used in most instances. Wrapper class around a DB object that supports string values (rather than bytes). All values are encoded as UTF-8, then passed to the underlying object. - .. versionadded:: 3.0 - .. seealso:: @@ -108,9 +104,6 @@ Hash, BTree and Record Objects Once instantiated, hash, btree and record objects support the same methods as dictionaries. In addition, they support the methods listed below. -.. versionchanged:: 2.3.1 - Added dictionary methods. - .. method:: bsddbobject.close() diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index a8c0911..73fd450 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Gustavo Niemeyer <niemeyer@conectiva.com> -.. versionadded:: 2.3 - This module provides a comprehensive interface for the bz2 compression library. It implements a complete file interface, one-shot (de)compression functions, and types for sequential (de)compression. diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst index aa13c81..e125ccc 100644 --- a/Doc/library/calendar.rst +++ b/Doc/library/calendar.rst @@ -32,11 +32,9 @@ it's the base calendar for all computations. preparing the calendar data for formatting. This class doesn't do any formatting itself. This is the job of subclasses. - .. versionadded:: 2.5 :class:`Calendar` instances have the following methods: - .. method:: Calendar.iterweekdays(weekday) Return an iterator for the week day numbers that will be used for one week. The @@ -109,11 +107,9 @@ it's the base calendar for all computations. This class can be used to generate plain text calendars. - .. versionadded:: 2.5 :class:`TextCalendar` instances have the following methods: - .. method:: TextCalendar.formatmonth(theyear, themonth[, w[, l]]) Return a month's calendar in a multi-line string. If *w* is provided, it @@ -145,11 +141,9 @@ it's the base calendar for all computations. This class can be used to generate HTML calendars. - .. versionadded:: 2.5 :class:`HTMLCalendar` instances have the following methods: - .. method:: HTMLCalendar.formatmonth(theyear, themonth[, withyear]) Return a month's calendar as an HTML table. If *withyear* is true the year will @@ -178,8 +172,6 @@ it's the base calendar for all computations. this locale includes an encoding all strings containing month and weekday names will be returned as unicode. - .. versionadded:: 2.5 - .. class:: LocaleHTMLCalendar([firstweekday[, locale]]) @@ -188,11 +180,9 @@ it's the base calendar for all computations. this locale includes an encoding all strings containing month and weekday names will be returned as unicode. - .. versionadded:: 2.5 For simple text calendars this module provides the following functions. - .. function:: setfirstweekday(weekday) Sets the weekday (``0`` is Monday, ``6`` is Sunday) to start each week. The @@ -203,15 +193,11 @@ For simple text calendars this module provides the following functions. import calendar calendar.setfirstweekday(calendar.SUNDAY) - .. versionadded:: 2.0 - .. function:: firstweekday() Returns the current setting for the weekday to start each week. - .. versionadded:: 2.0 - .. function:: isleap(year) @@ -223,9 +209,7 @@ For simple text calendars this module provides the following functions. Returns the number of leap years in the range from *y1* to *y2* (exclusive), where *y1* and *y2* are years. - .. versionchanged:: 2.0 - This function didn't work for ranges spanning a century change in Python - 1.5.2. + This function works for ranges spanning a century change. .. function:: weekday(year, month, day) @@ -263,8 +247,6 @@ For simple text calendars this module provides the following functions. Returns a month's calendar in a multi-line string using the :meth:`formatmonth` of the :class:`TextCalendar` class. - .. versionadded:: 2.0 - .. function:: prcal(year[, w[, l[c]]]) @@ -276,8 +258,6 @@ For simple text calendars this module provides the following functions. Returns a 3-column calendar for an entire year as a multi-line string using the :meth:`formatyear` of the :class:`TextCalendar` class. - .. versionadded:: 2.0 - .. function:: timegm(tuple) @@ -286,11 +266,9 @@ For simple text calendars this module provides the following functions. Unix timestamp value, assuming an epoch of 1970, and the POSIX encoding. In fact, :func:`time.gmtime` and :func:`timegm` are each others' inverse. - .. versionadded:: 2.0 The :mod:`calendar` module exports the following data attributes: - .. data:: day_name An array that represents the days of the week in the current locale. diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst index 29ed545..98166e8 100644 --- a/Doc/library/cgi.rst +++ b/Doc/library/cgi.rst @@ -164,8 +164,6 @@ actually be instances of the class :class:`MiniFieldStorage`. In this case, the Higher Level Interface ---------------------- -.. versionadded:: 2.2 - The previous section explains how to read CGI form data using the :class:`FieldStorage` class. This section describes a higher level interface which was added to this class to allow one to do it in a more readable and diff --git a/Doc/library/cgitb.rst b/Doc/library/cgitb.rst index 327cd17..c106d9e 100644 --- a/Doc/library/cgitb.rst +++ b/Doc/library/cgitb.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> -.. versionadded:: 2.2 - .. index:: single: CGI; exceptions single: CGI; tracebacks diff --git a/Doc/library/cmath.rst b/Doc/library/cmath.rst index 2bc162c..5a9ae05 100644 --- a/Doc/library/cmath.rst +++ b/Doc/library/cmath.rst @@ -84,9 +84,6 @@ The functions are: specified, returns the natural logarithm of *x*. There is one branch cut, from 0 along the negative real axis to -∞, continuous from above. - .. versionchanged:: 2.4 - *base* argument added. - .. function:: log10(x) diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst index 9af08e2..716db67 100644 --- a/Doc/library/cmd.rst +++ b/Doc/library/cmd.rst @@ -28,9 +28,6 @@ interface. objects that the Cmd instance or subclass instance will use for input and output. If not specified, they will default to *sys.stdin* and *sys.stdout*. - .. versionchanged:: 2.3 - The *stdin* and *stdout* parameters were added. - .. _cmd-objects: diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index aa6bc98..f35ef76 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -118,8 +118,6 @@ functions which use :func:`lookup` for the codec lookup: Raises a :exc:`LookupError` in case the encoding cannot be found or the codec doesn't support an incremental encoder. - .. versionadded:: 2.5 - .. function:: getincrementaldecoder(encoding) @@ -129,8 +127,6 @@ functions which use :func:`lookup` for the codec lookup: Raises a :exc:`LookupError` in case the encoding cannot be found or the codec doesn't support an incremental decoder. - .. versionadded:: 2.5 - .. function:: getreader(encoding) @@ -245,8 +241,6 @@ utility functions: *iterable*. This function is a generator. *errors* (as well as any other keyword argument) is passed through to the incremental encoder. - .. versionadded:: 2.5 - .. function:: iterdecode(iterable, encoding[, errors]) @@ -254,8 +248,6 @@ utility functions: *iterable*. This function is a generator. *errors* (as well as any other keyword argument) is passed through to the incremental decoder. - .. versionadded:: 2.5 - The module also provides the following constants which are useful for reading and writing to platform dependent files: @@ -390,8 +382,6 @@ encoded/decoded with the stateless encoder/decoder. IncrementalEncoder Objects ^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. versionadded:: 2.5 - The :class:`IncrementalEncoder` class is used for encoding an input in multiple steps. It defines the following methods which every incremental encoder must define in order to be compatible with the Python codec registry. @@ -447,16 +437,12 @@ define in order to be compatible with the Python codec registry. marshaling/pickling the state and encoding the bytes of the resulting string into an integer). - .. versionadded:: 3.0 - .. method:: IncrementalEncoder.setstate(state) Set the state of the encoder to *state*. *state* must be an encoder state returned by :meth:`getstate`. - .. versionadded:: 3.0 - .. _incremental-decoder-objects: @@ -524,16 +510,12 @@ define in order to be compatible with the Python codec registry. marshaling/pickling the info and encoding the bytes of the resulting string into an integer.) - .. versionadded:: 3.0 - .. method:: IncrementalDecoder.setstate(state) Set the state of the encoder to *state*. *state* must be a decoder state returned by :meth:`getstate`. - .. versionadded:: 3.0 - The :class:`StreamWriter` and :class:`StreamReader` classes provide generic working interfaces which can be used to implement new encoding submodules very easily. See :mod:`encodings.utf_8` for an example of how this is done. @@ -661,12 +643,6 @@ compatible with the Python codec registry. e.g. if optional encoding endings or state markers are available on the stream, these should be read too. - .. versionchanged:: 2.4 - *chars* argument added. - - .. versionchanged:: 2.4.2 - *firstline* argument added. - .. method:: StreamReader.readline([size[, keepends]]) @@ -677,9 +653,6 @@ compatible with the Python codec registry. If *keepends* is false line-endings will be stripped from the lines returned. - .. versionchanged:: 2.4 - *keepends* argument added. - .. method:: StreamReader.readlines([sizehint[, keepends]]) @@ -1157,9 +1130,6 @@ the table. | | | | operand | +--------------------+---------+----------------+---------------------------+ -.. versionadded:: 2.3 - The ``idna`` and ``punycode`` encodings. - :mod:`encodings.idna` --- Internationalized Domain Names in Applications ------------------------------------------------------------------------ @@ -1168,8 +1138,6 @@ the table. :synopsis: Internationalized Domain Names implementation .. moduleauthor:: Martin v. Löwis -.. versionadded:: 2.3 - This module implements :rfc:`3490` (Internationalized Domain Names in Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN)). It builds upon the ``punycode`` encoding @@ -1229,8 +1197,6 @@ functions can be used directly if desired. :synopsis: UTF-8 codec with BOM signature .. moduleauthor:: Walter Dörwald -.. versionadded:: 2.5 - This module implements a variant of the UTF-8 codec: On encoding a UTF-8 encoded BOM will be prepended to the UTF-8 encoded bytes. For the stateful encoder this is only done once (on the first write to the byte stream). For decoding an diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 613973c..7a850b6 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Raymond Hettinger <python@rcn.com> -.. versionadded:: 2.4 - This module implements high-performance container datatypes. Currently, there are two datatypes, :class:`deque` and :class:`defaultdict`, and one datatype factory function, :func:`NamedTuple`. Python already @@ -21,12 +19,6 @@ or file based ordered dictionaries with string keys. Future editions of the standard library may include balanced trees and ordered dictionaries. -.. versionchanged:: 2.5 - Added :class:`defaultdict`. - -.. versionchanged:: 2.6 - Added :class:`NamedTuple`. - .. _deque-objects: @@ -49,11 +41,9 @@ ordered dictionaries. ``pop(0)`` and ``insert(0, v)`` operations which change both the size and position of the underlying data representation. - .. versionadded:: 2.4 Deque objects support the following methods: - .. method:: deque.append(x) Add *x* to the right side of the deque. @@ -99,8 +89,6 @@ Deque objects support the following methods: Removed the first occurrence of *value*. If not found, raises a :exc:`ValueError`. - .. versionadded:: 2.5 - .. method:: deque.rotate(n) @@ -256,12 +244,10 @@ two adjacent nodes into one by grouping them in a list:: as if they were passed to the :class:`dict` constructor, including keyword arguments. - .. versionadded:: 2.5 :class:`defaultdict` objects support the following method in addition to the standard :class:`dict` operations: - .. method:: defaultdict.__missing__(key) If the :attr:`default_factory` attribute is ``None``, this raises an @@ -372,8 +358,6 @@ Setting the :attr:`default_factory` to :class:`set` makes the helpful docstring (with typename and fieldnames) and a helpful :meth:`__repr__` method which lists the tuple contents in a ``name=value`` format. - .. versionadded:: 2.6 - The *fieldnames* are specified in a single string and are separated by spaces. Any valid Python identifier may be used for a field name. diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index dd91d59..b4c89e8 100644 --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -63,11 +63,6 @@ write-back, as will be the keys within each section. options within a section, and for the default values. This class does not support the magical interpolation behavior. - .. versionadded:: 2.3 - - .. versionchanged:: 2.6 - *dict_type* was added. - .. class:: ConfigParser([defaults]) @@ -94,8 +89,6 @@ write-back, as will be the keys within each section. .. % XXX Need to explain what's safer/more predictable about it. - .. versionadded:: 2.3 - .. exception:: NoSectionError @@ -131,16 +124,12 @@ write-back, as will be the keys within each section. Exception raised when an option referenced from a value does not exist. Subclass of :exc:`InterpolationError`. - .. versionadded:: 2.3 - .. exception:: InterpolationSyntaxError Exception raised when the source text into which substitutions are made does not conform to the required syntax. Subclass of :exc:`InterpolationError`. - .. versionadded:: 2.3 - .. exception:: MissingSectionHeaderError @@ -206,8 +195,6 @@ RawConfigParser Objects If the given section exists, and contains the given option, return :const:`True`; otherwise return :const:`False`. - .. versionadded:: 1.6 - .. method:: RawConfigParser.read(filenames) @@ -229,9 +216,6 @@ RawConfigParser Objects config.readfp(open('defaults.cfg')) config.read(['site.cfg', os.path.expanduser('~/.myapp.cfg')]) - .. versionchanged:: 2.4 - Returns list of successfully parsed filenames. - .. method:: RawConfigParser.readfp(fp[, filename]) @@ -281,16 +265,12 @@ RawConfigParser Objects true) for *internal* storage of non-string values, full functionality (including interpolation and output to files) can only be achieved using string values. - .. versionadded:: 1.6 - .. method:: RawConfigParser.write(fileobject) Write a representation of the configuration to the specified file object. This representation can be parsed by a future :meth:`read` call. - .. versionadded:: 1.6 - .. method:: RawConfigParser.remove_option(section, option) @@ -298,8 +278,6 @@ RawConfigParser Objects not exist, raise :exc:`NoSectionError`. If the option existed to be removed, return :const:`True`; otherwise return :const:`False`. - .. versionadded:: 1.6 - .. method:: RawConfigParser.remove_section(section) @@ -339,8 +317,6 @@ The :class:`ConfigParser` class extends some methods of the Return a list of ``(name, value)`` pairs for each option in the given *section*. Optional arguments have the same meaning as for the :meth:`get` method. - .. versionadded:: 2.3 - .. _safeconfigparser-objects: @@ -357,5 +333,3 @@ The :class:`SafeConfigParser` class implements the same extended interface as otherwise raise :exc:`NoSectionError`. *value* must be a string (:class:`str` or :class:`unicode`); if not, :exc:`TypeError` is raised. - .. versionadded:: 2.4 - diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst index fecd836..8f7be50 100644 --- a/Doc/library/constants.rst +++ b/Doc/library/constants.rst @@ -5,19 +5,17 @@ Built-in Constants A small number of constants live in the built-in namespace. They are: +.. XXX False, True, None are keywords too + .. data:: False The false value of the :class:`bool` type. - .. versionadded:: 2.3 - .. data:: True The true value of the :class:`bool` type. - .. versionadded:: 2.3 - .. data:: None diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index fffb99c..070dd88 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -6,8 +6,6 @@ :synopsis: Utilities for with-statement contexts. -.. versionadded:: 2.5 - This module provides utilities for common tasks involving the :keyword:`with` statement. For more information see also :ref:`typecontextmanager` and :ref:`context-managers`. diff --git a/Doc/library/cookie.rst b/Doc/library/cookie.rst index 5a5808f..bd7cc1e 100644 --- a/Doc/library/cookie.rst +++ b/Doc/library/cookie.rst @@ -110,10 +110,6 @@ Cookie Objects to join the headers together, and is by default the combination ``'\r\n'`` (CRLF). - .. versionchanged:: 2.5 - The default separator has been changed from ``'\n'`` to match the cookie - specification. - .. method:: BaseCookie.js_output([attrs]) diff --git a/Doc/library/cookielib.rst b/Doc/library/cookielib.rst index 44045d3..18f471e 100644 --- a/Doc/library/cookielib.rst +++ b/Doc/library/cookielib.rst @@ -8,10 +8,6 @@ .. sectionauthor:: John J. Lee <jjl@pobox.com> -.. versionadded:: 2.4 - - - The :mod:`cookielib` module defines classes for automatic handling of HTTP cookies. It is useful for accessing web sites that require small pieces of data -- :dfn:`cookies` -- to be set on the client machine by an HTTP response from a @@ -517,19 +513,17 @@ all be assigned to. case RFC 2109 cookies are downgraded if and only if RFC 2965 handling is turned off. Therefore, RFC 2109 cookies are downgraded by default. - .. versionadded:: 2.5 General strictness switches: - .. attribute:: DefaultCookiePolicy.strict_domain Don't allow sites to set two-component domains with country-code top-level domains like ``.co.uk``, ``.gov.uk``, ``.co.nz``.etc. This is far from perfect and isn't guaranteed to work! -RFC 2965 protocol strictness switches: +RFC 2965 protocol strictness switches: .. attribute:: DefaultCookiePolicy.strict_rfc2965_unverifiable @@ -538,8 +532,8 @@ RFC 2965 protocol strictness switches: another site). If this is false, cookies are *never* blocked on the basis of verifiability -Netscape protocol strictness switches: +Netscape protocol strictness switches: .. attribute:: DefaultCookiePolicy.strict_ns_unverifiable @@ -683,8 +677,6 @@ internal consistency, so you should know what you're doing if you do that. :mod:`cookielib` may 'downgrade' RFC 2109 cookies to Netscape cookies, in which case :attr:`version` is 0. - .. versionadded:: 2.5 - .. attribute:: Cookie.port_specified diff --git a/Doc/library/copy.rst b/Doc/library/copy.rst index 6fb3100..ea59613 100644 --- a/Doc/library/copy.rst +++ b/Doc/library/copy.rst @@ -54,9 +54,6 @@ file, socket, window, array, or any similar types. It does "copy" functions and classes (shallow and deeply), by returning the original object unchanged; this is compatible with the way these are treated by the :mod:`pickle` module. -.. versionchanged:: 2.5 - Added copying functions. - .. index:: module: pickle Classes can use the same interfaces to control copying that they use to control diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index 19123c6..46302ef 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -7,8 +7,6 @@ .. sectionauthor:: Skip Montanaro <skip@pobox.com> -.. versionadded:: 2.3 - .. index:: single: csv pair: data; tabular @@ -77,14 +75,13 @@ The :mod:`csv` module defines the following functions: All data read are returned as strings. No automatic data type conversion is performed. - .. versionchanged:: 2.5 - The parser is now stricter with respect to multi-line quoted fields. Previously, - if a line ended within a quoted field without a terminating newline character, a - newline would be inserted into the returned field. This behavior caused problems - when reading files which contained carriage return characters within fields. - The behavior was changed to return the field without inserting newlines. As a - consequence, if newlines embedded within fields are important, the input should - be split into lines in a manner which preserves the newline characters. + The parser is quite strict with respect to multi-line quoted fields. Previously, + if a line ended within a quoted field without a terminating newline character, a + newline would be inserted into the returned field. This behavior caused problems + when reading files which contained carriage return characters within fields. + The behavior was changed to return the field without inserting newlines. As a + consequence, if newlines embedded within fields are important, the input should + be split into lines in a manner which preserves the newline characters. .. function:: writer(csvfile[, dialect='excel'][, fmtparam]) @@ -138,11 +135,9 @@ The :mod:`csv` module defines the following functions: Returns the current maximum field size allowed by the parser. If *new_limit* is given, this becomes the new limit. - .. versionadded:: 2.5 The :mod:`csv` module defines the following classes: - .. class:: DictReader(csvfile[, fieldnames=:const:None,[, restkey=:const:None[, restval=None[, dialect='excel'[, *args, **kwds]]]]]) Create an object which operates like a regular reader but maps the information @@ -352,7 +347,6 @@ Reader objects have the following public attributes: The number of lines read from the source iterator. This is not the same as the number of records returned, as records can span multiple lines. - .. versionadded:: 2.5 Writer Objects diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 1a52a75..ac259e8 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -7,8 +7,6 @@ .. moduleauthor:: Thomas Heller <theller@python.net> -.. versionadded:: 2.5 - ``ctypes`` is a foreign function library for Python. It provides C compatible data types, and allows calling functions in dlls/shared libraries. It can be used to wrap these libraries in pure Python. @@ -2209,8 +2207,6 @@ These are the fundamental ctypes data types: can be True or False, and the constructor accepts any object that has a truth value. - .. versionadded:: 2.6 - .. class:: HRESULT diff --git a/Doc/library/curses.ascii.rst b/Doc/library/curses.ascii.rst index 0a45c2a..cf51f78 100644 --- a/Doc/library/curses.ascii.rst +++ b/Doc/library/curses.ascii.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Eric S. Raymond <esr@thyrsus.com> -.. versionadded:: 1.6 - The :mod:`curses.ascii` module supplies name constants for ASCII characters and functions to test membership in various ASCII character classes. The constants supplied are names for control characters as follows: diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst index 06bac2f..046b796 100644 --- a/Doc/library/curses.rst +++ b/Doc/library/curses.rst @@ -8,9 +8,6 @@ .. sectionauthor:: Eric Raymond <esr@thyrsus.com> -.. versionchanged:: 1.6 - Added support for the ``ncurses`` library and converted to a package. - The :mod:`curses` module provides an interface to the curses library, the de-facto standard for portable advanced terminal handling. @@ -1520,8 +1517,6 @@ The following table lists the predefined colors: .. sectionauthor:: Eric Raymond <esr@thyrsus.com> -.. versionadded:: 1.6 - The :mod:`curses.textpad` module provides a :class:`Textbox` class that handles elementary text editing in a curses window, supporting a set of keybindings resembling those of Emacs (thus, also of Netscape Navigator, BBedit 6.x, @@ -1656,8 +1651,6 @@ You can instantiate a :class:`Textbox` object as follows: .. sectionauthor:: Eric Raymond <esr@thyrsus.com> -.. versionadded:: 1.6 - This module supplies one function, :func:`wrapper`, which runs another function which should be the rest of your curses-using application. If the application raises an exception, :func:`wrapper` will restore the terminal to a sane state diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 24d4f69..87cccf6 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -11,8 +11,6 @@ .. sectionauthor:: A.M. Kuchling <amk@amk.ca> -.. versionadded:: 2.3 - The :mod:`datetime` module supplies classes for manipulating dates and times in both simple and complex ways. While date and time arithmetic is supported, the focus of the implementation is on efficient member extraction for output @@ -604,7 +602,6 @@ Other constructors, all class methods: can't be parsed by :func:`time.strptime` or if it returns a value which isn't a time tuple. - .. versionadded:: 2.5 Class attributes: diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index 1d17109..498c2cc 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -5,19 +5,14 @@ .. module:: decimal :synopsis: Implementation of the General Decimal Arithmetic Specification. - .. moduleauthor:: Eric Price <eprice at tjhsst.edu> .. moduleauthor:: Facundo Batista <facundo at taniquetil.com.ar> .. moduleauthor:: Raymond Hettinger <python at rcn.com> .. moduleauthor:: Aahz <aahz at pobox.com> .. moduleauthor:: Tim Peters <tim.one at comcast.net> - - .. sectionauthor:: Raymond D. Hettinger <python at rcn.com> -.. versionadded:: 2.4 - The :mod:`decimal` module provides support for decimal floating point arithmetic. It offers several advantages over the :class:`float()` datatype: @@ -436,8 +431,6 @@ the :func:`localcontext` function to temporarily change the active context. when exiting the with-statement. If no context is specified, a copy of the current context is used. - .. versionadded:: 2.5 - For example, the following code sets the current decimal precision to 42 places, performs a calculation, and then automatically restores the previous context:: diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index 95b83e6..8d130a1 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -10,9 +10,6 @@ .. % LaTeXification by Fred L. Drake, Jr. <fdrake@acm.org>. -.. versionadded:: 2.1 - - .. class:: SequenceMatcher This is a flexible class for comparing pairs of sequences of any type, so long @@ -117,8 +114,6 @@ :file:`Tools/scripts/diff.py` is a command-line front-end to this class and contains a good example of its use. - .. versionadded:: 2.4 - .. function:: context_diff(a, b[, fromfile][, tofile][, fromfiledate][, tofiledate][, n][, lineterm]) @@ -146,8 +141,6 @@ :file:`Tools/scripts/diff.py` is a command-line front-end for this function. - .. versionadded:: 2.3 - .. function:: get_close_matches(word, possibilities[, n][, cutoff]) @@ -263,8 +256,6 @@ :file:`Tools/scripts/diff.py` is a command-line front-end for this function. - .. versionadded:: 2.3 - .. function:: IS_LINE_JUNK(line) @@ -382,12 +373,6 @@ use :meth:`set_seq2` to set the commonly used sequence once and call then ``i+n != i'`` or ``j+n != j'``; in other words, adjacent triples always describe non-adjacent equal blocks. - .. % Explain why a dummy is used! - - .. versionchanged:: 2.5 - The guarantee that adjacent triples always describe non-adjacent blocks was - implemented. - :: >>> s = SequenceMatcher(None, "abxcd", "abcd") @@ -445,8 +430,6 @@ use :meth:`set_seq2` to set the commonly used sequence once and call The groups are returned in the same format as :meth:`get_opcodes`. - .. versionadded:: 2.3 - .. method:: SequenceMatcher.ratio() diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst index 4f4f511..a448880 100644 --- a/Doc/library/doctest.rst +++ b/Doc/library/doctest.rst @@ -290,9 +290,6 @@ strings are treated as if they were docstrings. In output, a key ``K`` in Any classes found are recursively searched similarly, to test docstrings in their contained methods and nested classes. -.. versionchanged:: 2.4 - A "private name" concept is deprecated and no longer documented. - .. _doctest-finding-examples: @@ -305,10 +302,6 @@ hard tab characters are expanded to spaces, using 8-column tab stops. If you don't believe tabs should mean that, too bad: don't use hard tabs, or write your own :class:`DocTestParser` class. -.. versionchanged:: 2.4 - Expanding tabs to spaces is new; previous versions tried to preserve hard tabs, - with confusing results. - :: >>> # comments are ignored @@ -338,10 +331,6 @@ The fine print: blank line, put ``<BLANKLINE>`` in your doctest example each place a blank line is expected. - .. versionchanged:: 2.4 - ``<BLANKLINE>`` was added; there was no way to use expected output containing - empty lines in previous versions. - * Output to stdout is captured, but not output to stderr (exception tracebacks are captured via a different means). @@ -498,10 +487,6 @@ Some details you should read once, but won't need to remember: ^ SyntaxError: invalid syntax -.. versionchanged:: 2.4 - The ability to handle a multi-line exception detail, and the - :const:`IGNORE_EXCEPTION_DETAIL` doctest option, were added. - .. _doctest-options: @@ -663,7 +648,7 @@ two blanks before the single-digit list elements, and because the actual output is on a single line. This test also passes, and also requires a directive to do so:: - >>> print range(20) # doctest:+ELLIPSIS + >>> print range(20) # doctest: +ELLIPSIS [0, 1, ..., 18, 19] Multiple directives can be used on a single physical line, separated by commas:: @@ -692,17 +677,6 @@ usually the only meaningful choice. However, option flags can also be passed to functions that run doctests, establishing different defaults. In such cases, disabling an option via ``-`` in a directive can be useful. -.. versionchanged:: 2.4 - Constants :const:`DONT_ACCEPT_BLANKLINE`, :const:`NORMALIZE_WHITESPACE`, - :const:`ELLIPSIS`, :const:`IGNORE_EXCEPTION_DETAIL`, :const:`REPORT_UDIFF`, - :const:`REPORT_CDIFF`, :const:`REPORT_NDIFF`, - :const:`REPORT_ONLY_FIRST_FAILURE`, :const:`COMPARISON_FLAGS` and - :const:`REPORTING_FLAGS` were added; by default ``<BLANKLINE>`` in expected - output matches an empty line in actual output; and doctest directives were - added. - -.. versionchanged:: 2.5 - Constant :const:`SKIP` was added. There's also a way to register new option flag names, although this isn't useful unless you intend to extend :mod:`doctest` internals via subclassing: @@ -718,8 +692,6 @@ unless you intend to extend :mod:`doctest` internals via subclassing: MY_FLAG = register_optionflag('MY_FLAG') - .. versionadded:: 2.4 - .. _doctest-warnings: @@ -868,11 +840,6 @@ and :ref:`doctest-simple-testfile`. Optional argument *encoding* specifies an encoding that should be used to convert the file to unicode. - .. versionadded:: 2.4 - - .. versionchanged:: 2.5 - The parameter *encoding* was added. - .. function:: testmod([m][, name][, globs][, verbose][, report][, optionflags][, extraglobs][, raise_on_error][, exclude_empty]) @@ -906,14 +873,6 @@ and :ref:`doctest-simple-testfile`. *raise_on_error*, and *globs* are the same as for function :func:`testfile` above, except that *globs* defaults to ``m.__dict__``. - .. versionchanged:: 2.3 - The parameter *optionflags* was added. - - .. versionchanged:: 2.4 - The parameters *extraglobs*, *raise_on_error* and *exclude_empty* were added. - - .. versionchanged:: 2.5 - The optional argument *isprivate*, deprecated in 2.4, was removed. There's also a function to run the doctests associated with a single object. This function is provided for backward compatibility. There are no plans to @@ -1031,14 +990,8 @@ from text files and modules with doctests: Optional argument *encoding* specifies an encoding that should be used to convert the file to unicode. - .. versionadded:: 2.4 - - .. versionchanged:: 2.5 - The global ``__file__`` was added to the globals provided to doctests loaded - from a text file using :func:`DocFileSuite`. - - .. versionchanged:: 2.5 - The parameter *encoding* was added. + The global ``__file__`` is added to the globals provided to doctests loaded + from a text file using :func:`DocFileSuite`. .. function:: DocTestSuite([module][, globs][, extraglobs][, test_finder][, setUp][, tearDown][, checker]) @@ -1068,12 +1021,8 @@ from text files and modules with doctests: Optional arguments *setUp*, *tearDown*, and *optionflags* are the same as for function :func:`DocFileSuite` above. - .. versionadded:: 2.3 + This function uses the same search technique as :func:`testmod`. - .. versionchanged:: 2.4 - The parameters *globs*, *extraglobs*, *test_finder*, *setUp*, *tearDown*, and - *optionflags* were added; this function now uses the same search technique as - :func:`testmod`. Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` out of :class:`doctest.DocTestCase` instances, and :class:`DocTestCase` is a @@ -1119,8 +1068,6 @@ reporting flags specific to :mod:`unittest` support, via this function: The value of the :mod:`unittest` reporting flags in effect before the function was called is returned by the function. - .. versionadded:: 2.4 - .. _doctest-advanced-api: @@ -1181,7 +1128,6 @@ DocTest Objects constructor arguments are used to initialize the member variables of the same names. - .. versionadded:: 2.4 :class:`DocTest` defines the following member variables. They are initialized by the constructor, and should not be modified directly. @@ -1239,7 +1185,6 @@ Example Objects output. The constructor arguments are used to initialize the member variables of the same names. - .. versionadded:: 2.4 :class:`Example` defines the following member variables. They are initialized by the constructor, and should not be modified directly. @@ -1316,7 +1261,6 @@ DocTestFinder objects If the optional argument *exclude_empty* is false, then :meth:`DocTestFinder.find` will include tests for objects with empty docstrings. - .. versionadded:: 2.4 :class:`DocTestFinder` defines the following method: @@ -1369,7 +1313,6 @@ DocTestParser objects A processing class used to extract interactive examples from a string, and use them to create a :class:`DocTest` object. - .. versionadded:: 2.4 :class:`DocTestParser` defines the following methods: @@ -1438,7 +1381,6 @@ DocTestRunner objects runner compares expected output to actual output, and how it displays failures. For more information, see section :ref:`doctest-options`. - .. versionadded:: 2.4 :class:`DocTestParser` defines the following methods: @@ -1530,11 +1472,9 @@ OutputChecker objects if they match; and :meth:`output_difference`, which returns a string describing the differences between two outputs. - .. versionadded:: 2.4 :class:`OutputChecker` defines the following methods: - .. method:: OutputChecker.check_output(want, got, optionflags) Return ``True`` iff the actual output from an example (*got*) matches the @@ -1616,8 +1556,6 @@ Doctest provides several mechanisms for debugging doctest examples: (0, 3) >>> - .. versionchanged:: 2.4 - The ability to use :func:`pdb.set_trace` usefully inside doctests was added. Functions that convert doctests to Python code, and possibly run the synthesized code under the debugger: @@ -1656,8 +1594,6 @@ code under the debugger: useful when you want to transform an interactive Python session into a Python script. - .. versionadded:: 2.4 - .. function:: testsource(module, name) @@ -1676,8 +1612,6 @@ code under the debugger: prints a script version of function :func:`f`'s docstring, with doctests converted to code, and the rest placed in comments. - .. versionadded:: 2.3 - .. function:: debug(module, name[, pm]) @@ -1699,11 +1633,6 @@ code under the debugger: specified, or is false, the script is run under the debugger from the start, via passing an appropriate :func:`exec` call to :func:`pdb.run`. - .. versionadded:: 2.3 - - .. versionchanged:: 2.4 - The *pm* argument was added. - .. function:: debug_src(src[, pm][, globs]) @@ -1718,7 +1647,6 @@ code under the debugger: execution context. If not specified, or ``None``, an empty dictionary is used. If specified, a shallow copy of the dictionary is used. - .. versionadded:: 2.4 The :class:`DebugRunner` class, and the special exceptions it may raise, are of most interest to testing framework authors, and will only be sketched here. See diff --git a/Doc/library/docxmlrpcserver.rst b/Doc/library/docxmlrpcserver.rst index 958ea95..8169684 100644 --- a/Doc/library/docxmlrpcserver.rst +++ b/Doc/library/docxmlrpcserver.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Brian Quinlan <brianq@activestate.com> -.. versionadded:: 2.3 - The :mod:`DocXMLRPCServer` module extends the classes found in :mod:`SimpleXMLRPCServer` to serve HTML documentation in response to HTTP GET requests. Servers can either be free standing, using :class:`DocXMLRPCServer`, diff --git a/Doc/library/dumbdbm.rst b/Doc/library/dumbdbm.rst index 3db9fda..4e91ac9 100644 --- a/Doc/library/dumbdbm.rst +++ b/Doc/library/dumbdbm.rst @@ -43,9 +43,6 @@ The module defines the following: database has to be created. It defaults to octal ``0666`` (and will be modified by the prevailing umask). - .. versionchanged:: 2.2 - The *mode* argument was ignored in earlier versions. - .. seealso:: diff --git a/Doc/library/easydialogs.rst b/Doc/library/easydialogs.rst index 50b312f..dbc996c 100644 --- a/Doc/library/easydialogs.rst +++ b/Doc/library/easydialogs.rst @@ -96,8 +96,6 @@ The :mod:`EasyDialogs` module defines the following functions: chosen, the text of *cmdstr* will be appended to the command line as is, except that a trailing ``':'`` or ``'='`` (if present) will be trimmed off. - .. versionadded:: 2.0 - .. function:: AskFileForOpen( [message] [, typeList] [, defaultLocation] [, defaultOptionFlags] [, location] [, clientName] [, windowTitle] [, actionButtonLabel] [, cancelButtonLabel] [, preferenceKey] [, popupExtension] [, eventProc] [, previewProc] [, filterProc] [, wanted] ) @@ -150,9 +148,6 @@ Both determinate (thermometer style) and indeterminate (barber-pole style) progress bars are supported. The bar will be determinate if its maximum value is greater than zero; otherwise it will be indeterminate. -.. versionchanged:: 2.2 - Support for indeterminate-style progress bars was added. - The dialog is displayed immediately after creation. If the dialog's "Cancel" button is pressed, or if :kbd:`Cmd-.` or :kbd:`ESC` is typed, the dialog window is hidden and :exc:`KeyboardInterrupt` is raised (but note that this response diff --git a/Doc/library/email.charset.rst b/Doc/library/email.charset.rst index d16d281..a943fc2 100644 --- a/Doc/library/email.charset.rst +++ b/Doc/library/email.charset.rst @@ -13,8 +13,6 @@ Instances of :class:`Charset` are used in several other modules within the Import this class from the :mod:`email.charset` module. -.. versionadded:: 2.2.2 - .. class:: Charset([input_charset]) diff --git a/Doc/library/email.errors.rst b/Doc/library/email.errors.rst index 916d2a5..c68262f 100644 --- a/Doc/library/email.errors.rst +++ b/Doc/library/email.errors.rst @@ -66,9 +66,6 @@ object would have a defect, but the containing messages would not. All defect classes are subclassed from :class:`email.errors.MessageDefect`, but this class is *not* an exception! -.. versionadded:: 2.4 - All the defect classes were added. - * :class:`NoBoundaryInMultipartDefect` -- A message claimed to be a multipart, but had no :mimetype:`boundary` parameter. diff --git a/Doc/library/email.generator.rst b/Doc/library/email.generator.rst index bb1f57d..c12dc2f 100644 --- a/Doc/library/email.generator.rst +++ b/Doc/library/email.generator.rst @@ -61,16 +61,12 @@ The other public :class:`Generator` methods are: Note that for subparts, no envelope header is ever printed. - .. versionadded:: 2.2.2 - .. method:: Generator.clone(fp) Return an independent clone of this :class:`Generator` instance with the exact same options. - .. versionadded:: 2.2.2 - .. method:: Generator.write(s) @@ -115,9 +111,3 @@ representing the part. The default value for *fmt* is ``None``, meaning :: [Non-text (%(type)s) part of message omitted, filename %(filename)s] - - .. versionadded:: 2.2.2 - -.. versionchanged:: 2.5 - The previously deprecated method :meth:`__call__` was removed. - diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst index 0ecd35f..fb2496a 100644 --- a/Doc/library/email.header.rst +++ b/Doc/library/email.header.rst @@ -43,8 +43,6 @@ the character set that the byte string was encoded in. When the subsequent properly :rfc:`2047` encoded. MIME-aware mail readers would show this header using the embedded ISO-8859-1 character. -.. versionadded:: 2.2.2 - Here is the :class:`Header` class description: diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst index e1fb20e..871a5f8 100644 --- a/Doc/library/email.message.rst +++ b/Doc/library/email.message.rst @@ -116,9 +116,6 @@ Here are the methods of the :class:`Message` class: responsibility to ensure the payload invariants. Optional *charset* sets the message's default character set; see :meth:`set_charset` for details. - .. versionchanged:: 2.2.2 - *charset* argument added. - .. method:: Message.set_charset(charset) @@ -136,15 +133,11 @@ Here are the methods of the :class:`Message` class: :mailheader:`Content-Type`, :mailheader:`Content-Transfer-Encoding`) will be added as needed. - .. versionadded:: 2.2.2 - .. method:: Message.get_charset() Return the :class:`Charset` instance associated with the message's payload. - .. versionadded:: 2.2.2 - The following methods implement a mapping-like interface for accessing the message's :rfc:`2822` headers. Note that there are some semantic differences between these methods and a normal mapping (i.e. dictionary) interface. For @@ -270,8 +263,6 @@ Here are some additional useful methods: *_name*, retaining header order and field name case. If no matching header was found, a :exc:`KeyError` is raised. - .. versionadded:: 2.2.2 - .. method:: Message.get_content_type() @@ -288,24 +279,18 @@ Here are some additional useful methods: has an invalid type specification, :rfc:`2045` mandates that the default type be :mimetype:`text/plain`. - .. versionadded:: 2.2.2 - .. method:: Message.get_content_maintype() Return the message's main content type. This is the :mimetype:`maintype` part of the string returned by :meth:`get_content_type`. - .. versionadded:: 2.2.2 - .. method:: Message.get_content_subtype() Return the message's sub-content type. This is the :mimetype:`subtype` part of the string returned by :meth:`get_content_type`. - .. versionadded:: 2.2.2 - .. method:: Message.get_default_type() @@ -314,8 +299,6 @@ Here are some additional useful methods: :mimetype:`multipart/digest` containers. Such subparts have a default content type of :mimetype:`message/rfc822`. - .. versionadded:: 2.2.2 - .. method:: Message.set_default_type(ctype) @@ -323,8 +306,6 @@ Here are some additional useful methods: or :mimetype:`message/rfc822`, although this is not enforced. The default content type is not stored in the :mailheader:`Content-Type` header. - .. versionadded:: 2.2.2 - .. method:: Message.get_params([failobj[, header[, unquote]]]) @@ -339,9 +320,6 @@ Here are some additional useful methods: :mailheader:`Content-Type` header. Optional *header* is the header to search instead of :mailheader:`Content-Type`. - .. versionchanged:: 2.2.2 - *unquote* argument added. - .. method:: Message.get_param(param[, failobj[, header[, unquote]]]) @@ -371,9 +349,6 @@ Here are some additional useful methods: In any case, the parameter value (either the returned string, or the ``VALUE`` item in the 3-tuple) is always unquoted, unless *unquote* is set to ``False``. - .. versionchanged:: 2.2.2 - *unquote* argument added, and 3-tuple return value possible. - .. method:: Message.set_param(param, value[, header[, requote[, charset[, language]]]]) @@ -391,8 +366,6 @@ Here are some additional useful methods: :rfc:`2231`. Optional *language* specifies the RFC 2231 language, defaulting to the empty string. Both *charset* and *language* should be strings. - .. versionadded:: 2.2.2 - .. method:: Message.del_param(param[, header[, requote]]) @@ -402,8 +375,6 @@ Here are some additional useful methods: (the default is ``True``). Optional *header* specifies an alternative to :mailheader:`Content-Type`. - .. versionadded:: 2.2.2 - .. method:: Message.set_type(type[, header][, requote]) @@ -419,8 +390,6 @@ Here are some additional useful methods: :mailheader:`Content-Type` header is set a :mailheader:`MIME-Version` header is also added. - .. versionadded:: 2.2.2 - .. method:: Message.get_filename([failobj]) @@ -464,8 +433,6 @@ Here are some additional useful methods: Note that this method differs from :meth:`get_charset` which returns the :class:`Charset` instance for the default encoding of the message body. - .. versionadded:: 2.2.2 - .. method:: Message.get_charsets([failobj]) @@ -499,10 +466,6 @@ Here are some additional useful methods: text/plain message/rfc822 -.. versionchanged:: 2.5 - The previously deprecated methods :meth:`get_type`, :meth:`get_main_type`, and - :meth:`get_subtype` were removed. - :class:`Message` objects can also optionally contain two instance attributes, which can be used when generating the plain text of a MIME message. @@ -533,9 +496,8 @@ which can be used when generating the plain text of a MIME message. that it contains text that appears between the last boundary and the end of the message. - .. versionchanged:: 2.5 - You do not need to set the epilogue to the empty string in order for the - :class:`Generator` to print a newline at the end of the file. + You do not need to set the epilogue to the empty string in order for the + :class:`Generator` to print a newline at the end of the file. .. data:: defects @@ -543,6 +505,3 @@ which can be used when generating the plain text of a MIME message. The *defects* attribute contains a list of all the problems found when parsing this message. See :mod:`email.errors` for a detailed description of the possible parsing defects. - - .. versionadded:: 2.4 - diff --git a/Doc/library/email.mime.rst b/Doc/library/email.mime.rst index 6f1b0ae..13bd100 100644 --- a/Doc/library/email.mime.rst +++ b/Doc/library/email.mime.rst @@ -49,8 +49,6 @@ Here are the classes: :mimetype:`multipart` messages. If :meth:`attach` is called, a :exc:`MultipartConversionError` exception is raised. - .. versionadded:: 2.2.2 - .. class:: MIMEMultipart([subtype[, boundary[, _subparts[, _params]]]]) @@ -74,8 +72,6 @@ Here are the classes: the keyword arguments, or passed into the *_params* argument, which is a keyword dictionary. - .. versionadded:: 2.2.2 - .. class:: MIMEApplication(_data[, _subtype[, _encoder[, **_params]]]) @@ -96,8 +92,6 @@ Here are the classes: *_params* are passed straight through to the base class constructor. - .. versionadded:: 2.5 - .. class:: MIMEAudio(_audiodata[, _subtype[, _encoder[, **_params]]]) @@ -169,7 +163,3 @@ Here are the classes: :class:`MIMENonMultipart` constructor; it defaults to ``us-ascii``. No guessing or encoding is performed on the text data. - .. versionchanged:: 2.4 - The previously deprecated *_encoding* argument has been removed. Encoding - happens implicitly based on the *_charset* argument. - diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst index 048ed22..6d623a7 100644 --- a/Doc/library/email.parser.rst +++ b/Doc/library/email.parser.rst @@ -38,8 +38,6 @@ any way it finds necessary. FeedParser API ^^^^^^^^^^^^^^ -.. versionadded:: 2.4 - The :class:`FeedParser`, imported from the :mod:`email.feedparser` module, provides an API that is conducive to incremental parsing of email messages, such as would be necessary when reading the text of an email message from a source @@ -113,12 +111,6 @@ class. effectively non-strict. You should simply stop passing a *strict* flag to the :class:`Parser` constructor. - .. versionchanged:: 2.2.2 - The *strict* flag was added. - - .. versionchanged:: 2.4 - The *strict* flag was deprecated. - The other public :class:`Parser` methods are: @@ -136,9 +128,6 @@ The other public :class:`Parser` methods are: Optional *headersonly* is as with the :meth:`parse` method. - .. versionchanged:: 2.2.2 - The *headersonly* flag was added. - .. method:: Parser.parsestr(text[, headersonly]) @@ -150,8 +139,6 @@ The other public :class:`Parser` methods are: reading the headers or not. The default is ``False``, meaning it parses the entire contents of the file. - .. versionchanged:: 2.2.2 - The *headersonly* flag was added. Since creating a message object structure from a string or a file object is such a common task, two functions are provided as a convenience. They are available @@ -164,9 +151,6 @@ in the top-level :mod:`email` package namespace. ``Parser().parsestr(s)``. Optional *_class* and *strict* are interpreted as with the :class:`Parser` class constructor. - .. versionchanged:: 2.2.2 - The *strict* flag was added. - .. function:: message_from_file(fp[, _class[, strict]]) @@ -174,9 +158,6 @@ in the top-level :mod:`email` package namespace. exactly equivalent to ``Parser().parse(fp)``. Optional *_class* and *strict* are interpreted as with the :class:`Parser` class constructor. - .. versionchanged:: 2.2.2 - The *strict* flag was added. - Here's an example of how you might use this at an interactive Python prompt:: >>> import email diff --git a/Doc/library/email.rst b/Doc/library/email.rst index 212c321..df41563 100644 --- a/Doc/library/email.rst +++ b/Doc/library/email.rst @@ -12,8 +12,6 @@ .. sectionauthor:: Barry A. Warsaw <barry@python.org> -.. versionadded:: 2.2 - The :mod:`email` package is a library for managing email messages, including MIME and other :rfc:`2822`\ -based message documents. It subsumes most of the functionality in several older standard modules such as :mod:`rfc822`, diff --git a/Doc/library/email.util.rst b/Doc/library/email.util.rst index aa67885..2396fb7 100644 --- a/Doc/library/email.util.rst +++ b/Doc/library/email.util.rst @@ -104,8 +104,6 @@ There are several useful utilities provided in the :mod:`email.utils` module: needed for some protocols (such as HTTP). This only applies when *localtime* is ``False``. - .. versionadded:: 2.4 - .. function:: make_msgid([idstring]) @@ -146,17 +144,6 @@ There are several useful utilities provided in the :mod:`email.utils` module: Decode parameters list according to :rfc:`2231`. *params* is a sequence of 2-tuples containing elements of the form ``(content-type, string-value)``. -.. versionchanged:: 2.4 - The :func:`dump_address_pair` function has been removed; use :func:`formataddr` - instead. - -.. versionchanged:: 2.4 - The :func:`decode` function has been removed; use the - :meth:`Header.decode_header` method instead. - -.. versionchanged:: 2.4 - The :func:`encode` function has been removed; use the :meth:`Header.encode` - method instead. .. rubric:: Footnotes diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 808e26a..989eb9d 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -56,17 +56,12 @@ The following exceptions are only used as base classes for other exceptions. string when there were no arguments. All arguments are stored in :attr:`args` as a tuple. - .. versionadded:: 2.5 - .. exception:: Exception All built-in, non-system-exiting exceptions are derived from this class. All user-defined exceptions should also be derived from this class. - .. versionchanged:: 2.5 - Changed to inherit from :exc:`BaseException`. - .. exception:: ArithmeticError @@ -91,8 +86,6 @@ The following exceptions are only used as base classes for other exceptions. :attr:`strerror` attribute (it is usually the associated error message). The tuple itself is also available on the :attr:`args` attribute. - .. versionadded:: 1.5.2 - When an :exc:`EnvironmentError` exception is instantiated with a 3-tuple, the first two items are available as above, while the third item is available on the :attr:`filename` attribute. However, for backwards compatibility, the @@ -143,11 +136,6 @@ The following exceptions are the exceptions that are actually raised. Raise when a generator's :meth:`close` method is called. - .. versionadded:: 2.5 - - .. versionchanged:: 3.0 - Changed to inherit from Exception instead of StandardError. - .. exception:: IOError @@ -189,9 +177,6 @@ The following exceptions are the exceptions that are actually raised. accidentally caught by code that catches :exc:`Exception` and thus prevent the interpreter from exiting. - .. versionchanged:: 2.5 - Changed to inherit from :exc:`BaseException`. - .. exception:: MemoryError @@ -217,8 +202,6 @@ The following exceptions are the exceptions that are actually raised. classes, abstract methods should raise this exception when they require derived classes to override the method. - .. versionadded:: 1.5.2 - .. exception:: OSError @@ -226,10 +209,6 @@ The following exceptions are the exceptions that are actually raised. :mod:`os` module's ``os.error`` exception. See :exc:`EnvironmentError` above for a description of the possible associated values. - .. % xref for os module - - .. versionadded:: 1.5.2 - .. exception:: OverflowError @@ -247,9 +226,6 @@ The following exceptions are the exceptions that are actually raised. after it has been garbage collected. For more information on weak references, see the :mod:`weakref` module. - .. versionadded:: 2.2 - Previously known as the :exc:`weakref.ReferenceError` exception. - .. exception:: RuntimeError @@ -264,11 +240,6 @@ The following exceptions are the exceptions that are actually raised. Raised by builtin :func:`next` and an iterator's :meth:`__next__` method to signal that there are no further values. - .. versionadded:: 2.2 - - .. versionchanged:: 3.0 - Changed to inherit from Exception instead of StandardError. - .. exception:: SyntaxError @@ -320,9 +291,6 @@ The following exceptions are the exceptions that are actually raised. that it is not accidentally caught by code that catches :exc:`Exception`. This allows the exception to properly propagate up and cause the interpreter to exit. - .. versionchanged:: 2.5 - Changed to inherit from :exc:`BaseException`. - .. exception:: TypeError @@ -336,40 +304,30 @@ The following exceptions are the exceptions that are actually raised. no value has been bound to that variable. This is a subclass of :exc:`NameError`. - .. versionadded:: 2.0 - .. exception:: UnicodeError Raised when a Unicode-related encoding or decoding error occurs. It is a subclass of :exc:`ValueError`. - .. versionadded:: 2.0 - .. exception:: UnicodeEncodeError Raised when a Unicode-related error occurs during encoding. It is a subclass of :exc:`UnicodeError`. - .. versionadded:: 2.3 - .. exception:: UnicodeDecodeError Raised when a Unicode-related error occurs during decoding. It is a subclass of :exc:`UnicodeError`. - .. versionadded:: 2.3 - .. exception:: UnicodeTranslateError Raised when a Unicode-related error occurs during translating. It is a subclass of :exc:`UnicodeError`. - .. versionadded:: 2.3 - .. exception:: ValueError @@ -387,11 +345,6 @@ The following exceptions are the exceptions that are actually raised. Platform API. The :attr:`errno` value maps the :attr:`winerror` value to corresponding ``errno.h`` values. This is a subclass of :exc:`OSError`. - .. versionadded:: 2.0 - - .. versionchanged:: 2.5 - Previous versions put the :cfunc:`GetLastError` codes into :attr:`errno`. - .. exception:: ZeroDivisionError @@ -443,15 +396,11 @@ module for more information. Base class for warnings about probable mistakes in module imports. - .. versionadded:: 2.5 - .. exception:: UnicodeWarning Base class for warnings related to Unicode. - .. versionadded:: 2.5 - The class hierarchy for built-in exceptions is: diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index d45def1..ba7e980 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -53,8 +53,6 @@ The following function is the primary interface of this module: during iteration. The parameters to this function will be passed along to the constructor of the :class:`FileInput` class. - .. versionchanged:: 2.5 - Added the *mode* and *openhook* parameters. The following functions use the global state created by :func:`fileinput.input`; if there is no active state, :exc:`RuntimeError` is raised. @@ -71,8 +69,6 @@ if there is no active state, :exc:`RuntimeError` is raised. Return the integer "file descriptor" for the current file. When no file is opened (before the first line and between files), returns ``-1``. - .. versionadded:: 2.5 - .. function:: lineno() @@ -135,8 +131,6 @@ available for subclassing as well: *filename* and *mode*, and returns an accordingly opened file-like object. You cannot use *inplace* and *openhook* together. - .. versionchanged:: 2.5 - Added the *mode* and *openhook* parameters. **Optional in-place filtering:** if the keyword argument ``inplace=1`` is passed to :func:`fileinput.input` or to the :class:`FileInput` constructor, the file is @@ -165,8 +159,6 @@ The two following opening hooks are provided by this module: Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed)`` - .. versionadded:: 2.5 - .. function:: hook_encoded(encoding) @@ -181,5 +173,3 @@ The two following opening hooks are provided by this module: With this hook, :class:`FileInput` might return Unicode strings depending on the specified *encoding*. - .. versionadded:: 2.5 - diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst index 244bad9..6ce5a1c 100644 --- a/Doc/library/fnmatch.rst +++ b/Doc/library/fnmatch.rst @@ -65,8 +65,6 @@ patterns. Return the subset of the list of *names* that match *pattern*. It is the same as ``[n for n in names if fnmatch(n, pattern)]``, but implemented more efficiently. - .. versionadded:: 2.2 - .. function:: translate(pattern) diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index 60e88cf..2c06ac7 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -46,9 +46,6 @@ The module defines the following items: specifies a timeout in seconds for the connection attempt (if is not specified, or passed as None, the global default timeout setting will be used). - .. versionchanged:: 2.6 - *timeout* was added. - .. data:: all_errors @@ -128,9 +125,6 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. is used (the timeout that you passed when instantiating the class); if the object timeout is also None, the global default timeout setting will be used. - .. versionchanged:: 2.6 - *timeout* was added. - .. method:: FTP.getwelcome() @@ -203,9 +197,6 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. read until EOF using its :meth:`read` method in blocks of size *blocksize* to provide the data to be stored. The *blocksize* argument defaults to 8192. - .. versionchanged:: 2.1 - default for *blocksize* added. - .. method:: FTP.storlines(command, file) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 7390fd4..ff16536 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -12,8 +12,6 @@ available. They are listed here in alphabetical order. .. index:: statement: import - module: ihooks - module: rexec module: imp .. note:: @@ -23,9 +21,9 @@ available. They are listed here in alphabetical order. The function is invoked by the :keyword:`import` statement. It mainly exists so that you can replace it with another function that has a compatible - interface, in order to change the semantics of the :keyword:`import` statement. - For examples of why and how you would do this, see the standard library modules - :mod:`ihooks` and :mod:`rexec`. See also the built-in module :mod:`imp`, which + interface, in order to change the semantics of the :keyword:`import` + statement. For examples of why and how you would do this, see the standard + library module :mod:`ihooks`. See also the built-in module :mod:`imp`, which defines some useful operations out of which you can build your own :func:`__import__` function. @@ -64,12 +62,6 @@ available. They are listed here in alphabetical order. the number of parent directories to search relative to the directory of the module calling :func:`__import__`. - .. versionchanged:: 2.5 - The level parameter was added. - - .. versionchanged:: 2.5 - Keyword support for parameters was added. - .. function:: abs(x) @@ -88,8 +80,6 @@ available. They are listed here in alphabetical order. return False return True - .. versionadded:: 2.5 - .. function:: any(iterable) @@ -101,8 +91,6 @@ available. They are listed here in alphabetical order. return True return False - .. versionadded:: 2.5 - .. function:: basestring() @@ -111,8 +99,6 @@ available. They are listed here in alphabetical order. is an instance of :class:`str` (or a user-defined type inherited from :class:`basestring`). - .. versionadded:: 2.3 - .. function:: bin(x) @@ -120,8 +106,6 @@ available. They are listed here in alphabetical order. expression. If *x* is not a Python :class:`int` object, it has to define an :meth:`__index__` method that returns an integer. - .. versionadded:: 3.0 - .. function:: bool([x]) @@ -133,11 +117,6 @@ available. They are listed here in alphabetical order. .. index:: pair: Boolean; type - .. versionadded:: 2.2.1 - - .. versionchanged:: 2.3 - If no argument is given, this function returns :const:`False`. - .. function:: bytes([arg[, encoding[, errors]]]) @@ -199,11 +178,6 @@ available. They are listed here in alphabetical order. For more information on class methods, consult the documentation on the standard type hierarchy in :ref:`types`. - .. versionadded:: 2.2 - - .. versionchanged:: 2.4 - Function decorator syntax added. - .. function:: cmp(x, y) @@ -340,9 +314,6 @@ available. They are listed here in alphabetical order. *a*, if ``a % b`` is non-zero it has the same sign as *b*, and ``0 <= abs(a % b) < abs(b)``. - .. versionchanged:: 2.3 - Using :func:`divmod` with complex numbers is deprecated. - .. function:: enumerate(iterable) @@ -360,8 +331,6 @@ available. They are listed here in alphabetical order. 2 Fall 3 Winter - .. versionadded:: 2.3 - .. function:: eval(expression[, globals[, locals]]) @@ -369,9 +338,6 @@ available. They are listed here in alphabetical order. *globals* must be a dictionary. If provided, *locals* can be any mapping object. - .. versionchanged:: 2.4 - formerly *locals* was required to be a dictionary. - The *expression* argument is parsed and evaluated as a Python expression (technically speaking, a condition list) using the *globals* and *locals* dictionaries as global and local name space. If the *globals* dictionary is @@ -499,8 +465,6 @@ available. They are listed here in alphabetical order. For other containers see the built in :class:`dict`, :class:`list`, and :class:`tuple` classes, and the :mod:`collections` module. - .. versionadded:: 2.4 - .. function:: getattr(object, name[, default]) @@ -543,8 +507,6 @@ available. They are listed here in alphabetical order. topic, and a help page is printed on the console. If the argument is any other kind of object, a help page on the object is generated. - .. versionadded:: 2.2 - .. function:: hex(x) @@ -552,9 +514,6 @@ available. They are listed here in alphabetical order. expression. If *x* is not a Python :class:`int` object, it has to define an :meth:`__index__` method that returns an integer. - .. versionchanged:: 2.4 - Formerly only returned an unsigned literal. - .. function:: id(object) @@ -590,9 +549,6 @@ available. They are listed here in alphabetical order. accepted). If *classinfo* is not a type or tuple of types and such tuples, a :exc:`TypeError` exception is raised. - .. versionchanged:: 2.2 - Support for a tuple of type information was added. - .. function:: issubclass(class, classinfo) @@ -601,9 +557,6 @@ available. They are listed here in alphabetical order. objects, in which case every entry in *classinfo* will be checked. In any other case, a :exc:`TypeError` exception is raised. - .. versionchanged:: 2.3 - Support for a tuple of type information was added. - .. function:: iter(o[, sentinel]) @@ -618,8 +571,6 @@ available. They are listed here in alphabetical order. its :meth:`__next__` method; if the value returned is equal to *sentinel*, :exc:`StopIteration` will be raised, otherwise the value will be returned. - .. versionadded:: 2.2 - .. function:: len(s) @@ -668,18 +619,14 @@ available. They are listed here in alphabetical order. the result is always a list. -.. function:: max(iterable[, args...][key]) +.. function:: max(iterable[, args...], *[, key]) With a single argument *iterable*, return the largest item of a non-empty iterable (such as a string, tuple or list). With more than one argument, return the largest of the arguments. - The optional *key* argument specifies a one-argument ordering function like that - used for :meth:`list.sort`. The *key* argument, if supplied, must be in keyword - form (for example, ``max(a,b,c,key=func)``). - - .. versionchanged:: 2.5 - Added support for the optional *key* argument. + The optional keyword-only *key* argument specifies a one-argument ordering + function like that used for :meth:`list.sort`. .. function:: memoryview(obj) @@ -689,18 +636,14 @@ available. They are listed here in alphabetical order. XXX: To be documented. -.. function:: min(iterable[, args...][key]) +.. function:: min(iterable[, args...], *[, key]) With a single argument *iterable*, return the smallest item of a non-empty iterable (such as a string, tuple or list). With more than one argument, return the smallest of the arguments. - The optional *key* argument specifies a one-argument ordering function like that - used for :meth:`list.sort`. The *key* argument, if supplied, must be in keyword - form (for example, ``min(a,b,c,key=func)``). - - .. versionchanged:: 2.5 - Added support for the optional *key* argument. + The optional keyword-only *key* argument specifies a one-argument ordering + function like that used for :meth:`list.sort`. .. function:: next(iterator[, default]) @@ -713,19 +656,14 @@ available. They are listed here in alphabetical order. .. function:: object() Return a new featureless object. :class:`object` is a base for all classes. - It has the methods that are common to all instances of Python classes. + It has the methods that are common to all instances of Python classes. This + function does not accept any arguments. .. note:: :class:`object` does *not* have a :attr:`__dict__`, so you can't assign arbitrary attributes to an instance of the :class:`object` class. - .. versionadded:: 2.2 - - .. versionchanged:: 2.3 - This function does not accept any arguments. Formerly, it accepted arguments but - ignored them. - .. function:: oct(x) @@ -733,9 +671,6 @@ available. They are listed here in alphabetical order. expression. If *x* is not a Python :class:`int` object, it has to define an :meth:`__index__` method that returns an integer. - .. versionchanged:: 2.4 - Formerly only returned an unsigned literal. - .. function:: open(filename[, mode[, bufsize]]) @@ -792,9 +727,6 @@ available. They are listed here in alphabetical order. See also the :mod:`fileinput` module. - .. versionchanged:: 2.5 - Restriction on first letter of mode string introduced. - .. function:: ord(c) @@ -860,11 +792,6 @@ available. They are listed here in alphabetical order. turns the :meth:`voltage` method into a "getter" for a read-only attribute with the same name. - .. versionadded:: 2.2 - - .. versionchanged:: 2.5 - Use *fget*'s docstring if no *doc* given. - .. function:: range([start,] stop[, step]) @@ -909,8 +836,6 @@ available. They are listed here in alphabetical order. protocol (the :meth:`__len__` method and the :meth:`__getitem__` method with integer arguments starting at ``0``). - .. versionadded:: 2.4 - .. function:: round(x[, n]) @@ -930,8 +855,6 @@ available. They are listed here in alphabetical order. For other containers see the built in :class:`dict`, :class:`list`, and :class:`tuple` classes, and the :mod:`collections` module. - .. versionadded:: 2.4 - .. function:: setattr(object, name, value) @@ -980,8 +903,6 @@ available. They are listed here in alphabetical order. multiple times for each list element while *key* and *reverse* touch each element only once. - .. versionadded:: 2.4 - .. function:: staticmethod(function) @@ -1006,11 +927,6 @@ available. They are listed here in alphabetical order. For more information on static methods, consult the documentation on the standard type hierarchy in :ref:`types`. - .. versionadded:: 2.2 - - .. versionchanged:: 2.4 - Function decorator syntax added. - .. function:: str([object[, encoding[, errors]]]) @@ -1051,8 +967,6 @@ available. They are listed here in alphabetical order. and are not allowed to be strings. The fast, correct way to concatenate a sequence of strings is by calling ``''.join(sequence)``. - .. versionadded:: 2.3 - .. function:: super(type[, object-or-type]) @@ -1074,8 +988,6 @@ available. They are listed here in alphabetical order. Accordingly, :func:`super` is undefined for implicit lookups using statements or operators such as ``super(C, self)[name]``. - .. versionadded:: 2.2 - .. function:: tuple([iterable]) @@ -1121,8 +1033,6 @@ available. They are listed here in alphabetical order. ... >>> X = type('X', (object,), dict(a=1)) - .. versionadded:: 2.2 - .. function:: vars([object]) @@ -1143,11 +1053,6 @@ available. They are listed here in alphabetical order. sequence argument, it returns a list of 1-tuples. With no arguments, it returns an empty list. - .. versionadded:: 2.0 - - .. versionchanged:: 2.4 - Formerly, :func:`zip` required at least one argument and ``zip()`` raised a - :exc:`TypeError` instead of returning an empty list. .. % --------------------------------------------------------------------------- diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 01e1fcb..a25fde9 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -9,8 +9,6 @@ .. sectionauthor:: Peter Harris <scav@blueyonder.co.uk> -.. versionadded:: 2.5 - The :mod:`functools` module is for higher-order functions: functions that act on or return other functions. In general, any callable object can be treated as a function for the purposes of this module. @@ -23,8 +21,6 @@ The :mod:`functools` module defines the following functions: This is the same function as :func:`reduce`. It is made available in this module to allow writing code more forward-compatible with Python 3. - .. versionadded:: 2.6 - .. function:: partial(func[,*args][, **keywords]) diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 70e4a6b..4a4dfde 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -44,9 +44,6 @@ The :mod:`gc` module provides the following functions: :exc:`ValueError` is raised if the generation number is invalid. The number of unreachable objects found is returned. - .. versionchanged:: 2.5 - The optional *generation* argument was added. - .. function:: set_debug(flags) @@ -65,8 +62,6 @@ The :mod:`gc` module provides the following functions: Returns a list of all objects tracked by the collector, excluding the list returned. - .. versionadded:: 2.2 - .. function:: set_threshold(threshold0[, threshold1[, threshold2]]) @@ -93,8 +88,6 @@ The :mod:`gc` module provides the following functions: Return the current collection counts as a tuple of ``(count0, count1, count2)``. - .. versionadded:: 2.5 - .. function:: get_threshold() @@ -119,8 +112,6 @@ The :mod:`gc` module provides the following functions: invalid state. Avoid using :func:`get_referrers` for any purpose other than debugging. - .. versionadded:: 2.2 - .. function:: get_referents(*objs) @@ -132,12 +123,10 @@ The :mod:`gc` module provides the following functions: be involved in a cycle. So, for example, if an integer is directly reachable from an argument, that integer object may or may not appear in the result list. - .. versionadded:: 2.3 The following variable is provided for read-only access (you can mutate its value but should not rebind it): - .. data:: garbage A list of objects which the collector found to be unreachable but could not be diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst index 53a3d2b..7ead8ea 100644 --- a/Doc/library/getopt.rst +++ b/Doc/library/getopt.rst @@ -61,8 +61,6 @@ exception: variable POSIXLY_CORRECT is set, then option processing stops as soon as a non-option argument is encountered. - .. versionadded:: 2.3 - .. exception:: GetoptError @@ -74,10 +72,7 @@ exception: related option; if there is no specific option to which the exception relates, :attr:`opt` is an empty string. - .. versionchanged:: 1.6 - Introduced :exc:`GetoptError` as a synonym for :exc:`error`. - - +.. XXX deprecated? .. exception:: error Alias for :exc:`GetoptError`; for backward compatibility. diff --git a/Doc/library/getpass.rst b/Doc/library/getpass.rst index 45c6e53..9a45b28 100644 --- a/Doc/library/getpass.rst +++ b/Doc/library/getpass.rst @@ -22,9 +22,6 @@ The :mod:`getpass` module provides two functions: Availability: Macintosh, Unix, Windows. - .. versionchanged:: 2.5 - The *stream* parameter was added. - .. function:: getuser() diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst index 51628e6..af82f96 100644 --- a/Doc/library/gettext.rst +++ b/Doc/library/gettext.rst @@ -49,8 +49,6 @@ class-based API instead. :func:`gettext` family of functions. If *codeset* is omitted, then the current binding is returned. - .. versionadded:: 2.4 - .. function:: textdomain([domain]) @@ -72,8 +70,6 @@ class-based API instead. system encoding, if no other encoding was explicitly set with :func:`bind_textdomain_codeset`. - .. versionadded:: 2.4 - .. function:: dgettext(domain, message) @@ -86,8 +82,6 @@ class-based API instead. system encoding, if no other encoding was explicitly set with :func:`bind_textdomain_codeset`. - .. versionadded:: 2.4 - .. function:: ngettext(singular, plural, n) @@ -102,8 +96,6 @@ class-based API instead. syntax to be used in :file:`.po` files and the formulas for a variety of languages. - .. versionadded:: 2.3 - .. function:: lngettext(singular, plural, n) @@ -111,15 +103,11 @@ class-based API instead. system encoding, if no other encoding was explicitly set with :func:`bind_textdomain_codeset`. - .. versionadded:: 2.4 - .. function:: dngettext(domain, singular, plural, n) Like :func:`ngettext`, but look the message up in the specified *domain*. - .. versionadded:: 2.3 - .. function:: ldngettext(domain, singular, plural, n) @@ -127,7 +115,6 @@ class-based API instead. preferred system encoding, if no other encoding was explicitly set with :func:`bind_textdomain_codeset`. - .. versionadded:: 2.4 Note that GNU :program:`gettext` also defines a :func:`dcgettext` method, but this was deemed not useful and so it is currently unimplemented. @@ -199,9 +186,6 @@ the built-in namespace as the function :func:`_`. *fallback* is false (which is the default), and returns a :class:`NullTranslations` instance if *fallback* is true. - .. versionchanged:: 2.4 - Added the *codeset* parameter. - .. function:: install(domain[, localedir[, unicode [, codeset[, names]]]]) @@ -223,12 +207,6 @@ the built-in namespace as the function :func:`_`. builtin namespace, so it is easily accessible in all modules of your application. - .. versionchanged:: 2.4 - Added the *codeset* parameter. - - .. versionchanged:: 2.5 - Added the *names* parameter. - The :class:`NullTranslations` class ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -275,8 +253,6 @@ are the methods of :class:`NullTranslations`: If a fallback has been set, forward :meth:`lgettext` to the fallback. Otherwise, return the translated message. Overridden in derived classes. - .. versionadded:: 2.4 - .. method:: NullTranslations.ugettext(message) @@ -290,16 +266,12 @@ are the methods of :class:`NullTranslations`: If a fallback has been set, forward :meth:`ngettext` to the fallback. Otherwise, return the translated message. Overridden in derived classes. - .. versionadded:: 2.3 - .. method:: NullTranslations.lngettext(singular, plural, n) If a fallback has been set, forward :meth:`ngettext` to the fallback. Otherwise, return the translated message. Overridden in derived classes. - .. versionadded:: 2.4 - .. method:: NullTranslations.ungettext(singular, plural, n) @@ -307,8 +279,6 @@ are the methods of :class:`NullTranslations`: Otherwise, return the translated message as a Unicode string. Overridden in derived classes. - .. versionadded:: 2.3 - .. method:: NullTranslations.info() @@ -325,16 +295,12 @@ are the methods of :class:`NullTranslations`: Return the "protected" :attr:`_output_charset` variable, which defines the encoding used to return translated messages. - .. versionadded:: 2.4 - .. method:: NullTranslations.set_output_charset(charset) Change the "protected" :attr:`_output_charset` variable, which defines the encoding used to return translated messages. - .. versionadded:: 2.4 - .. method:: NullTranslations.install([unicode [, names]]) @@ -362,9 +328,6 @@ are the methods of :class:`NullTranslations`: This puts :func:`_` only in the module's global namespace and so only affects calls within this module. - .. versionchanged:: 2.5 - Added the *names* parameter. - The :class:`GNUTranslations` class ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -415,8 +378,6 @@ The following methods are overridden from the base class implementation: system encoding, if no other encoding was explicitly set with :meth:`set_output_charset`. - .. versionadded:: 2.4 - .. method:: GNUTranslations.ugettext(message) @@ -437,8 +398,6 @@ The following methods are overridden from the base class implementation: request is forwarded to the fallback's :meth:`ngettext` method. Otherwise, when *n* is 1 *singular* is returned, and *plural* is returned in all other cases. - .. versionadded:: 2.3 - .. method:: GNUTranslations.lngettext(singular, plural, n) @@ -446,8 +405,6 @@ The following methods are overridden from the base class implementation: system encoding, if no other encoding was explicitly set with :meth:`set_output_charset`. - .. versionadded:: 2.4 - .. method:: GNUTranslations.ungettext(singular, plural, n) @@ -469,8 +426,6 @@ The following methods are overridden from the base class implementation: 'There are %(num)d files in this directory', n) % {'num': n} - .. versionadded:: 2.3 - Solaris message catalog support ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst index 80bdac2..f4a7295 100644 --- a/Doc/library/glob.rst +++ b/Doc/library/glob.rst @@ -31,7 +31,6 @@ subshell. (For tilde and shell variable expansion, use Return an iterator which yields the same values as :func:`glob` without actually storing them all simultaneously. - .. versionadded:: 2.5 For example, consider a directory containing only the following files: :file:`1.gif`, :file:`2.txt`, and :file:`card.gif`. :func:`glob` will produce diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index f255554..d487900 100644 --- a/Doc/library/hashlib.rst +++ b/Doc/library/hashlib.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Gregory P. Smith <greg@users.sourceforge.net> -.. versionadded:: 2.5 - .. index:: single: message digest, MD5 single: secure hash algorithm, SHA1, SHA224, SHA256, SHA384, SHA512 diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst index 2d38c26..af10019 100644 --- a/Doc/library/heapq.rst +++ b/Doc/library/heapq.rst @@ -11,8 +11,6 @@ .. % Theoretical explanation: -.. versionadded:: 2.3 - This module provides an implementation of the heap queue algorithm, also known as the priority queue algorithm. @@ -99,8 +97,6 @@ The module also offers three general purpose functions based on heaps. not pull the data into memory all at once, and assumes that each of the input streams is already sorted (smallest to largest). - .. versionadded:: 2.6 - .. function:: nlargest(n, iterable[, key]) @@ -110,11 +106,6 @@ The module also offers three general purpose functions based on heaps. ``key=str.lower`` Equivalent to: ``sorted(iterable, key=key, reverse=True)[:n]`` - .. versionadded:: 2.4 - - .. versionchanged:: 2.5 - Added the optional *key* argument. - .. function:: nsmallest(n, iterable[, key]) @@ -123,10 +114,6 @@ The module also offers three general purpose functions based on heaps. used to extract a comparison key from each element in the iterable: ``key=str.lower`` Equivalent to: ``sorted(iterable, key=key)[:n]`` - .. versionadded:: 2.4 - - .. versionchanged:: 2.5 - Added the optional *key* argument. The latter two functions perform best for smaller values of *n*. For larger values, it is more efficient to use the :func:`sorted` function. Also, when diff --git a/Doc/library/hmac.rst b/Doc/library/hmac.rst index 10d41f7..0abe421 100644 --- a/Doc/library/hmac.rst +++ b/Doc/library/hmac.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Gerhard Häring <ghaering@users.sourceforge.net> -.. versionadded:: 2.2 - This module implements the HMAC algorithm as described by :rfc:`2104`. diff --git a/Doc/library/hotshot.rst b/Doc/library/hotshot.rst index f6b5b13..f10facd 100644 --- a/Doc/library/hotshot.rst +++ b/Doc/library/hotshot.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Anthony Baxter <anthony@interlink.com.au> -.. versionadded:: 2.2 - This module provides a nicer interface to the :mod:`_hotshot` C module. Hotshot is a replacement for the existing :mod:`profile` module. As it's written mostly in C, it should result in a much smaller performance impact than the existing @@ -22,10 +20,6 @@ in C, it should result in a much smaller performance impact than the existing recommended to use :mod:`cProfile` instead. :mod:`hotshot` is not maintained and might be removed from the standard library in the future. -.. versionchanged:: 2.5 - the results should be more meaningful than in the past: the timing core - contained a critical bug. - .. warning:: The :mod:`hotshot` profiler does not yet work well with threads. It is useful to @@ -104,8 +98,6 @@ Using hotshot data :synopsis: Statistical analysis for Hotshot -.. versionadded:: 2.2 - This module loads hotshot profiling data into the standard :mod:`pstats` Stats objects. diff --git a/Doc/library/htmllib.rst b/Doc/library/htmllib.rst index 96a7d08..e1f2447 100644 --- a/Doc/library/htmllib.rst +++ b/Doc/library/htmllib.rst @@ -68,8 +68,6 @@ The module defines a parser class and an exception: Exception raised by the :class:`HTMLParser` class when it encounters an error while parsing. - .. versionadded:: 2.4 - .. seealso:: @@ -175,12 +173,8 @@ can be handled using simple textual substitution in the Latin-1 character set A dictionary that maps HTML entity names to the Unicode codepoints. - .. versionadded:: 2.3 - .. data:: codepoint2name A dictionary that maps Unicode codepoints to HTML entity names. - .. versionadded:: 2.3 - diff --git a/Doc/library/htmlparser.rst b/Doc/library/htmlparser.rst index 85a38fb..5f481d8 100644 --- a/Doc/library/htmlparser.rst +++ b/Doc/library/htmlparser.rst @@ -6,11 +6,7 @@ :synopsis: A simple parser that can handle HTML and XHTML. -.. versionadded:: 2.2 - -.. index:: - single: HTML - single: XHTML +.. index:: HTML, XHTML This module defines a class :class:`HTMLParser` which serves as the basis for parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML. @@ -91,9 +87,8 @@ An exception is defined as well: HREF="http://www.cwi.nl/">``, this method would be called as ``handle_starttag('a', [('href', 'http://www.cwi.nl/')])``. - .. versionchanged:: 2.6 - All entity references from htmlentitydefs are now replaced in the attribute - values. + All entity references from htmlentitydefs are replaced in the attribute + values. .. method:: HTMLParser.handle_startendtag(tag, attrs) diff --git a/Doc/library/httplib.rst b/Doc/library/httplib.rst index d4f79c5..badffb2 100644 --- a/Doc/library/httplib.rst +++ b/Doc/library/httplib.rst @@ -44,11 +44,6 @@ The module provides the following classes: >>> h3 = httplib.HTTPConnection('www.cwi.nl', 80) >>> h3 = httplib.HTTPConnection('www.cwi.nl', 80, timeout=10) - .. versionadded:: 2.0 - - .. versionchanged:: 2.6 - *timeout* was added. - .. class:: HTTPSConnection(host[, port[, key_file[, cert_file[, strict[, timeout]]]]]) @@ -61,18 +56,12 @@ The module provides the following classes: This does not do any certificate verification! - .. versionadded:: 2.0 - - .. versionchanged:: 2.6 - *timeout* was added. - .. class:: HTTPResponse(sock[, debuglevel=0][, strict=0]) Class whose instances are returned upon successful connection. Not instantiated directly by user. - .. versionadded:: 2.0 The following exceptions are raised as appropriate: @@ -82,87 +71,63 @@ The following exceptions are raised as appropriate: The base class of the other exceptions in this module. It is a subclass of :exc:`Exception`. - .. versionadded:: 2.0 - .. exception:: NotConnected A subclass of :exc:`HTTPException`. - .. versionadded:: 2.0 - .. exception:: InvalidURL A subclass of :exc:`HTTPException`, raised if a port is given and is either non-numeric or empty. - .. versionadded:: 2.3 - .. exception:: UnknownProtocol A subclass of :exc:`HTTPException`. - .. versionadded:: 2.0 - .. exception:: UnknownTransferEncoding A subclass of :exc:`HTTPException`. - .. versionadded:: 2.0 - .. exception:: UnimplementedFileMode A subclass of :exc:`HTTPException`. - .. versionadded:: 2.0 - .. exception:: IncompleteRead A subclass of :exc:`HTTPException`. - .. versionadded:: 2.0 - .. exception:: ImproperConnectionState A subclass of :exc:`HTTPException`. - .. versionadded:: 2.0 - .. exception:: CannotSendRequest A subclass of :exc:`ImproperConnectionState`. - .. versionadded:: 2.0 - .. exception:: CannotSendHeader A subclass of :exc:`ImproperConnectionState`. - .. versionadded:: 2.0 - .. exception:: ResponseNotReady A subclass of :exc:`ImproperConnectionState`. - .. versionadded:: 2.0 - .. exception:: BadStatusLine A subclass of :exc:`HTTPException`. Raised if a server responds with a HTTP status code that we don't understand. - .. versionadded:: 2.0 - The constants defined in this module are: @@ -375,8 +340,6 @@ and also the following constants for integer status codes: Example: ``httplib.responses[httplib.NOT_FOUND]`` is ``'Not Found'``. - .. versionadded:: 2.5 - .. _httpconnection-objects: @@ -396,9 +359,6 @@ HTTPConnection Objects Content-Length is automatically set to the correct value. The *headers* argument should be a mapping of extra HTTP headers to send with the request. - .. versionchanged:: 2.6 - *body* can be a file object. - .. method:: HTTPConnection.getresponse() @@ -439,9 +399,6 @@ also send your request step by step, by using the four functions below. content encodings), specify *skip_host* or *skip_accept_encoding* with non-False values. - .. versionchanged:: 2.4 - *skip_accept_encoding* argument added. - .. method:: HTTPConnection.putheader(header, argument[, ...]) @@ -486,8 +443,6 @@ HTTPResponse Objects Return a list of (header, value) tuples. - .. versionadded:: 2.4 - .. attribute:: HTTPResponse.msg diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst index fc7c230..977df13 100644 --- a/Doc/library/imaplib.rst +++ b/Doc/library/imaplib.rst @@ -82,7 +82,6 @@ The second subclass allows for connections created by a child process: ``stdin/stdout`` file descriptors created by passing *command* to ``os.popen2()``. - .. versionadded:: 2.3 The following utility functions are defined: @@ -207,8 +206,6 @@ An :class:`IMAP4` instance has the following methods: Delete the ACLs (remove any rights) set for who on mailbox. - .. versionadded:: 2.4 - .. method:: IMAP4.expunge() @@ -235,24 +232,18 @@ An :class:`IMAP4` instance has the following methods: Retrieve the specified ``ANNOTATION``\ s for *mailbox*. The method is non-standard, but is supported by the ``Cyrus`` server. - .. versionadded:: 2.5 - .. method:: IMAP4.getquota(root) Get the ``quota`` *root*'s resource usage and limits. This method is part of the IMAP4 QUOTA extension defined in rfc2087. - .. versionadded:: 2.3 - .. method:: IMAP4.getquotaroot(mailbox) Get the list of ``quota`` ``roots`` for the named *mailbox*. This method is part of the IMAP4 QUOTA extension defined in rfc2087. - .. versionadded:: 2.3 - .. method:: IMAP4.list([directory[, pattern]]) @@ -272,8 +263,6 @@ An :class:`IMAP4` instance has the following methods: the password. Will only work if the server ``CAPABILITY`` response includes the phrase ``AUTH=CRAM-MD5``. - .. versionadded:: 2.3 - .. method:: IMAP4.logout() @@ -291,15 +280,11 @@ An :class:`IMAP4` instance has the following methods: Show my ACLs for a mailbox (i.e. the rights that I have on mailbox). - .. versionadded:: 2.4 - .. method:: IMAP4.namespace() Returns IMAP namespaces as defined in RFC2342. - .. versionadded:: 2.3 - .. method:: IMAP4.noop() @@ -324,8 +309,6 @@ An :class:`IMAP4` instance has the following methods: Assume authentication as *user*. Allows an authorised administrator to proxy into any user's mailbox. - .. versionadded:: 2.3 - .. method:: IMAP4.read(size) @@ -393,16 +376,12 @@ An :class:`IMAP4` instance has the following methods: Set ``ANNOTATION``\ s for *mailbox*. The method is non-standard, but is supported by the ``Cyrus`` server. - .. versionadded:: 2.5 - .. method:: IMAP4.setquota(root, limits) Set the ``quota`` *root*'s resource *limits*. This method is part of the IMAP4 QUOTA extension defined in rfc2087. - .. versionadded:: 2.3 - .. method:: IMAP4.shutdown() @@ -476,8 +455,6 @@ An :class:`IMAP4` instance has the following methods: This is an ``IMAP4rev1`` extension command. - .. versionadded:: 2.4 - .. method:: IMAP4.uid(command, arg[, ...]) diff --git a/Doc/library/imghdr.rst b/Doc/library/imghdr.rst index 90a8304..d533a3e 100644 --- a/Doc/library/imghdr.rst +++ b/Doc/library/imghdr.rst @@ -47,9 +47,6 @@ from :func:`what`: | ``'png'`` | Portable Network Graphics | +------------+-----------------------------------+ -.. versionadded:: 2.5 - Exif detection. - You can extend the list of file types :mod:`imghdr` can recognize by appending to this variable: diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst index 7943604..7b8133b 100644 --- a/Doc/library/imp.rst +++ b/Doc/library/imp.rst @@ -116,15 +116,12 @@ This module provides an interface to the mechanisms used to implement the be used by import hooks to ensure thread-safety when importing modules. On platforms without threads, this function does nothing. - .. versionadded:: 2.3 - .. function:: release_lock() Release the interpreter's import lock. On platforms without threads, this function does nothing. - .. versionadded:: 2.3 The following constants with integer values, defined in this module, are used to indicate the search result of :func:`find_module`. @@ -265,8 +262,6 @@ around for backward compatibility: This method always returns ``None``, indicating that the requested module could not be found. - .. versionadded:: 2.5 - .. _examples-imp: diff --git a/Doc/library/imputil.rst b/Doc/library/imputil.rst index 34117fa..92eeda2 100644 --- a/Doc/library/imputil.rst +++ b/Doc/library/imputil.rst @@ -1,6 +1,6 @@ :mod:`imputil` --- Import utilities -===================================================== +=================================== .. module:: imputil :synopsis: Manage and augment the import process. diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index edec9d5..530f1bd 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Ka-Ping Yee <ping@lfw.org> -.. versionadded:: 2.1 - The :mod:`inspect` module provides several useful functions to help get information about live objects such as modules, classes, methods, functions, tracebacks, frame objects, and code objects. For example, it can help you @@ -33,156 +31,150 @@ provided as convenient choices for the second argument to :func:`getmembers`. They also help you determine when you can expect to find the following special attributes: -+-----------+-----------------+---------------------------+-------+ -| Type | Attribute | Description | Notes | -+===========+=================+===========================+=======+ -| module | __doc__ | documentation string | | -+-----------+-----------------+---------------------------+-------+ -| | __file__ | filename (missing for | | -| | | built-in modules) | | -+-----------+-----------------+---------------------------+-------+ -| class | __doc__ | documentation string | | -+-----------+-----------------+---------------------------+-------+ -| | __module__ | name of module in which | | -| | | this class was defined | | -+-----------+-----------------+---------------------------+-------+ -| method | __doc__ | documentation string | | -+-----------+-----------------+---------------------------+-------+ -| | __name__ | name with which this | | -| | | method was defined | | -+-----------+-----------------+---------------------------+-------+ -| | im_class | class object that asked | \(1) | -| | | for this method | | -+-----------+-----------------+---------------------------+-------+ -| | im_func | function object | | -| | | containing implementation | | -| | | of method | | -+-----------+-----------------+---------------------------+-------+ -| | im_self | instance to which this | | -| | | method is bound, or | | -| | | ``None`` | | -+-----------+-----------------+---------------------------+-------+ -| function | __doc__ | documentation string | | -+-----------+-----------------+---------------------------+-------+ -| | __name__ | name with which this | | -| | | function was defined | | -+-----------+-----------------+---------------------------+-------+ -| | __code__ | code object containing | | -| | | compiled function | | -| | | bytecode | | -+-----------+-----------------+---------------------------+-------+ -| | __defaults__ | tuple of any default | | -| | | values for arguments | | -+-----------+-----------------+---------------------------+-------+ -| | __globals__ | global namespace in which | | -| | | this function was defined | | -+-----------+-----------------+---------------------------+-------+ -| traceback | tb_frame | frame object at this | | -| | | level | | -+-----------+-----------------+---------------------------+-------+ -| | tb_lasti | index of last attempted | | -| | | instruction in bytecode | | -+-----------+-----------------+---------------------------+-------+ -| | tb_lineno | current line number in | | -| | | Python source code | | -+-----------+-----------------+---------------------------+-------+ -| | tb_next | next inner traceback | | -| | | object (called by this | | -| | | level) | | -+-----------+-----------------+---------------------------+-------+ -| frame | f_back | next outer frame object | | -| | | (this frame's caller) | | -+-----------+-----------------+---------------------------+-------+ -| | f_builtins | built-in namespace seen | | -| | | by this frame | | -+-----------+-----------------+---------------------------+-------+ -| | f_code | code object being | | -| | | executed in this frame | | -+-----------+-----------------+---------------------------+-------+ -| | f_exc_traceback | traceback if raised in | | -| | | this frame, or ``None`` | | -+-----------+-----------------+---------------------------+-------+ -| | f_exc_type | exception type if raised | | -| | | in this frame, or | | -| | | ``None`` | | -+-----------+-----------------+---------------------------+-------+ -| | f_exc_value | exception value if raised | | -| | | in this frame, or | | -| | | ``None`` | | -+-----------+-----------------+---------------------------+-------+ -| | f_globals | global namespace seen by | | -| | | this frame | | -+-----------+-----------------+---------------------------+-------+ -| | f_lasti | index of last attempted | | -| | | instruction in bytecode | | -+-----------+-----------------+---------------------------+-------+ -| | f_lineno | current line number in | | -| | | Python source code | | -+-----------+-----------------+---------------------------+-------+ -| | f_locals | local namespace seen by | | -| | | this frame | | -+-----------+-----------------+---------------------------+-------+ -| | f_restricted | 0 or 1 if frame is in | | -| | | restricted execution mode | | -+-----------+-----------------+---------------------------+-------+ -| | f_trace | tracing function for this | | -| | | frame, or ``None`` | | -+-----------+-----------------+---------------------------+-------+ -| code | co_argcount | number of arguments (not | | -| | | including \* or \*\* | | -| | | args) | | -+-----------+-----------------+---------------------------+-------+ -| | co_code | string of raw compiled | | -| | | bytecode | | -+-----------+-----------------+---------------------------+-------+ -| | co_consts | tuple of constants used | | -| | | in the bytecode | | -+-----------+-----------------+---------------------------+-------+ -| | co_filename | name of file in which | | -| | | this code object was | | -| | | created | | -+-----------+-----------------+---------------------------+-------+ -| | co_firstlineno | number of first line in | | -| | | Python source code | | -+-----------+-----------------+---------------------------+-------+ -| | co_flags | bitmap: 1=optimized ``|`` | | -| | | 2=newlocals ``|`` 4=\*arg | | -| | | ``|`` 8=\*\*arg | | -+-----------+-----------------+---------------------------+-------+ -| | co_lnotab | encoded mapping of line | | -| | | numbers to bytecode | | -| | | indices | | -+-----------+-----------------+---------------------------+-------+ -| | co_name | name with which this code | | -| | | object was defined | | -+-----------+-----------------+---------------------------+-------+ -| | co_names | tuple of names of local | | -| | | variables | | -+-----------+-----------------+---------------------------+-------+ -| | co_nlocals | number of local variables | | -+-----------+-----------------+---------------------------+-------+ -| | co_stacksize | virtual machine stack | | -| | | space required | | -+-----------+-----------------+---------------------------+-------+ -| | co_varnames | tuple of names of | | -| | | arguments and local | | -| | | variables | | -+-----------+-----------------+---------------------------+-------+ -| builtin | __doc__ | documentation string | | -+-----------+-----------------+---------------------------+-------+ -| | __name__ | original name of this | | -| | | function or method | | -+-----------+-----------------+---------------------------+-------+ -| | __self__ | instance to which a | | -| | | method is bound, or | | -| | | ``None`` | | -+-----------+-----------------+---------------------------+-------+ - -Note: - -(1) - .. versionchanged:: 2.2 - :attr:`im_class` used to refer to the class that defined the method. ++-----------+-----------------+---------------------------+ +| Type | Attribute | Description | ++===========+=================+===========================+ +| module | __doc__ | documentation string | ++-----------+-----------------+---------------------------+ +| | __file__ | filename (missing for | +| | | built-in modules) | ++-----------+-----------------+---------------------------+ +| class | __doc__ | documentation string | ++-----------+-----------------+---------------------------+ +| | __module__ | name of module in which | +| | | this class was defined | ++-----------+-----------------+---------------------------+ +| method | __doc__ | documentation string | ++-----------+-----------------+---------------------------+ +| | __name__ | name with which this | +| | | method was defined | ++-----------+-----------------+---------------------------+ +| | im_class | class object that asked | +| | | for this method | ++-----------+-----------------+---------------------------+ +| | im_func | function object | +| | | containing implementation | +| | | of method | ++-----------+-----------------+---------------------------+ +| | im_self | instance to which this | +| | | method is bound, or | +| | | ``None`` | ++-----------+-----------------+---------------------------+ +| function | __doc__ | documentation string | ++-----------+-----------------+---------------------------+ +| | __name__ | name with which this | +| | | function was defined | ++-----------+-----------------+---------------------------+ +| | __code__ | code object containing | +| | | compiled function | +| | | bytecode | ++-----------+-----------------+---------------------------+ +| | __defaults__ | tuple of any default | +| | | values for arguments | ++-----------+-----------------+---------------------------+ +| | __globals__ | global namespace in which | +| | | this function was defined | ++-----------+-----------------+---------------------------+ +| traceback | tb_frame | frame object at this | +| | | level | ++-----------+-----------------+---------------------------+ +| | tb_lasti | index of last attempted | +| | | instruction in bytecode | ++-----------+-----------------+---------------------------+ +| | tb_lineno | current line number in | +| | | Python source code | ++-----------+-----------------+---------------------------+ +| | tb_next | next inner traceback | +| | | object (called by this | +| | | level) | ++-----------+-----------------+---------------------------+ +| frame | f_back | next outer frame object | +| | | (this frame's caller) | ++-----------+-----------------+---------------------------+ +| | f_builtins | built-in namespace seen | +| | | by this frame | ++-----------+-----------------+---------------------------+ +| | f_code | code object being | +| | | executed in this frame | ++-----------+-----------------+---------------------------+ +| | f_exc_traceback | traceback if raised in | +| | | this frame, or ``None`` | ++-----------+-----------------+---------------------------+ +| | f_exc_type | exception type if raised | +| | | in this frame, or | +| | | ``None`` | ++-----------+-----------------+---------------------------+ +| | f_exc_value | exception value if raised | +| | | in this frame, or | +| | | ``None`` | ++-----------+-----------------+---------------------------+ +| | f_globals | global namespace seen by | +| | | this frame | ++-----------+-----------------+---------------------------+ +| | f_lasti | index of last attempted | +| | | instruction in bytecode | ++-----------+-----------------+---------------------------+ +| | f_lineno | current line number in | +| | | Python source code | ++-----------+-----------------+---------------------------+ +| | f_locals | local namespace seen by | +| | | this frame | ++-----------+-----------------+---------------------------+ +| | f_restricted | 0 or 1 if frame is in | +| | | restricted execution mode | ++-----------+-----------------+---------------------------+ +| | f_trace | tracing function for this | +| | | frame, or ``None`` | ++-----------+-----------------+---------------------------+ +| code | co_argcount | number of arguments (not | +| | | including \* or \*\* | +| | | args) | ++-----------+-----------------+---------------------------+ +| | co_code | string of raw compiled | +| | | bytecode | ++-----------+-----------------+---------------------------+ +| | co_consts | tuple of constants used | +| | | in the bytecode | ++-----------+-----------------+---------------------------+ +| | co_filename | name of file in which | +| | | this code object was | +| | | created | ++-----------+-----------------+---------------------------+ +| | co_firstlineno | number of first line in | +| | | Python source code | ++-----------+-----------------+---------------------------+ +| | co_flags | bitmap: 1=optimized ``|`` | +| | | 2=newlocals ``|`` 4=\*arg | +| | | ``|`` 8=\*\*arg | ++-----------+-----------------+---------------------------+ +| | co_lnotab | encoded mapping of line | +| | | numbers to bytecode | +| | | indices | ++-----------+-----------------+---------------------------+ +| | co_name | name with which this code | +| | | object was defined | ++-----------+-----------------+---------------------------+ +| | co_names | tuple of names of local | +| | | variables | ++-----------+-----------------+---------------------------+ +| | co_nlocals | number of local variables | ++-----------+-----------------+---------------------------+ +| | co_stacksize | virtual machine stack | +| | | space required | ++-----------+-----------------+---------------------------+ +| | co_varnames | tuple of names of | +| | | arguments and local | +| | | variables | ++-----------+-----------------+---------------------------+ +| builtin | __doc__ | documentation string | ++-----------+-----------------+---------------------------+ +| | __name__ | original name of this | +| | | function or method | ++-----------+-----------------+---------------------------+ +| | __self__ | instance to which a | +| | | method is bound, or | +| | | ``None`` | ++-----------+-----------------+---------------------------+ .. function:: getmembers(object[, predicate]) @@ -286,8 +278,6 @@ Note: have __name__ and __doc__ attributes (properties, getsets, and members have both of these attributes), but this is not guaranteed. - .. versionadded:: 2.3 - .. function:: isgetsetdescriptor(object) @@ -297,8 +287,6 @@ Note: structures. For Python implementations without such types, this method will always return ``False``. - .. versionadded:: 2.5 - .. function:: ismemberdescriptor(object) @@ -308,8 +296,6 @@ Note: ``PyMemberDef`` structures. For Python implementations without such types, this method will always return ``False``. - .. versionadded:: 2.5 - .. _inspect-source: diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 9f9cb24..d7a7668 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Raymond Hettinger <python@rcn.com> -.. versionadded:: 2.3 - This module implements a number of iterator building blocks inspired by constructs from the Haskell and SML programming languages. Each has been recast in a form suitable for Python. @@ -178,8 +176,6 @@ loops that truncate the stream. self.currvalue = next(self.it) # Exit on StopIteration self.currkey = self.keyfunc(self.currvalue) - .. versionadded:: 2.4 - .. function:: ifilter(predicate, iterable) @@ -253,9 +249,6 @@ loops that truncate the stream. If *start* is ``None``, then iteration starts at zero. If *step* is ``None``, then the step defaults to one. - .. versionchanged:: 2.5 - accept ``None`` values for default *start* and *step*. - .. function:: izip(*iterables) @@ -269,9 +262,7 @@ loops that truncate the stream. result = [next(it) for it in iterables] yield tuple(result) - .. versionchanged:: 2.4 - When no iterables are specified, returns a zero length iterator instead of - raising a :exc:`TypeError` exception. + When no iterables are specified, return a zero length iterator. Note, the left-to-right evaluation order of the iterables is guaranteed. This makes possible an idiom for clustering a data series into n-length groups using @@ -313,8 +304,6 @@ loops that truncate the stream. function should be wrapped with something that limits the number of calls (for example :func:`islice` or :func:`takewhile`). - .. versionadded:: 2.6 - .. function:: repeat(object[, times]) @@ -385,8 +374,6 @@ loops that truncate the stream. iterator is going to use most or all of the data before the other iterator, it is faster to use :func:`list` instead of :func:`tee`. - .. versionadded:: 2.4 - .. _itertools-example: diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst index f3d8379..1aef2f3 100644 --- a/Doc/library/linecache.rst +++ b/Doc/library/linecache.rst @@ -28,9 +28,6 @@ The :mod:`linecache` module defines the following functions: ``__loader__`` in *module_globals*, in case the module was imported from a zipfile or other non-filesystem import source. - .. versionadded:: 2.5 - The *module_globals* parameter was added. - .. function:: clearcache() diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst index 6d427b7..630833a 100644 --- a/Doc/library/locale.rst +++ b/Doc/library/locale.rst @@ -50,9 +50,6 @@ The :mod:`locale` module defines the following exception and functions: specified in the :envvar:`LANG` environment variable). If the locale is not changed thereafter, using multithreading should not cause problems. - .. versionchanged:: 2.0 - Added support for tuple values of the *locale* parameter. - .. function:: localeconv() @@ -176,8 +173,6 @@ The :mod:`locale` module defines the following exception and functions: *language code* and *encoding* may be ``None`` if their values cannot be determined. - .. versionadded:: 2.0 - .. function:: getlocale([category]) @@ -189,8 +184,6 @@ The :mod:`locale` module defines the following exception and functions: *language code* and *encoding* may be ``None`` if their values cannot be determined. - .. versionadded:: 2.0 - .. function:: getpreferredencoding([do_setlocale]) @@ -203,8 +196,6 @@ The :mod:`locale` module defines the following exception and functions: preferences, so this function is not thread-safe. If invoking setlocale is not necessary or desired, *do_setlocale* should be set to ``False``. - .. versionadded:: 2.3 - .. function:: normalize(localename) @@ -215,8 +206,6 @@ The :mod:`locale` module defines the following exception and functions: If the given encoding is not known, the function defaults to the default encoding for the locale code just like :func:`setlocale`. - .. versionadded:: 2.0 - .. function:: resetlocale([category]) @@ -225,8 +214,6 @@ The :mod:`locale` module defines the following exception and functions: The default setting is determined by calling :func:`getdefaultlocale`. *category* defaults to :const:`LC_ALL`. - .. versionadded:: 2.0 - .. function:: strcoll(string1, string2) @@ -259,17 +246,12 @@ The :mod:`locale` module defines the following exception and functions: Please note that this function will only work for exactly one %char specifier. For whole format strings, use :func:`format_string`. - .. versionchanged:: 2.5 - Added the *monetary* parameter. - .. function:: format_string(format, val[, grouping]) Processes formatting specifiers as in ``format % val``, but takes the current locale settings into account. - .. versionadded:: 2.5 - .. function:: currency(val[, symbol[, grouping[, international]]]) @@ -283,8 +265,6 @@ The :mod:`locale` module defines the following exception and functions: Note that this function will not work with the 'C' locale, so you have to set a locale via :func:`setlocale` first. - .. versionadded:: 2.5 - .. function:: str(float) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 0035836..1dac8b6 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -15,8 +15,6 @@ .. index:: pair: Errors; logging -.. versionadded:: 2.3 - This module defines functions and classes which implement a flexible error logging system for applications. @@ -222,9 +220,6 @@ functions. above example). In such circumstances, it is likely that specialized :class:`Formatter`\ s would be used with particular :class:`Handler`\ s. - .. versionchanged:: 2.5 - *extra* was added. - .. function:: info(msg[, *args[, **kwargs]]) @@ -307,9 +302,6 @@ functions. :func:`error` and :func:`critical` will call :func:`basicConfig` automatically if no handlers are defined for the root logger. - .. versionchanged:: 2.4 - Formerly, :func:`basicConfig` did not take any keyword arguments. - The following keyword arguments are supported. +--------------+---------------------------------------------+ @@ -464,9 +456,6 @@ instantiated directly, but always through the module-level function above example). In such circumstances, it is likely that specialized :class:`Formatter`\ s would be used with particular :class:`Handler`\ s. - .. versionchanged:: 2.5 - *extra* was added. - .. method:: Logger.info(msg[, *args[, **kwargs]]) @@ -536,10 +525,6 @@ 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.4 - The function name was added. In earlier versions, the filename and line number - were returned as a 2-element tuple.. - .. method:: Logger.handle(record) @@ -554,18 +539,12 @@ instantiated directly, but always through the module-level function This is a factory method which can be overridden in subclasses to create specialized :class:`LogRecord` instances. - .. versionchanged:: 2.5 - *func* and *extra* were added. - .. _minimal-example: Basic example ------------- -.. versionchanged:: 2.4 - formerly :func:`basicConfig` did not take any keyword arguments. - The :mod:`logging` package provides a lot of flexibility, and its configuration can appear daunting. This section demonstrates that simple use of the logging package is possible. @@ -1042,8 +1021,6 @@ sends logging output to a disk file. It inherits the output functionality from WatchedFileHandler ^^^^^^^^^^^^^^^^^^ -.. versionadded:: 2.6 - The :class:`WatchedFileHandler` class, located in the :mod:`logging.handlers` module, is a :class:`FileHandler` which watches the file it is logging to. If the file changes, it is closed and reopened using the file name. @@ -1369,9 +1346,6 @@ supports sending logging messages to an email address via SMTP. the standard SMTP port is used. If your SMTP server requires authentication, you can specify a (username, password) tuple for the *credentials* argument. - .. versionchanged:: 2.6 - *credentials* was added. - .. method:: SMTPHandler.emit(record) @@ -1542,9 +1516,6 @@ Currently, the useful mapping keys in a :class:`LogRecord` are: | | args``. | +-------------------------+-----------------------------------------------+ -.. versionchanged:: 2.5 - *funcName* was added. - .. class:: Formatter([fmt[, datefmt]]) @@ -1631,9 +1602,6 @@ made, and any exception information to be logged. the name of the function from which the logging call was made. If not specified, it defaults to ``None``. - .. versionchanged:: 2.5 - *func* was added. - .. method:: LogRecord.getMessage() diff --git a/Doc/library/marshal.rst b/Doc/library/marshal.rst index 6927067..00bbab1 100644 --- a/Doc/library/marshal.rst +++ b/Doc/library/marshal.rst @@ -70,9 +70,8 @@ The module defines these functions: :exc:`ValueError` exception is raised --- but garbage data will also be written to the file. The object will not be properly read back by :func:`load`. - .. versionadded:: 2.4 - The *version* argument indicates the data format that ``dump`` should use - (see below). + The *version* argument indicates the data format that ``dump`` should use + (see below). .. function:: load(file) @@ -95,9 +94,8 @@ The module defines these functions: value must be a supported type. Raise a :exc:`ValueError` exception if value has (or contains an object that has) an unsupported type. - .. versionadded:: 2.4 - The *version* argument indicates the data format that ``dumps`` should use - (see below). + The *version* argument indicates the data format that ``dumps`` should use + (see below). .. function:: loads(string) @@ -116,8 +114,6 @@ In addition, the following constants are defined: Python 2.5) uses a binary format for floating point numbers. The current version is 2. - .. versionadded:: 2.4 - .. rubric:: Footnotes diff --git a/Doc/library/math.rst b/Doc/library/math.rst index 17c75d3..7ea4aac 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -99,9 +99,6 @@ Power and logarithmic functions: Return the logarithm of *x* to the given *base*. If the *base* is not specified, return the natural logarithm of *x* (that is, the logarithm to base *e*). - .. versionchanged:: 2.3 - *base* argument added. - .. function:: log10(x) diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst index fd5e12d..50140c6 100644 --- a/Doc/library/mimetypes.rst +++ b/Doc/library/mimetypes.rst @@ -154,7 +154,6 @@ than one MIME-type database: The optional *filenames* parameter can be used to cause additional files to be loaded "on top" of the default database. - .. versionadded:: 2.2 An example usage of the module:: diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst index abe5b7b..533034f 100644 --- a/Doc/library/mmap.rst +++ b/Doc/library/mmap.rst @@ -35,9 +35,7 @@ to an :const:`ACCESS_WRITE` memory map affects both memory and the underlying file. Assignment to an :const:`ACCESS_COPY` memory map affects memory but does not update the underlying file. -.. versionchanged:: 2.5 - To map anonymous memory, -1 should be passed as the fileno along with the - length. +To map anonymous memory, -1 should be passed as the fileno along with the length. .. function:: mmap(fileno, length[, tagname[, access]]) diff --git a/Doc/library/modulefinder.rst b/Doc/library/modulefinder.rst index 334bd5d..9ae0788 100644 --- a/Doc/library/modulefinder.rst +++ b/Doc/library/modulefinder.rst @@ -9,8 +9,6 @@ :synopsis: Find modules used by a script. -.. versionadded:: 2.3 - This module provides a :class:`ModuleFinder` class that can be used to determine the set of modules imported by a script. ``modulefinder.py`` can also be run as a script, giving the filename of a Python script as its argument, after which a diff --git a/Doc/library/msilib.rst b/Doc/library/msilib.rst index 6c7955a..c361a29 100644 --- a/Doc/library/msilib.rst +++ b/Doc/library/msilib.rst @@ -11,8 +11,6 @@ .. index:: single: msi -.. versionadded:: 2.5 - The :mod:`msilib` supports the creation of Microsoft Installer (``.msi``) files. Because these files often contain an embedded "cabinet" file (``.cab``), it also exposes an API to create CAB files. Support for reading ``.cab`` files is diff --git a/Doc/library/netrc.rst b/Doc/library/netrc.rst index bf3d92e..e6cc648 100644 --- a/Doc/library/netrc.rst +++ b/Doc/library/netrc.rst @@ -8,10 +8,6 @@ .. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com> -.. % Note the \protect needed for \file... ;-( - -.. versionadded:: 1.5.2 - The :class:`netrc` class parses and encapsulates the netrc file format used by the Unix :program:`ftp` program and other FTP clients. diff --git a/Doc/library/nis.rst b/Doc/library/nis.rst index 77684bf..1281e3f 100644 --- a/Doc/library/nis.rst +++ b/Doc/library/nis.rst @@ -26,9 +26,8 @@ The :mod:`nis` module defines the following functions: Note that *mapname* is first checked if it is an alias to another name. - .. versionchanged:: 2.5 - The *domain* argument allows to override the NIS domain used for the lookup. If - unspecified, lookup is in the default NIS domain. + The *domain* argument allows to override the NIS domain used for the lookup. If + unspecified, lookup is in the default NIS domain. .. function:: cat(mapname[, domain=default_domain]) @@ -39,29 +38,25 @@ The :mod:`nis` module defines the following functions: Note that *mapname* is first checked if it is an alias to another name. - .. versionchanged:: 2.5 - The *domain* argument allows to override the NIS domain used for the lookup. If - unspecified, lookup is in the default NIS domain. + The *domain* argument allows to override the NIS domain used for the lookup. If + unspecified, lookup is in the default NIS domain. .. function:: maps([domain=default_domain]) Return a list of all valid maps. - .. versionchanged:: 2.5 - The *domain* argument allows to override the NIS domain used for the lookup. If - unspecified, lookup is in the default NIS domain. + The *domain* argument allows to override the NIS domain used for the lookup. If + unspecified, lookup is in the default NIS domain. .. function:: get_default_domain() Return the system default NIS domain. - .. versionadded:: 2.5 The :mod:`nis` module defines the following exception: - .. exception:: error An error raised when a NIS function returns an error code. diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst index faa5115..ef5a6e9 100644 --- a/Doc/library/nntplib.rst +++ b/Doc/library/nntplib.rst @@ -51,7 +51,7 @@ headers):: The module itself defines the following items: -.. class:: NNTP(host[, port [, user[, password [, readermode] [, usenetrc]]]]) +.. class:: NNTP(host[, port [, user[, password [, readermode][, usenetrc]]]]) Return a new instance of the :class:`NNTP` class, representing a connection to the NNTP server running on host *host*, listening at port *port*. The @@ -66,9 +66,6 @@ The module itself defines the following items: :exc:`NNTPPermanentError`\ s, you might need to set *readermode*. *readermode* defaults to ``None``. *usenetrc* defaults to ``True``. - .. versionchanged:: 2.4 - *usenetrc* argument added. - .. exception:: NNTPError @@ -185,8 +182,6 @@ indicates an error, the method raises one of the above exceptions. strings). Return a pair ``(response, list)``, where *list* is a list of tuples containing ``(name, title)``. - .. versionadded:: 2.4 - .. method:: NNTP.description(group) @@ -197,8 +192,6 @@ indicates an error, the method raises one of the above exceptions. This elides the response code from the server. If the response code is needed, use :meth:`descriptions`. - .. versionadded:: 2.4 - .. method:: NNTP.group(name) diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst index 4e85569..f396978 100644 --- a/Doc/library/operator.rst +++ b/Doc/library/operator.rst @@ -42,7 +42,6 @@ the rich comparison operators they support: return any value, which may or may not be interpretable as a Boolean value. See :ref:`comparisons` for more information about rich comparisons. - .. versionadded:: 2.2 The logical operations are also generally applicable to all objects, and support truth tests, identity tests, and boolean operations: @@ -67,14 +66,11 @@ truth tests, identity tests, and boolean operations: Return ``a is b``. Tests object identity. - .. versionadded:: 2.3 - .. function:: is_not(a, b) Return ``a is not b``. Tests object identity. - .. versionadded:: 2.3 The mathematical and bitwise operations are the most numerous: @@ -109,8 +105,6 @@ The mathematical and bitwise operations are the most numerous: Return ``a // b``. - .. versionadded:: 2.2 - .. function:: inv(o) invert(o) @@ -119,9 +113,6 @@ The mathematical and bitwise operations are the most numerous: Return the bitwise inverse of the number *o*. This is equivalent to ``~o``. - .. versionadded:: 2.0 - The names :func:`invert` and :func:`__invert__`. - .. function:: lshift(a, b) __lshift__(a, b) @@ -164,8 +155,6 @@ The mathematical and bitwise operations are the most numerous: Return ``a ** b``, for *a* and *b* numbers. - .. versionadded:: 2.3 - .. function:: rshift(a, b) __rshift__(a, b) @@ -185,8 +174,6 @@ The mathematical and bitwise operations are the most numerous: Return ``a / b`` when ``__future__.division`` is in effect. This is also known as "true" division. - .. versionadded:: 2.2 - .. function:: xor(a, b) __xor__(a, b) @@ -199,8 +186,6 @@ The mathematical and bitwise operations are the most numerous: Return *a* converted to an integer. Equivalent to ``a.__index__()``. - .. versionadded:: 2.5 - Operations which work with sequences include: @@ -215,9 +200,6 @@ Operations which work with sequences include: Return the outcome of the test ``b in a``. Note the reversed operands. - .. versionadded:: 2.0 - The name :func:`__contains__`. - .. function:: countOf(a, b) @@ -290,24 +272,18 @@ to the compound statement ``z = x; z += y``. ``a = iadd(a, b)`` is equivalent to ``a += b``. - .. versionadded:: 2.5 - .. function:: iand(a, b) __iand__(a, b) ``a = iand(a, b)`` is equivalent to ``a &= b``. - .. versionadded:: 2.5 - .. function:: iconcat(a, b) __iconcat__(a, b) ``a = iconcat(a, b)`` is equivalent to ``a += b`` for *a* and *b* sequences. - .. versionadded:: 2.5 - .. function:: idiv(a, b) __idiv__(a, b) @@ -315,23 +291,17 @@ to the compound statement ``z = x; z += y``. ``a = idiv(a, b)`` is equivalent to ``a /= b`` when ``__future__.division`` is not in effect. - .. versionadded:: 2.5 - .. function:: ifloordiv(a, b) __ifloordiv__(a, b) ``a = ifloordiv(a, b)`` is equivalent to ``a //= b``. - .. versionadded:: 2.5 - .. function:: ilshift(a, b) __ilshift__(a, b) - ``a = ilshift(a, b)`` is equivalent to ``a <``\ ``<= b``. - - .. versionadded:: 2.5 + ``a = ilshift(a, b)`` is equivalent to ``a <<= b``. .. function:: imod(a, b) @@ -339,32 +309,24 @@ to the compound statement ``z = x; z += y``. ``a = imod(a, b)`` is equivalent to ``a %= b``. - .. versionadded:: 2.5 - .. function:: imul(a, b) __imul__(a, b) ``a = imul(a, b)`` is equivalent to ``a *= b``. - .. versionadded:: 2.5 - .. function:: ior(a, b) __ior__(a, b) ``a = ior(a, b)`` is equivalent to ``a |= b``. - .. versionadded:: 2.5 - .. function:: ipow(a, b) __ipow__(a, b) ``a = ipow(a, b)`` is equivalent to ``a **= b``. - .. versionadded:: 2.5 - .. function:: irepeat(a, b) __irepeat__(a, b) @@ -372,24 +334,18 @@ to the compound statement ``z = x; z += y``. ``a = irepeat(a, b)`` is equivalent to ``a *= b`` where *a* is a sequence and *b* is an integer. - .. versionadded:: 2.5 - .. function:: irshift(a, b) __irshift__(a, b) ``a = irshift(a, b)`` is equivalent to ``a >>= b``. - .. versionadded:: 2.5 - .. function:: isub(a, b) __isub__(a, b) ``a = isub(a, b)`` is equivalent to ``a -= b``. - .. versionadded:: 2.5 - .. function:: itruediv(a, b) __itruediv__(a, b) @@ -397,16 +353,12 @@ to the compound statement ``z = x; z += y``. ``a = itruediv(a, b)`` is equivalent to ``a /= b`` when ``__future__.division`` is in effect. - .. versionadded:: 2.5 - .. function:: ixor(a, b) __ixor__(a, b) ``a = ixor(a, b)`` is equivalent to ``a ^= b``. - .. versionadded:: 2.5 - The :mod:`operator` module also defines a few predicates to test the type of objects. @@ -497,11 +449,6 @@ expect a function argument. ``f=attrgetter('name', 'date')``, the call ``f(b)`` returns ``(b.name, b.date)``. - .. versionadded:: 2.4 - - .. versionchanged:: 2.5 - Added support for multiple attributes. - .. function:: itemgetter(item[, args...]) @@ -510,10 +457,6 @@ expect a function argument. call ``f(b)`` returns ``b[2]``. After, ``f=itemgetter(2,5,3)``, the call ``f(b)`` returns ``(b[2], b[5], b[3])``. - .. versionadded:: 2.4 - - .. versionchanged:: 2.5 - Added support for multiple item extraction. Examples:: diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst index cfcd8a6..bfc55f9 100644 --- a/Doc/library/optparse.rst +++ b/Doc/library/optparse.rst @@ -8,10 +8,6 @@ .. module:: optparse :synopsis: More convenient, flexible, and powerful command-line parsing library. .. moduleauthor:: Greg Ward <gward@python.net> - - -.. versionadded:: 2.3 - .. sectionauthor:: Greg Ward <gward@python.net> diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index 291d155..667cb90 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -23,8 +23,6 @@ write files see :func:`open`, and for accessing the filesystem see the Return a normalized absolutized version of the pathname *path*. On most platforms, this is equivalent to ``normpath(join(os.getcwd(), path))``. - .. versionadded:: 1.5.2 - .. function:: basename(path) @@ -62,8 +60,6 @@ write files see :func:`open`, and for accessing the filesystem see the broken symbolic links. Equivalent to :func:`exists` on platforms lacking :func:`os.lstat`. - .. versionadded:: 2.4 - .. function:: expanduser(path) @@ -103,11 +99,8 @@ write files see :func:`open`, and for accessing the filesystem see the the number of seconds since the epoch (see the :mod:`time` module). Raise :exc:`os.error` if the file does not exist or is inaccessible. - .. versionadded:: 1.5.2 - - .. versionchanged:: 2.3 - If :func:`os.stat_float_times` returns True, the result is a floating point - number. + If :func:`os.stat_float_times` returns True, the result is a floating point + number. .. function:: getmtime(path) @@ -116,11 +109,8 @@ write files see :func:`open`, and for accessing the filesystem see the giving the number of seconds since the epoch (see the :mod:`time` module). Raise :exc:`os.error` if the file does not exist or is inaccessible. - .. versionadded:: 1.5.2 - - .. versionchanged:: 2.3 - If :func:`os.stat_float_times` returns True, the result is a floating point - number. + If :func:`os.stat_float_times` returns True, the result is a floating point + number. .. function:: getctime(path) @@ -131,16 +121,12 @@ write files see :func:`open`, and for accessing the filesystem see the the :mod:`time` module). Raise :exc:`os.error` if the file does not exist or is inaccessible. - .. versionadded:: 2.3 - .. function:: getsize(path) Return the size, in bytes, of *path*. Raise :exc:`os.error` if the file does not exist or is inaccessible. - .. versionadded:: 1.5.2 - .. function:: isabs(path) @@ -207,8 +193,6 @@ write files see :func:`open`, and for accessing the filesystem see the Return the canonical path of the specified filename, eliminating any symbolic links encountered in the path (if they are supported by the operating system). - .. versionadded:: 2.2 - .. function:: relpath(path[, start]) @@ -217,8 +201,6 @@ write files see :func:`open`, and for accessing the filesystem see the *start* defaults to :attr:`os.curdir`. Availability: Windows, Unix. - .. versionadded:: 2.6 - .. function:: samefile(path1, path2) @@ -260,8 +242,6 @@ write files see :func:`open`, and for accessing the filesystem see the specifications, *drive* will always be the empty string. In all cases, ``drive + tail`` will be the same as *path*. - .. versionadded:: 1.3 - .. function:: splitext(path) @@ -270,10 +250,6 @@ write files see :func:`open`, and for accessing the filesystem see the period. Leading periods on the basename are ignored; ``splitext('.cshrc')`` returns ``('.cshrc', '')``. - .. versionchanged:: 2.6 - Earlier versions could produce an empty root when the only period was the - first character. - .. function:: splitunc(path) @@ -312,6 +288,3 @@ write files see :func:`open`, and for accessing the filesystem see the True if arbitrary Unicode strings can be used as file names (within limitations imposed by the file system), and if :func:`os.listdir` returns Unicode strings for a Unicode argument. - - .. versionadded:: 2.3 - diff --git a/Doc/library/os.rst b/Doc/library/os.rst index f443941..0ad8fba 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -174,8 +174,6 @@ process and user. Return the process group id of the process with process id *pid*. If *pid* is 0, the process group id of the current process is returned. Availability: Unix. - .. versionadded:: 2.3 - .. function:: getpgrp() @@ -254,8 +252,6 @@ process and user. identifying a group. This operation is typical available only to the superuser. Availability: Unix. - .. versionadded:: 2.2 - .. function:: setpgrp() @@ -286,8 +282,6 @@ process and user. Calls the system call :cfunc:`getsid`. See the Unix manual for the semantics. Availability: Unix. - .. versionadded:: 2.4 - .. function:: setsid() @@ -361,14 +355,12 @@ These functions create new file objects. (See also :func:`open`.) and *bufsize* arguments have the same meaning as the corresponding arguments to the built-in :func:`open` function. Availability: Macintosh, Unix, Windows. - .. versionchanged:: 2.3 - When specified, the *mode* argument must now start with one of the letters - ``'r'``, ``'w'``, or ``'a'``, otherwise a :exc:`ValueError` is raised. + When specified, the *mode* argument must start with one of the letters + ``'r'``, ``'w'``, or ``'a'``, otherwise a :exc:`ValueError` is raised. - .. versionchanged:: 2.5 - On Unix, when the *mode* argument starts with ``'a'``, the *O_APPEND* flag is - set on the file descriptor (which the :cfunc:`fdopen` implementation already - does on most platforms). + On Unix, when the *mode* argument starts with ``'a'``, the *O_APPEND* flag is + set on the file descriptor (which the :cfunc:`fdopen` implementation already + does on most platforms). .. function:: popen(command[, mode[, bufsize]]) @@ -385,12 +377,6 @@ These functions create new file objects. (See also :func:`open`.) .. deprecated:: 2.6 This function is obsolete. Use the :mod:`subprocess` module. - .. versionchanged:: 2.0 - This function worked unreliably under Windows in earlier versions of Python. - This was due to the use of the :cfunc:`_popen` function from the libraries - provided with Windows. Newer versions of Python do not use the broken - implementation from the Windows libraries. - .. function:: tmpfile() @@ -644,8 +630,6 @@ platforms. For descriptions of their availability and use, consult Parameters to the :func:`lseek` function. Their values are 0, 1, and 2, respectively. Availability: Windows, Macintosh, Unix. - .. versionadded:: 2.5 - .. _os-file-dir: @@ -716,8 +700,6 @@ Files and Directories descriptor *fd*. The descriptor must refer to an opened directory, not an open file. Availability: Unix. - .. versionadded:: 2.3 - .. function:: getcwd() @@ -730,8 +712,6 @@ Files and Directories Return a Unicode object representing the current working directory. Availability: Macintosh, Unix, Windows. - .. versionadded:: 2.3 - .. function:: chflags(path, flags) @@ -751,16 +731,12 @@ Files and Directories Availability: Macintosh, Unix. - .. versionadded:: 2.6 - .. function:: chroot(path) Change the root directory of the current process to *path*. Availability: Macintosh, Unix. - .. versionadded:: 2.2 - .. function:: chmod(path, mode) @@ -809,16 +785,12 @@ Files and Directories Set the flags of *path* to the numeric *flags*, like :func:`chflags`, but do not follow symbolic links. Availability: Unix. - .. versionadded:: 2.6 - .. function:: lchown(path, uid, gid) Change the owner and group id of *path* to the numeric *uid* and gid. This function will not follow symbolic links. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. function:: link(src, dst) @@ -832,9 +804,8 @@ Files and Directories ``'..'`` even if they are present in the directory. Availability: Macintosh, Unix, Windows. - .. versionchanged:: 2.3 - On Windows NT/2k/XP and Unix, if *path* is a Unicode object, the result will be - a list of Unicode objects. + On Windows NT/2k/XP and Unix, if *path* is a Unicode object, the result will be + a list of Unicode objects. .. function:: lstat(path) @@ -867,31 +838,23 @@ Files and Directories ``stat.S_IFBLK``, *device* defines the newly created device special file (probably using :func:`os.makedev`), otherwise it is ignored. - .. versionadded:: 2.3 - .. function:: major(device) Extracts the device major number from a raw device number (usually the :attr:`st_dev` or :attr:`st_rdev` field from :ctype:`stat`). - .. versionadded:: 2.3 - .. function:: minor(device) Extracts the device minor number from a raw device number (usually the :attr:`st_dev` or :attr:`st_rdev` field from :ctype:`stat`). - .. versionadded:: 2.3 - .. function:: makedev(major, minor) Composes a raw device number from the major and minor device numbers. - .. versionadded:: 2.3 - .. function:: mkdir(path[, mode]) @@ -917,10 +880,7 @@ Files and Directories :func:`makedirs` will become confused if the path elements to create include *os.pardir*. - .. versionadded:: 1.5.2 - - .. versionchanged:: 2.3 - This function now handles UNC paths correctly. + This function handles UNC paths correctly. .. function:: pathconf(path, name) @@ -955,8 +915,7 @@ Files and Directories be converted to an absolute pathname using ``os.path.join(os.path.dirname(path), result)``. - .. versionchanged:: 2.6 - If the *path* is a Unicode object the result will also be a Unicode object. + If the *path* is a Unicode object, the result will also be a Unicode object. Availability: Macintosh, Unix. @@ -985,8 +944,6 @@ Files and Directories they are empty. Raises :exc:`OSError` if the leaf directory could not be successfully removed. - .. versionadded:: 1.5.2 - .. function:: rename(src, dst) @@ -1007,8 +964,6 @@ Files and Directories attempted first. After the rename, directories corresponding to rightmost path segments of the old name will be pruned away using :func:`removedirs`. - .. versionadded:: 1.5.2 - .. note:: This function can fail with the new directory structure made if you lack @@ -1040,11 +995,10 @@ Files and Directories 926L >>> - .. versionchanged:: 2.3 - If :func:`stat_float_times` returns true, the time values are floats, measuring - seconds. Fractions of a second may be reported if the system supports that. On - Mac OS, the times are always floats. See :func:`stat_float_times` for further - discussion. + If :func:`stat_float_times` returns true, the time values are floats, measuring + seconds. Fractions of a second may be reported if the system supports that. On + Mac OS, the times are always floats. See :func:`stat_float_times` for further + discussion. On some Unix systems (such as Linux), the following attributes may also be available: :attr:`st_blocks` (number of blocks allocated for file), @@ -1080,12 +1034,6 @@ Files and Directories Availability: Macintosh, Unix, Windows. - .. versionchanged:: 2.2 - Added access to values as attributes of the returned object. - - .. versionchanged:: 2.5 - Added st_gen, st_birthtime. - .. function:: stat_float_times([newvalue]) @@ -1097,10 +1045,9 @@ Files and Directories For compatibility with older Python versions, accessing :class:`stat_result` as a tuple always returns integers. - .. versionchanged:: 2.5 - Python now returns float values by default. Applications which do not work - correctly with floating point time stamps can use this function to restore the - old behaviour. + Python now returns float values by default. Applications which do not work + correctly with floating point time stamps can use this function to restore the + old behaviour. The resolution of the timestamps (that is the smallest possible fraction) depends on the system. Some systems only support second resolution; on these @@ -1131,9 +1078,6 @@ Files and Directories this remains useful when writing code that needs to work with versions of Python that don't support accessing the fields as attributes. - .. versionchanged:: 2.2 - Added access to values as attributes of the returned object. - .. function:: symlink(src, dst) @@ -1206,9 +1150,6 @@ Files and Directories depending on the resolution with which your operating system records access and modification times; see :func:`stat`. - .. versionchanged:: 2.0 - Added support for ``None`` for *times*. - Availability: Macintosh, Unix, Windows. @@ -1255,9 +1196,6 @@ Files and Directories directories. Set *followlinks* to True to visit directories pointed to by symlinks, on systems that support them. - .. versionadded:: 2.6 - The *followlinks* parameter. - .. note:: Be aware that setting *followlinks* to true can lead to infinite recursion if a @@ -1297,8 +1235,6 @@ Files and Directories for name in dirs: os.rmdir(os.path.join(root, name)) - .. versionadded:: 2.3 - .. _os-process: @@ -1391,96 +1327,72 @@ written in Python, such as a mail server's external command delivery program. Exit code that means no error occurred. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_USAGE Exit code that means the command was used incorrectly, such as when the wrong number of arguments are given. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_DATAERR Exit code that means the input data was incorrect. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_NOINPUT Exit code that means an input file did not exist or was not readable. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_NOUSER Exit code that means a specified user did not exist. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_NOHOST Exit code that means a specified host did not exist. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_UNAVAILABLE Exit code that means that a required service is unavailable. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_SOFTWARE Exit code that means an internal software error was detected. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_OSERR Exit code that means an operating system error was detected, such as the inability to fork or create a pipe. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_OSFILE Exit code that means some system file did not exist, could not be opened, or had some other kind of error. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_CANTCREAT Exit code that means a user specified output file could not be created. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_IOERR Exit code that means that an error occurred while doing I/O on some file. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_TEMPFAIL @@ -1488,16 +1400,12 @@ written in Python, such as a mail server's external command delivery program. that may not really be an error, such as a network connection that couldn't be made during a retryable operation. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_PROTOCOL Exit code that means that a protocol exchange was illegal, invalid, or not understood. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_NOPERM @@ -1505,24 +1413,18 @@ written in Python, such as a mail server's external command delivery program. operation (but not intended for file system problems). Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_CONFIG Exit code that means that some kind of configuration error occurred. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. data:: EX_NOTFOUND Exit code that means something like "an entry was not found". Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. function:: fork() @@ -1559,8 +1461,6 @@ written in Python, such as a mail server's external command delivery program. Send the signal *sig* to the process group *pgid*. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. function:: nice(increment) @@ -1640,8 +1540,6 @@ written in Python, such as a mail server's external command delivery program. Availability: Unix, Windows. :func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp` and :func:`spawnvpe` are not available on Windows. - .. versionadded:: 1.6 - .. data:: P_NOWAIT P_NOWAITO @@ -1651,8 +1549,6 @@ written in Python, such as a mail server's external command delivery program. will return as soon as the new process has been created, with the process ID as the return value. Availability: Macintosh, Unix, Windows. - .. versionadded:: 1.6 - .. data:: P_WAIT @@ -1662,8 +1558,6 @@ written in Python, such as a mail server's external command delivery program. of the process the run is successful, or ``-signal`` if a signal kills the process. Availability: Macintosh, Unix, Windows. - .. versionadded:: 1.6 - .. data:: P_DETACH P_OVERLAY @@ -1675,8 +1569,6 @@ written in Python, such as a mail server's external command delivery program. process will be replaced; the :func:`spawn\*` function will not return. Availability: Windows. - .. versionadded:: 1.6 - .. function:: startfile(path[, operation]) @@ -1700,11 +1592,6 @@ written in Python, such as a mail server's external command delivery program. doesn't work if it is. Use the :func:`os.path.normpath` function to ensure that the path is properly encoded for Win32. Availability: Windows. - .. versionadded:: 2.0 - - .. versionadded:: 2.5 - The *operation* parameter. - .. function:: system(command) @@ -1785,8 +1672,6 @@ written in Python, such as a mail server's external command delivery program. argument is the same as that provided to :func:`waitpid` and :func:`wait4`. Availability: Unix. - .. versionadded:: 2.5 - .. function:: wait4(pid, options) @@ -1796,8 +1681,6 @@ written in Python, such as a mail server's external command delivery program. information. The arguments to :func:`wait4` are the same as those provided to :func:`waitpid`. Availability: Unix. - .. versionadded:: 2.5 - .. data:: WNOHANG @@ -1812,8 +1695,6 @@ written in Python, such as a mail server's external command delivery program. from a job control stop since their status was last reported. Availability: Some Unix systems. - .. versionadded:: 2.3 - .. data:: WUNTRACED @@ -1821,28 +1702,22 @@ written in Python, such as a mail server's external command delivery program. their current state has not been reported since they were stopped. Availability: Macintosh, Unix. - .. versionadded:: 2.3 The following functions take a process status code as returned by :func:`system`, :func:`wait`, or :func:`waitpid` as a parameter. They may be used to determine the disposition of a process. - .. function:: WCOREDUMP(status) Returns ``True`` if a core dump was generated for the process, otherwise it returns ``False``. Availability: Macintosh, Unix. - .. versionadded:: 2.3 - .. function:: WIFCONTINUED(status) Returns ``True`` if the process has been continued from a job control stop, otherwise it returns ``False``. Availability: Unix. - .. versionadded:: 2.3 - .. function:: WIFSTOPPED(status) @@ -1920,8 +1795,6 @@ Miscellaneous System Information 5, and 15 minutes or raises :exc:`OSError` if the load average was unobtainable. - .. versionadded:: 2.3 - .. function:: sysconf(name) @@ -1980,8 +1853,6 @@ Higher-level operations on pathnames are defined in the :mod:`os.path` module. The character which separates the base filename from the extension; for example, the ``'.'`` in :file:`os.py`. Also available via :mod:`os.path`. - .. versionadded:: 2.2 - .. data:: pathsep @@ -2010,8 +1881,6 @@ Higher-level operations on pathnames are defined in the :mod:`os.path` module. The file path of the null device. For example: ``'/dev/null'`` for POSIX or ``'Dev:Nul'`` for Mac OS 9. Also available via :mod:`os.path`. - .. versionadded:: 2.4 - .. _os-miscfunc: @@ -2028,6 +1897,3 @@ Miscellaneous Functions though its exact quality depends on the OS implementation. On a UNIX-like system this will query /dev/urandom, and on Windows it will use CryptGenRandom. If a randomness source is not found, :exc:`NotImplementedError` will be raised. - - .. versionadded:: 2.4 - diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst index de82f00..7be838b 100644 --- a/Doc/library/ossaudiodev.rst +++ b/Doc/library/ossaudiodev.rst @@ -7,8 +7,6 @@ :synopsis: Access to OSS-compatible audio devices. -.. versionadded:: 2.3 - This module allows you to access the OSS (Open Sound System) audio interface. OSS is available for a wide range of open-source and commercial Unices, and is the standard audio interface for Linux and recent versions of FreeBSD. diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index d84c549..4befa4c 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -51,9 +51,6 @@ after normal exit of the program), pdb will restart the program. Automatic restarting preserves pdb's state (such as breakpoints) and in most cases is more useful than quitting the debugger upon program's exit. -.. versionadded:: 2.4 - Restarting post-mortem behavior added. - Typical usage to inspect a crashed program is:: >>> import pdb @@ -252,8 +249,6 @@ commands [*bpnumber*] that are to print a specific message and then continue. If none of the other commands print anything, you see no sign that the breakpoint was reached. - .. versionadded:: 2.5 - s(tep) Execute the current line, stop at the first possible occasion (either in a function that is called or on the next line in the current function). @@ -338,8 +333,6 @@ run [*args* ...] with "shlex" and the result is used as the new sys.argv. History, breakpoints, actions and debugger options are preserved. "restart" is an alias for "run". - .. versionadded:: 2.6 - q(uit) Quit from the debugger. The program being executed is aborted. diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst index 1872724..844e9c4 100644 --- a/Doc/library/pickle.rst +++ b/Doc/library/pickle.rst @@ -130,9 +130,6 @@ If a *protocol* is not specified, protocol 0 is used. If *protocol* is specified as a negative value or :const:`HIGHEST_PROTOCOL`, the highest protocol version available will be used. -.. versionchanged:: 2.3 - Introduced the *protocol* parameter. - A binary format, which is slightly more efficient, can be chosen by specifying a *protocol* version >= 1. @@ -151,8 +148,6 @@ an unpickler, then you call the unpickler's :meth:`load` method. The The highest protocol version available. This value can be passed as a *protocol* value. - .. versionadded:: 2.3 - .. note:: Be sure to always open pickle files created with protocols >= 1 in binary mode. @@ -176,9 +171,6 @@ process more convenient: specified as a negative value or :const:`HIGHEST_PROTOCOL`, the highest protocol version will be used. - .. versionchanged:: 2.3 - Introduced the *protocol* parameter. - *file* must have a :meth:`write` method that accepts a single string argument. It can thus be a file object opened for writing, a :mod:`StringIO` object, or any other custom object that meets this interface. @@ -209,9 +201,6 @@ process more convenient: specified as a negative value or :const:`HIGHEST_PROTOCOL`, the highest protocol version will be used. - .. versionchanged:: 2.3 - The *protocol* parameter was added. - .. function:: loads(string) @@ -252,9 +241,6 @@ The :mod:`pickle` module also exports two callables [#]_, :class:`Pickler` and specified as a negative value or :const:`HIGHEST_PROTOCOL`, the highest protocol version will be used. - .. versionchanged:: 2.3 - Introduced the *protocol* parameter. - *file* must have a :meth:`write` method that accepts a single string argument. It can thus be an open file object, a :mod:`StringIO` object, or any other custom object that meets this interface. @@ -494,10 +480,7 @@ value. The semantics of each element are: :exc:`UnpicklingError` will be raised in the unpickling environment. Note that as usual, the callable itself is pickled by name. -* A tuple of arguments for the callable object. - - .. versionchanged:: 2.5 - Formerly, this argument could also be ``None``. +* A tuple of arguments for the callable object, not ``None``. * Optionally, the object's state, which will be passed to the object's :meth:`__setstate__` method as described in section :ref:`pickle-inst`. If the diff --git a/Doc/library/pickletools.rst b/Doc/library/pickletools.rst index ec220d9..6202a0e 100644 --- a/Doc/library/pickletools.rst +++ b/Doc/library/pickletools.rst @@ -7,8 +7,6 @@ opcodes, as well as some useful functions. -.. versionadded:: 2.3 - This module contains various constants relating to the intimate details of the :mod:`pickle` module, some lengthy comments about the implementation, and a few useful functions for analyzing pickled data. The contents of this module are diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst index 1fbfb04..3ef1354 100644 --- a/Doc/library/pkgutil.rst +++ b/Doc/library/pkgutil.rst @@ -6,8 +6,6 @@ :synopsis: Utilities to support extension of packages. -.. versionadded:: 2.3 - This module provides a single function: diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index a4570d2..a668075 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Bjorn Pettersen <bpettersen@corp.fairisaac.com> -.. versionadded:: 2.3 - .. note:: Specific platforms listed alphabetically, with Linux included in the Unix @@ -93,23 +91,17 @@ Cross Platform Returns a string identifying the Python implementation SCM branch. - .. versionadded:: 2.6 - .. function:: python_implementation() Returns a string identifying the Python implementation. Possible return values are: 'CPython', 'IronPython', 'Jython' - .. versionadded:: 2.6 - .. function:: python_revision() Returns a string identifying the Python implementation SCM revision. - .. versionadded:: 2.6 - .. function:: python_version() diff --git a/Doc/library/poplib.rst b/Doc/library/poplib.rst index 5716204..e9466b7 100644 --- a/Doc/library/poplib.rst +++ b/Doc/library/poplib.rst @@ -37,9 +37,6 @@ A single class is provided by the :mod:`poplib` module: connection attempt (if not specified, or passed as None, the global default timeout setting will be used). - .. versionchanged:: 2.6 - *timeout* was added. - .. class:: POP3_SSL(host[, port[, keyfile[, certfile]]]) @@ -48,7 +45,6 @@ A single class is provided by the :mod:`poplib` module: port is used. *keyfile* and *certfile* are also optional - they can contain a PEM formatted private key and certificate chain file for the SSL connection. - .. versionadded:: 2.4 One exception is defined as an attribute of the :mod:`poplib` module: diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst index 3630176..3703c1c 100644 --- a/Doc/library/pprint.rst +++ b/Doc/library/pprint.rst @@ -20,10 +20,7 @@ breaks them onto multiple lines if they don't fit within the allowed width. Construct :class:`PrettyPrinter` objects explicitly if you need to adjust the width constraint. -.. versionchanged:: 2.5 - Dictionaries are sorted by key before the display is computed; before 2.5, a - dictionary was sorted only if its display required more than one line, although - that wasn't documented. +Dictionaries are sorted by key before the display is computed. The :mod:`pprint` module defines one class: @@ -84,9 +81,6 @@ The :class:`PrettyPrinter` class supports several derivative functions: and *depth* will be passed to the :class:`PrettyPrinter` constructor as formatting parameters. - .. versionchanged:: 2.4 - The parameters *indent*, *width* and *depth* were added. - .. function:: pprint(object[, stream[, indent[, width[, depth]]]]) @@ -107,9 +101,6 @@ The :class:`PrettyPrinter` class supports several derivative functions: '/usr/local/lib/python1.5/sharedmodules', '/usr/local/lib/python1.5/tkinter'] - .. versionchanged:: 2.4 - The parameters *indent*, *width* and *depth* were added. - .. function:: isreadable(object) @@ -208,6 +199,3 @@ are converted to strings. The default implementation uses the internals of the is no requested limit. This argument should be passed unmodified to recursive calls. The fourth argument, *level*, gives the current level; recursive calls should be passed a value less than that of the current call. - - .. versionadded:: 2.3 - diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 2ab24c5..4fbcf77 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -62,22 +62,13 @@ The Python standard library provides three different profilers: #. :mod:`profile`, a pure Python module, described in the sequel. Copyright © 1994, by InfoSeek Corporation. - .. versionchanged:: 2.4 - also reports the time spent in calls to built-in functions and methods. - #. :mod:`cProfile`, a module written in C, with a reasonable overhead that makes it suitable for profiling long-running programs. Based on :mod:`lsprof`, contributed by Brett Rosen and Ted Czotter. - .. versionadded:: 2.5 - #. :mod:`hotshot`, a C module focusing on minimizing the overhead while profiling, at the expense of long data post-processing times. - .. versionchanged:: 2.5 - the results should be more meaningful than in the past: the timing core - contained a critical bug. - The :mod:`profile` and :mod:`cProfile` modules export the same interface, so they are mostly interchangeables; :mod:`cProfile` has a much lower overhead but is not so far as well-tested and might not be available on all systems. @@ -376,11 +367,6 @@ Analysis of the profiler data is done using the :class:`Stats` class. a single report. If additional files need to be combined with data in an existing :class:`Stats` object, the :meth:`add` method can be used. - .. % (such as the old system profiler). - - .. versionchanged:: 2.5 - The *stream* parameter was added. - .. _profile-stats: @@ -419,8 +405,6 @@ The :class:`Stats` Class exists. This is equivalent to the method of the same name on the :class:`profile.Profile` and :class:`cProfile.Profile` classes. - .. versionadded:: 2.3 - .. method:: Stats.sort_stats(key[, ...]) diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst index 2df127c..4d74397 100644 --- a/Doc/library/pydoc.rst +++ b/Doc/library/pydoc.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Ka-Ping Yee <ping@lfw.org> -.. versionadded:: 2.1 - .. index:: single: documentation; generation single: documentation; online diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst index 87ed501..cfee364 100644 --- a/Doc/library/pyexpat.rst +++ b/Doc/library/pyexpat.rst @@ -16,8 +16,6 @@ .. % should be marked using the \member macro and should not include the .. % parentheses used when marking functions and methods. -.. versionadded:: 2.0 - .. index:: single: Expat The :mod:`xml.parsers.expat` module is a Python interface to the Expat @@ -147,8 +145,6 @@ XMLParser Objects in the encoding of the entity which contains the text. When called while an event handler is not active, the return value is ``None``. - .. versionadded:: 2.1 - .. method:: xmlparser.ExternalEntityParserCreate(context[, encoding]) @@ -177,8 +173,6 @@ XMLParser Objects :exc:`ExpatError` to be raised with the :attr:`code` attribute set to :const:`errors.XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING`. - .. versionadded:: 2.3 - :class:`xmlparser` objects have the following attributes: @@ -187,8 +181,6 @@ XMLParser Objects The size of the buffer used when :attr:`buffer_text` is true. This value cannot be changed at this time. - .. versionadded:: 2.3 - .. attribute:: xmlparser.buffer_text @@ -199,8 +191,6 @@ XMLParser Objects at every line ending. This attribute is false by default, and may be changed at any time. - .. versionadded:: 2.3 - .. attribute:: xmlparser.buffer_used @@ -208,8 +198,6 @@ XMLParser Objects These bytes represent UTF-8 encoded text. This attribute has no meaningful interpretation when :attr:`buffer_text` is false. - .. versionadded:: 2.3 - .. attribute:: xmlparser.ordered_attributes @@ -220,8 +208,6 @@ XMLParser Objects module also used this format.) By default, this attribute is false; it may be changed at any time. - .. versionadded:: 2.1 - .. attribute:: xmlparser.specified_attributes @@ -232,7 +218,6 @@ XMLParser Objects needed to comply with the standards for the behavior of XML processors. By default, this attribute is false; it may be changed at any time. - .. versionadded:: 2.1 The following attributes contain values relating to the most recent error encountered by an :class:`xmlparser` object, and will only have correct values @@ -268,8 +253,6 @@ the event. When called outside of a callback, the position indicated will be just past the last parse event (regardless of whether there was an associated callback). -.. versionadded:: 2.4 - .. attribute:: xmlparser.CurrentByteIndex @@ -302,8 +285,6 @@ otherwise stated. or ``-1`` if the standalone clause was omitted. This is only available with Expat version 1.95.0 or newer. - .. versionadded:: 2.1 - .. method:: xmlparser.StartDoctypeDeclHandler(doctypeName, systemId, publicId, has_internal_subset) @@ -386,8 +367,6 @@ otherwise stated. general entities). This is only available starting with version 1.95.0 of the Expat library. - .. versionadded:: 2.1 - .. method:: xmlparser.NotationDeclHandler(notationName, base, systemId, publicId) @@ -491,23 +470,17 @@ ExpatError Exceptions Expat's internal error number for the specific error. This will match one of the constants defined in the ``errors`` object from this module. - .. versionadded:: 2.1 - .. attribute:: ExpatError.lineno Line number on which the error was detected. The first line is numbered ``1``. - .. versionadded:: 2.1 - .. attribute:: ExpatError.offset Character offset into the line where the error occurred. The first column is numbered ``0``. - .. versionadded:: 2.1 - .. _expat-example: diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst index c7b65fd..c183860 100644 --- a/Doc/library/queue.rst +++ b/Doc/library/queue.rst @@ -74,9 +74,6 @@ See the source code for details. The public methods are: immediately available, else raise the :exc:`Full` exception (*timeout* is ignored in that case). - .. versionadded:: 2.3 - The *timeout* parameter. - .. method:: Queue.put_nowait(item) @@ -92,9 +89,6 @@ See the source code for details. The public methods are: Otherwise (*block* is false), return an item if one is immediately available, else raise the :exc:`Empty` exception (*timeout* is ignored in that case). - .. versionadded:: 2.3 - The *timeout* parameter. - .. method:: Queue.get_nowait() @@ -117,8 +111,6 @@ fully processed by daemon consumer threads. Raises a :exc:`ValueError` if called more times than there were items placed in the queue. - .. versionadded:: 2.5 - .. method:: Queue.join() @@ -129,7 +121,6 @@ fully processed by daemon consumer threads. indicate that the item was retrieved and all work on it is complete. When the count of unfinished tasks drops to zero, join() unblocks. - .. versionadded:: 2.5 Example of how to wait for enqueued tasks to be completed:: diff --git a/Doc/library/random.rst b/Doc/library/random.rst index c5d289c..4d58e13 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -39,9 +39,6 @@ basic generator of your own devising: in that case, override the :meth:`random`, Optionally, a new generator can supply a :meth:`getrandombits` method --- this allows :meth:`randrange` to produce selections over an arbitrarily large range. -.. versionadded:: 2.4 - the :meth:`getrandombits` method. - As an example of subclassing, the :mod:`random` module provides the :class:`WichmannHill` class that implements an alternative generator in pure Python. The class provides a backward compatible way to reproduce results from @@ -51,9 +48,6 @@ its period is too short by contemporary standards, and the sequence generated is known to fail some stringent randomness tests. See the references below for a recent variant that repairs these flaws. -.. versionchanged:: 2.3 - Substituted MersenneTwister for Wichmann-Hill. - Bookkeeping functions: @@ -66,9 +60,6 @@ Bookkeeping functions: they are used instead of the system time (see the :func:`os.urandom` function for details on availability). - .. versionchanged:: 2.4 - formerly, operating system resources were not used. - If *x* is not ``None`` or an int or long, ``hash(x)`` is used instead. If *x* is an int or long, *x* is used directly. @@ -78,8 +69,6 @@ Bookkeeping functions: Return an object capturing the current internal state of the generator. This object can be passed to :func:`setstate` to restore the state. - .. versionadded:: 2.1 - .. function:: setstate(state) @@ -87,8 +76,6 @@ Bookkeeping functions: :func:`setstate` restores the internal state of the generator to what it was at the time :func:`setstate` was called. - .. versionadded:: 2.1 - .. function:: jumpahead(n) @@ -100,12 +87,6 @@ Bookkeeping functions: same internal state, and then :meth:`jumpahead` can be used to force the instances' states far apart. - .. versionadded:: 2.1 - - .. versionchanged:: 2.3 - Instead of jumping to a specific state, *n* steps ahead, ``jumpahead(n)`` - jumps to another state likely to be separated by many steps. - .. function:: getrandbits(k) @@ -114,26 +95,22 @@ Bookkeeping functions: as an optional part of the API. When available, :meth:`getrandbits` enables :meth:`randrange` to handle arbitrarily large ranges. - .. versionadded:: 2.4 Functions for integers: - .. function:: randrange([start,] stop[, step]) Return a randomly selected element from ``range(start, stop, step)``. This is equivalent to ``choice(range(start, stop, step))``, but doesn't actually build a range object. - .. versionadded:: 1.5.2 - .. function:: randint(a, b) Return a random integer *N* such that ``a <= N <= b``. -Functions for sequences: +Functions for sequences: .. function:: choice(seq) @@ -157,8 +134,6 @@ Functions for sequences: Return a *k* length list of unique elements chosen from the population sequence. Used for random sampling without replacement. - .. versionadded:: 2.3 - Returns a new list containing elements from the population while leaving the original population unchanged. The resulting list is in selection order so that all sub-slices will also be valid random samples. This allows raffle winners @@ -274,7 +249,6 @@ Alternative Generators: The :meth:`getstate` and :meth:`setstate` methods raise :exc:`NotImplementedError` if called. - .. versionadded:: 2.4 Examples of basic usage:: diff --git a/Doc/library/re.rst b/Doc/library/re.rst index b0b8513..fef6d2d 100644 --- a/Doc/library/re.rst +++ b/Doc/library/re.rst @@ -287,7 +287,6 @@ The special characters are: matching pattern, which will match with ``'<user@host.com>'`` as well as ``'user@host.com'``, but not with ``'<user@host.com'``. - .. versionadded:: 2.4 The special sequences consist of ``'\'`` and a character from the list below. If the ordinary character is not on the list, then the resulting RE will match @@ -492,8 +491,6 @@ form. Make ``\w``, ``\W``, ``\b``, ``\B``, ``\d``, ``\D``, ``\s`` and ``\S`` dependent on the Unicode character properties database. - .. versionadded:: 2.0 - .. data:: X VERBOSE @@ -557,11 +554,6 @@ form. a list of tuples if the pattern has more than one group. Empty matches are included in the result unless they touch the beginning of another match. - .. versionadded:: 1.5.2 - - .. versionchanged:: 2.4 - Added the optional flags argument. - .. function:: finditer(pattern, string[, flags]) @@ -569,11 +561,6 @@ form. *string*. For each match, the iterator returns a match object. Empty matches are included in the result unless they touch the beginning of another match. - .. versionadded:: 2.2 - - .. versionchanged:: 2.4 - Added the optional flags argument. - .. function:: sub(pattern, repl, string[, count]) diff --git a/Doc/library/readline.rst b/Doc/library/readline.rst index 9a40747..ed2027d 100644 --- a/Doc/library/readline.rst +++ b/Doc/library/readline.rst @@ -54,8 +54,6 @@ The :mod:`readline` module defines the following functions: Clear the current history. (Note: this function is not available if the installed version of GNU readline doesn't support it.) - .. versionadded:: 2.4 - .. function:: get_history_length() @@ -76,37 +74,27 @@ The :mod:`readline` module defines the following functions: :func:`get_history_length`, which returns the maximum number of lines that will be written to a history file.) - .. versionadded:: 2.3 - .. function:: get_history_item(index) Return the current contents of history item at *index*. - .. versionadded:: 2.3 - .. function:: remove_history_item(pos) Remove history item specified by its position from the history. - .. versionadded:: 2.4 - .. function:: replace_history_item(pos, line) Replace history item specified by its position with the given line. - .. versionadded:: 2.4 - .. function:: redisplay() Change what's displayed on the screen to reflect the current contents of the line buffer. - .. versionadded:: 2.3 - .. function:: set_startup_hook([function]) @@ -139,8 +127,6 @@ The :mod:`readline` module defines the following functions: Get the completer function, or ``None`` if no completer function has been set. - .. versionadded:: 2.3 - .. function:: get_begidx() diff --git a/Doc/library/repr.rst b/Doc/library/repr.rst index 493e2b3..ae4ce65 100644 --- a/Doc/library/repr.rst +++ b/Doc/library/repr.rst @@ -62,9 +62,6 @@ which format specific object types. default is ``4`` for :attr:`maxdict`, ``5`` for :attr:`maxarray`, and ``6`` for the others. - .. versionadded:: 2.4 - :attr:`maxset`, :attr:`maxfrozenset`, and :attr:`set`. - .. attribute:: Repr.maxlong diff --git a/Doc/library/resource.rst b/Doc/library/resource.rst index 834dace..fbd7204 100644 --- a/Doc/library/resource.rst +++ b/Doc/library/resource.rst @@ -203,9 +203,6 @@ These functions are used to retrieve resource usage information: This function will raise a :exc:`ValueError` if an invalid *who* parameter is specified. It may also raise :exc:`error` exception in unusual circumstances. - .. versionchanged:: 2.3 - Added access to values as attributes of the returned object. - .. function:: getpagesize() diff --git a/Doc/library/runpy.rst b/Doc/library/runpy.rst index cfaab94..d476879 100644 --- a/Doc/library/runpy.rst +++ b/Doc/library/runpy.rst @@ -6,8 +6,6 @@ .. moduleauthor:: Nick Coghlan <ncoghlan@gmail.com> -.. versionadded:: 2.5 - The :mod:`runpy` module is used to locate and run Python modules without importing them first. Its main use is to implement the :option:`-m` command line switch that allows scripts to be located using the Python module namespace diff --git a/Doc/library/sgmllib.rst b/Doc/library/sgmllib.rst index c0ef1a2..637aa91 100644 --- a/Doc/library/sgmllib.rst +++ b/Doc/library/sgmllib.rst @@ -40,8 +40,6 @@ A single exception is defined as well: Exception raised by the :class:`SGMLParser` class when it encounters an error while parsing. - .. versionadded:: 2.1 - :class:`SGMLParser` instances have the following methods: @@ -106,9 +104,6 @@ A single exception is defined as well: base implementation simply calls *method* with *attributes* as the only argument. - .. versionadded:: 2.5 - Handling of entity and character references within attribute values. - .. method:: SGMLParser.handle_endtag(tag, method) @@ -133,9 +128,6 @@ A single exception is defined as well: a string. If that method returns a string, it is passed to :meth:`handle_data`, otherwise ``unknown_charref(ref)`` is called to handle the error. - .. versionchanged:: 2.5 - Use :meth:`convert_charref` instead of hard-coding the conversion. - .. method:: SGMLParser.convert_charref(ref) @@ -146,16 +138,12 @@ A single exception is defined as well: method returns ``None``. This method is called by the default :meth:`handle_charref` implementation and by the attribute value parser. - .. versionadded:: 2.5 - .. method:: SGMLParser.convert_codepoint(codepoint) Convert a codepoint to a :class:`str` value. Encodings can be handled here if appropriate, though the rest of :mod:`sgmllib` is oblivious on this matter. - .. versionadded:: 2.5 - .. method:: SGMLParser.handle_entityref(ref) @@ -166,9 +154,6 @@ A single exception is defined as well: method ``unknown_entityref(ref)``. The default :attr:`entitydefs` defines translations for ``&``, ``&apos``, ``>``, ``<``, and ``"``. - .. versionchanged:: 2.5 - Use :meth:`convert_entityref` instead of hard-coding the conversion. - .. method:: SGMLParser.convert_entityref(ref) @@ -180,8 +165,6 @@ A single exception is defined as well: ``None``. This method is called by the default :meth:`handle_entityref` implementation and by the attribute value parser. - .. versionadded:: 2.5 - .. method:: SGMLParser.handle_comment(comment) diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst index 1776b7d..8aa2cf7 100644 --- a/Doc/library/shelve.rst +++ b/Doc/library/shelve.rst @@ -26,9 +26,6 @@ lots of shared sub-objects. The keys are ordinary strings. By default, version 0 pickles are used to serialize values. The version of the pickle protocol can be specified with the *protocol* parameter. - .. versionchanged:: 2.3 - The *protocol* parameter was added. - By default, mutations to persistent-dictionary mutable entries are not automatically written back. If the optional *writeback* parameter is set to *True*, all entries accessed are cached in memory, and written back at close @@ -90,9 +87,6 @@ Restrictions pickle protocol can be specified with the *protocol* parameter. See the :mod:`pickle` documentation for a discussion of the pickle protocols. - .. versionchanged:: 2.3 - The *protocol* parameter was added. - If the *writeback* parameter is ``True``, the object will hold a cache of all entries accessed and write them back to the *dict* at sync and close times. This allows natural operations on mutable entries, but can consume much more diff --git a/Doc/library/shlex.rst b/Doc/library/shlex.rst index 0ae77c1..4c509d8 100644 --- a/Doc/library/shlex.rst +++ b/Doc/library/shlex.rst @@ -10,8 +10,6 @@ .. sectionauthor:: Gustavo Niemeyer <niemeyer@conectiva.com> -.. versionadded:: 1.5.2 - The :class:`shlex` class makes it easy to write lexical analyzers for simple syntaxes resembling that of the Unix shell. This will often be useful for writing minilanguages, (for example, in run control files for Python @@ -32,11 +30,6 @@ The :mod:`shlex` module defines the following functions: empty string). This function operates in POSIX mode by default, but uses non-POSIX mode if the *posix* argument is false. - .. versionadded:: 2.3 - - .. versionchanged:: 2.6 - Added the *posix* parameter. - .. note:: Since the :func:`split` function instantiates a :class:`shlex` instance, passing @@ -129,16 +122,12 @@ A :class:`shlex` instance has the following methods: specified it will later be available for use in error messages. This is the same method used internally by the :meth:`sourcehook` method. - .. versionadded:: 2.1 - .. method:: shlex.pop_source() Pop the last-pushed input source from the input stack. This is the same method used internally when the lexer reaches EOF on a stacked input stream. - .. versionadded:: 2.1 - .. method:: shlex.error_leader([file[, line]]) @@ -179,8 +168,6 @@ either control lexical analysis or can be used for debugging: Characters that will be considered as escape. This will be only used in POSIX mode, and includes just ``'\'`` by default. - .. versionadded:: 2.3 - .. attribute:: shlex.quotes @@ -195,8 +182,6 @@ either control lexical analysis or can be used for debugging: :attr:`escape`. This is only used in POSIX mode, and includes just ``'"'`` by default. - .. versionadded:: 2.3 - .. attribute:: shlex.whitespace_split @@ -204,8 +189,6 @@ either control lexical analysis or can be used for debugging: example, for parsing command lines with :class:`shlex`, getting tokens in a similar way to shell arguments. - .. versionadded:: 2.3 - .. attribute:: shlex.infile @@ -252,8 +235,6 @@ either control lexical analysis or can be used for debugging: Token used to determine end of file. This will be set to the empty string (``''``), in non-POSIX mode, and to ``None`` in POSIX mode. - .. versionadded:: 2.3 - .. _shlex-parsing-rules: diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 31d898a..2e3fafe 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -82,15 +82,7 @@ copying and removal. files are copied to the new tree. If exception(s) occur, an :exc:`Error` is raised with a list of reasons. - The source code for this should be considered an example rather than a tool. - - .. versionchanged:: 2.3 - :exc:`Error` is raised if any exceptions occur during copying, rather than - printing a message. - - .. versionchanged:: 2.5 - Create intermediate directories needed to create *dst*, rather than raising an - error. Copy permissions and times of directories using :func:`copystat`. + The source code for this should be considered an example rather than a tool. .. function:: rmtree(path[, ignore_errors[, onerror]]) @@ -118,8 +110,6 @@ copying and removal. If the destination is on our current filesystem, then simply use rename. Otherwise, copy src to the dst and then remove src. - .. versionadded:: 2.3 - .. exception:: Error @@ -127,8 +117,6 @@ copying and removal. :func:`copytree`, the exception argument is a list of 3-tuples (*srcname*, *dstname*, *exception*). - .. versionadded:: 2.3 - .. _shutil-example: diff --git a/Doc/library/simplehttpserver.rst b/Doc/library/simplehttpserver.rst index 766253e..aa834dd 100644 --- a/Doc/library/simplehttpserver.rst +++ b/Doc/library/simplehttpserver.rst @@ -75,9 +75,6 @@ The :class:`SimpleHTTPRequestHandler` defines the following methods: For example usage, see the implementation of the :func:`test` function. - .. versionadded:: 2.5 - The ``'Last-Modified'`` header. - .. seealso:: diff --git a/Doc/library/simplexmlrpcserver.rst b/Doc/library/simplexmlrpcserver.rst index 51ce8d8..ec80843 100644 --- a/Doc/library/simplexmlrpcserver.rst +++ b/Doc/library/simplexmlrpcserver.rst @@ -8,15 +8,13 @@ .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> -.. versionadded:: 2.2 - The :mod:`SimpleXMLRPCServer` module provides a basic server framework for XML-RPC servers written in Python. Servers can either be free standing, using :class:`SimpleXMLRPCServer`, or embedded in a CGI environment, using :class:`CGIXMLRPCRequestHandler`. -.. class:: SimpleXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding]]]]) +.. class:: SimpleXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding[, bind_and_activate]]]]]) Create a new server instance. This class provides methods for registration of functions that can be called by the XML-RPC protocol. The *requestHandler* @@ -31,12 +29,6 @@ XML-RPC servers written in Python. Servers can either be free standing, using constructor; it defaults to true. Setting it to false allows code to manipulate the *allow_reuse_address* class variable before the address is bound. - .. versionchanged:: 2.5 - The *allow_none* and *encoding* parameters were added. - - .. versionchanged:: 2.6 - The *bind_and_activate* parameter was added. - .. class:: CGIXMLRPCRequestHandler([allow_none[, encoding]]) @@ -44,11 +36,6 @@ XML-RPC servers written in Python. Servers can either be free standing, using *allow_none* and *encoding* parameters are passed on to :mod:`xmlrpclib` and control the XML-RPC responses that will be returned from the server. - .. versionadded:: 2.3 - - .. versionchanged:: 2.5 - The *allow_none* and *encoding* parameters were added. - .. class:: SimpleXMLRPCRequestHandler() @@ -102,18 +89,12 @@ alone XML-RPC servers. module's global variables and may allow intruders to execute arbitrary code on your machine. Only use this option on a secure, closed network. - .. versionchanged:: 2.3.5, 2.4.1 - *allow_dotted_names* was added to plug a security hole; prior versions are - insecure. - .. method:: SimpleXMLRPCServer.register_introspection_functions() Registers the XML-RPC introspection functions ``system.listMethods``, ``system.methodHelp`` and ``system.methodSignature``. - .. versionadded:: 2.3 - .. method:: SimpleXMLRPCServer.register_multicall_functions() @@ -127,7 +108,6 @@ alone XML-RPC servers. 404 "no such page" HTTP error. If this tuple is empty, all paths will be considered valid. The default value is ``('/', '/RPC2')``. - .. versionadded:: 2.5 Example:: diff --git a/Doc/library/site.rst b/Doc/library/site.rst index 4e54900..cf2892f 100644 --- a/Doc/library/site.rst +++ b/Doc/library/site.rst @@ -34,9 +34,6 @@ directory (rather than a file). No item is added to ``sys.path`` more than once. Blank lines and lines beginning with ``#`` are skipped. Lines starting with ``import`` (followed by space or tab) are executed. -.. versionchanged:: 2.6 - A space or tab is now required after the import keyword. - .. index:: single: package triple: path; configuration; file diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index fd898ca..61b90a8 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -30,9 +30,6 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). For normal use, you should only require the initialization/connect, :meth:`sendmail`, and :meth:`quit` methods. An example is included below. - .. versionchanged:: 2.6 - *timeout* was added. - .. class:: SMTP_SSL([host[, port[, local_hostname[, keyfile[, certfile[, timeout]]]]]]) @@ -46,9 +43,6 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). timeout in seconds for the connection attempt (if not specified, or passed as None, the global default timeout setting will be used). - .. versionchanged:: 2.6 - *timeout* was added. - .. class:: LMTP([host[, port[, local_hostname]]]) @@ -61,7 +55,6 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). socket, LMTP generally don't support or require any authentication, but your mileage might vary. - .. versionadded:: 2.6 A nice selection of exceptions is defined as well: diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 65842d0..f4265b4 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -63,8 +63,7 @@ differently into an actual IPv4/v6 address, depending on the results from DNS resolution and/or the host configuration. For deterministic behavior use a numeric address in *host* portion. -.. versionadded:: 2.5 - AF_NETLINK sockets are represented as pairs ``pid, groups``. +AF_NETLINK sockets are represented as pairs ``pid, groups``. All errors raise exceptions. The normal exceptions for invalid argument types and out-of-memory conditions can be raised; errors related to socket or address @@ -114,8 +113,6 @@ The module :mod:`socket` exports the following constants and functions: timeouts enabled via a prior call to :meth:`settimeout`. The accompanying value is a string whose value is currently always "timed out". - .. versionadded:: 2.3 - .. data:: AF_UNIX AF_INET @@ -164,8 +161,6 @@ The module :mod:`socket` exports the following constants and functions: This constant contains a boolean value which indicates if IPv6 is supported on this platform. - .. versionadded:: 2.3 - .. function:: create_connection(address[, timeout]) @@ -176,8 +171,6 @@ The module :mod:`socket` exports the following constants and functions: instance (if it is not given or ``None``, the global default timeout setting is used). - .. versionadded:: 2.6 - .. function:: getaddrinfo(host, port[, family[, socktype[, proto[, flags]]]]) @@ -200,8 +193,6 @@ The module :mod:`socket` exports the following constants and functions: address, as described above. See the source for :mod:`socket` and other library modules for a typical usage of the function. - .. versionadded:: 2.2 - .. function:: getfqdn([name]) @@ -212,8 +203,6 @@ The module :mod:`socket` exports the following constants and functions: case no fully qualified domain name is available, the hostname as returned by :func:`gethostname` is returned. - .. versionadded:: 2.0 - .. function:: gethostbyname(hostname) @@ -264,8 +253,6 @@ The module :mod:`socket` exports the following constants and functions: or numeric address representation in *host*. Similarly, *port* can contain a string port name or a numeric port number. - .. versionadded:: 2.2 - .. function:: getprotobyname(protocolname) @@ -308,8 +295,6 @@ The module :mod:`socket` exports the following constants and functions: if defined on the platform; otherwise, the default is :const:`AF_INET`. Availability: Unix. - .. versionadded:: 2.4 - .. function:: fromfd(fd, family, type[, proto]) @@ -396,8 +381,6 @@ The module :mod:`socket` exports the following constants and functions: Availability: Unix (maybe not all platforms). - .. versionadded:: 2.3 - .. function:: inet_ntop(address_family, packed_ip) @@ -414,8 +397,6 @@ The module :mod:`socket` exports the following constants and functions: Availability: Unix (maybe not all platforms). - .. versionadded:: 2.3 - .. function:: getdefaulttimeout() @@ -423,8 +404,6 @@ The module :mod:`socket` exports the following constants and functions: of ``None`` indicates that new socket objects have no timeout. When the socket module is first imported, the default is ``None``. - .. versionadded:: 2.3 - .. function:: setdefaulttimeout(timeout) @@ -432,8 +411,6 @@ The module :mod:`socket` exports the following constants and functions: ``None`` indicates that new socket objects have no timeout. When the socket module is first imported, the default is ``None``. - .. versionadded:: 2.3 - .. data:: SocketType @@ -599,8 +576,6 @@ correspond to Unix system calls applicable to sockets. optional argument *flags*; it defaults to zero. (The format of *address* depends on the address family --- see above.) - .. versionadded:: 2.5 - .. method:: socket.recv_into(buffer[, nbytes[, flags]]) @@ -610,8 +585,6 @@ correspond to Unix system calls applicable to sockets. :manpage:`recv(2)` for the meaning of the optional argument *flags*; it defaults to zero. - .. versionadded:: 2.5 - .. method:: socket.send(string[, flags]) @@ -662,8 +635,6 @@ correspond to Unix system calls applicable to sockets. ``s.settimeout(0.0)`` is equivalent to ``s.setblocking(0)``; ``s.settimeout(None)`` is equivalent to ``s.setblocking(1)``. - .. versionadded:: 2.3 - .. method:: socket.gettimeout() @@ -671,7 +642,6 @@ correspond to Unix system calls applicable to sockets. ``None`` if no timeout is set. This reflects the last call to :meth:`setblocking` or :meth:`settimeout`. - .. versionadded:: 2.3 Some notes on socket blocking and timeouts: A socket object can be in one of three modes: blocking, non-blocking, or timeout. Sockets are always created in @@ -724,22 +694,16 @@ values given to the :class:`socket` constructor. The socket family. - .. versionadded:: 2.5 - .. attribute:: socket.type The socket type. - .. versionadded:: 2.5 - .. attribute:: socket.proto The socket protocol. - .. versionadded:: 2.5 - .. _socket-example: diff --git a/Doc/library/spwd.rst b/Doc/library/spwd.rst index 6cbe925..ce51d14 100644 --- a/Doc/library/spwd.rst +++ b/Doc/library/spwd.rst @@ -7,8 +7,6 @@ :synopsis: The shadow password database (getspnam() and friends). -.. versionadded:: 2.5 - This module provides access to the Unix shadow password database. It is available on various Unix versions. diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index a55fe86..b12184c 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -7,8 +7,6 @@ .. sectionauthor:: Gerhard Häring <gh@ghaering.de> -.. versionadded:: 2.5 - SQLite is a C library that provides a lightweight disk-based database that doesn't require a separate server process and allows accessing the database using a nonstandard variant of the SQL query language. Some applications can use diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 8441eff..55ff7cd 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -6,9 +6,6 @@ :synopsis: SSL wrapper for socket objects .. moduleauthor:: Bill Janssen <bill.janssen@gmail.com> - -.. versionadded:: 2.6 - .. sectionauthor:: Bill Janssen <bill.janssen@gmail.com> diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 93d00a3..6a7044f 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -417,8 +417,6 @@ Notes: Iterator Types ============== -.. versionadded:: 2.2 - .. index:: single: iterator protocol single: protocol; iterator @@ -654,9 +652,6 @@ Notes: method which assures consistent linear concatenation performance across versions and implementations. - .. versionchanged:: 2.4 - Formerly, string concatenation never occurred in-place. - .. _string-methods: @@ -680,9 +675,6 @@ the :mod:`re` module for string functions based on regular expressions. Return centered in a string of length *width*. Padding is done using the specified *fillchar* (default is a space). - .. versionchanged:: 2.4 - Support for the *fillchar* argument. - .. method:: str.count(sub[, start[, end]]) @@ -702,12 +694,6 @@ the :mod:`re` module for string functions based on regular expressions. :ref:`codec-base-classes`. For a list of possible encodings, see section :ref:`standard-encodings`. - .. versionadded:: 2.0 - - .. versionchanged:: 2.3 - Support for ``'xmlcharrefreplace'`` and ``'backslashreplace'`` and other error - handling schemes added. - .. method:: str.endswith(suffix[, start[, end]]) @@ -716,9 +702,6 @@ the :mod:`re` module for string functions based on regular expressions. *start*, test beginning at that position. With optional *end*, stop comparing at that position. - .. versionchanged:: 2.5 - Accept tuples as *suffix*. - .. method:: str.expandtabs([tabsize]) @@ -749,8 +732,6 @@ the :mod:`re` module for string functions based on regular expressions. See :ref:`formatstrings` for a description of the various formatting options that can be specified in format strings. - .. versionadded:: 3.0 - .. method:: str.index(sub[, start[, end]]) @@ -818,9 +799,6 @@ the :mod:`re` module for string functions based on regular expressions. using the specified *fillchar* (default is a space). The original string is returned if *width* is less than ``len(s)``. - .. versionchanged:: 2.4 - Support for the *fillchar* argument. - .. method:: str.lower() @@ -839,9 +817,6 @@ the :mod:`re` module for string functions based on regular expressions. >>> 'www.example.com'.lstrip('cmowz.') 'example.com' - .. versionchanged:: 2.2.2 - Support for the *chars* argument. - .. method:: str.partition(sep) @@ -850,8 +825,6 @@ the :mod:`re` module for string functions based on regular expressions. after the separator. If the separator is not found, return a 3-tuple containing the string itself, followed by two empty strings. - .. versionadded:: 2.5 - .. method:: str.replace(old, new[, count]) @@ -879,9 +852,6 @@ the :mod:`re` module for string functions based on regular expressions. using the specified *fillchar* (default is a space). The original string is returned if *width* is less than ``len(s)``. - .. versionchanged:: 2.4 - Support for the *fillchar* argument. - .. method:: str.rpartition(sep) @@ -890,8 +860,6 @@ the :mod:`re` module for string functions based on regular expressions. after the separator. If the separator is not found, return a 3-tuple containing two empty strings, followed by the string itself. - .. versionadded:: 2.5 - .. method:: str.rsplit([sep[, maxsplit]]) @@ -901,8 +869,6 @@ the :mod:`re` module for string functions based on regular expressions. separator. Except for splitting from the right, :meth:`rsplit` behaves like :meth:`split` which is described in detail below. - .. versionadded:: 2.4 - .. method:: str.rstrip([chars]) @@ -916,9 +882,6 @@ the :mod:`re` module for string functions based on regular expressions. >>> 'mississippi'.rstrip('ipz') 'mississ' - .. versionchanged:: 2.2.2 - Support for the *chars* argument. - .. method:: str.split([sep[, maxsplit]]) @@ -955,9 +918,6 @@ the :mod:`re` module for string functions based on regular expressions. test string beginning at that position. With optional *end*, stop comparing string at that position. - .. versionchanged:: 2.5 - Accept tuples as *prefix*. - .. method:: str.strip([chars]) @@ -972,9 +932,6 @@ the :mod:`re` module for string functions based on regular expressions. >>> 'www.example.com'.strip('cmowz.') 'example' - .. versionchanged:: 2.2.2 - Support for the *chars* argument. - .. method:: str.swapcase() @@ -1012,8 +969,6 @@ the :mod:`re` module for string functions based on regular expressions. Return the numeric string left filled with zeros in a string of length *width*. The original string is returned if *width* is less than ``len(s)``. - .. versionadded:: 2.2.2 - .. _old-string-formatting: @@ -1315,18 +1270,11 @@ Notes: length is added, as for slice indices. If it is still negative, it is truncated to zero, as for slice indices. - .. versionchanged:: 2.3 - Previously, :meth:`index` didn't have arguments for specifying start and stop - positions. - (4) When a negative index is passed as the first parameter to the :meth:`insert` method, the sequence length is added, as for slice indices. If it is still negative, it is truncated to zero, as for slice indices. - .. versionchanged:: 2.3 - Previously, all negative indices were truncated to zero. - (5) The optional argument *i* defaults to ``-1``, so that by default the last item is removed and returned. @@ -1359,12 +1307,6 @@ Notes: multiple times for each list element while *key* and *reverse* touch each element only once. - .. versionchanged:: 2.3 - Support for ``None`` as an equivalent to omitting *cmp* was added. - - .. versionchanged:: 2.4 - Support for *key* and *reverse* was added. - Starting with Python 2.3, the :meth:`sort` method is guaranteed to be stable. A sort is stable if it guarantees not to change the relative order of elements that compare equal --- this is helpful for sorting in multiple passes (for @@ -1572,9 +1514,6 @@ symmetric difference. (For other containers see the built in :class:`dict`, :class:`list`, and :class:`tuple` classes, and the :mod:`collections` module.) - -.. versionadded:: 2.4 - Like other collections, sets support ``x in set``, ``len(set)``, and ``for x in set``. Being an unordered collection, sets do not record element position or order of insertion. Accordingly, sets do not support indexing, slicing, or @@ -1796,11 +1735,6 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098: The first example only works for keys that are valid Python identifiers; the others work with any valid keys. - .. versionadded:: 2.2 - - .. versionchanged:: 2.3 - Support for building a dictionary from keyword arguments added. - These are the operations that dictionaries support (and therefore, custom mapping types should support too): @@ -1814,16 +1748,14 @@ types should support too): Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is not in the map. - .. versionadded:: 2.5 - If a subclass of dict defines a method :meth:`__missing__`, if the key - *key* is not present, the ``d[key]`` operation calls that method with the - key *key* as argument. The ``d[key]`` operation then returns or raises - whatever is returned or raised by the ``__missing__(key)`` call if the key - is not present. No other operations or methods invoke - :meth:`__missing__`. If :meth:`__missing__` is not defined, - :exc:`KeyError` is raised. :meth:`__missing__` must be a method; it - cannot be an instance variable. For an example, see - :class:`collections.defaultdict`. + If a subclass of dict defines a method :meth:`__missing__`, if the key *key* + is not present, the ``d[key]`` operation calls that method with the key *key* + as argument. The ``d[key]`` operation then returns or raises whatever is + returned or raised by the ``__missing__(key)`` call if the key is not + present. No other operations or methods invoke :meth:`__missing__`. If + :meth:`__missing__` is not defined, :exc:`KeyError` is raised. + :meth:`__missing__` must be a method; it cannot be an instance variable. For + an example, see :class:`collections.defaultdict`. .. describe:: d[key] = value @@ -1838,14 +1770,10 @@ types should support too): Return ``True`` if *d* has a key *key*, else ``False``. - .. versionadded:: 2.2 - .. describe:: key not in d Equivalent to ``not key in d``. - .. versionadded:: 2.2 - .. method:: dict.clear() Remove all items from the dictionary. @@ -1861,8 +1789,6 @@ types should support too): :func:`fromkeys` is a class method that returns a new dictionary. *value* defaults to ``None``. - .. versionadded:: 2.3 - .. method:: dict.get(key[, default]) Return the value for *key* if *key* is in the dictionary, else *default*. If @@ -1895,22 +1821,16 @@ types should support too): Return an iterator over the dictionary's ``(key, value)`` pairs. See the note for :meth:`dict.items`. - .. versionadded:: 2.2 - .. method:: dict.iterkeys() Return an iterator over the dictionary's keys. See the note for :meth:`dict.items`. - .. versionadded:: 2.2 - .. method:: dict.itervalues() Return an iterator over the dictionary's values. See the note for :meth:`dict.items`. - .. versionadded:: 2.2 - .. method:: dict.keys() Return a copy of the dictionary's list of keys. See the note for @@ -1922,8 +1842,6 @@ types should support too): *default*. If *default* is not given and *key* is not in the dictionary, a :exc:`KeyError` is raised. - .. versionadded:: 2.3 - .. method:: dict.popitem() Remove and return an arbitrary ``(key, value)`` pair from the dictionary. @@ -1947,10 +1865,6 @@ types should support too): arguments are specified, the dictionary is then is updated with those key/value pairs: ``d.update(red=1, blue=2)``. - .. versionchanged:: 2.4 - Allowed the argument to be an iterable of key/value pairs and allowed - keyword arguments. - .. method:: dict.values() Return a copy of the dictionary's list of values. See the note for @@ -2068,8 +1982,6 @@ Files have the following methods: right. However, using :meth:`seek` to reposition the file to an absolute position will flush the read-ahead buffer. - .. versionadded:: 2.3 - .. method:: file.read([size]) @@ -2124,9 +2036,6 @@ Files have the following methods: Note that not all file objects are seekable. - .. versionchanged:: 2.6 - Passing float values as offset has been deprecated - .. method:: file.tell() @@ -2191,8 +2100,6 @@ the particular object. on all file-like objects. It may also be ``None``, in which case the file uses the system default encoding for converting Unicode strings. - .. versionadded:: 2.3 - .. attribute:: file.mode @@ -2243,8 +2150,6 @@ the particular object. Context Manager Types ===================== -.. versionadded:: 2.5 - .. index:: single: context manager single: context management protocol diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 2e1b529..7810e46 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -178,7 +178,6 @@ formatting behaviors using the same implementation as the built-in (as in the tuple returned by the :meth:`parse` method.) The default version understands 'r' (repr) and 's' (str) conversion types. - .. versionadded:: 3.0 .. _formatstrings: @@ -274,7 +273,6 @@ Which is subsitituted into the string, yielding:: (The extra space is because we specified a field width of 10, and because left alignment is the default for strings.) -.. versionadded:: 3.0 .. _formatspec: @@ -446,8 +444,6 @@ Instead of the normal ``%``\ -based substitutions, Templates support ``$``\ Any other appearance of ``$`` in the string will result in a :exc:`ValueError` being raised. -.. versionadded:: 2.4 - The :mod:`string` module provides a :class:`Template` class that implements these rules. The methods of :class:`Template` are: diff --git a/Doc/library/stringprep.rst b/Doc/library/stringprep.rst index d2f269c..cf49ad7 100644 --- a/Doc/library/stringprep.rst +++ b/Doc/library/stringprep.rst @@ -9,8 +9,6 @@ .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> -.. versionadded:: 2.3 - When identifying things (such as host names) in the internet, it is often necessary to compare such identifications for "equality". Exactly how this comparison is executed may depend on the application domain, e.g. whether it diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst index 9cf4eb2..b28f9b4 100644 --- a/Doc/library/struct.rst +++ b/Doc/library/struct.rst @@ -37,8 +37,6 @@ The module defines the following exception and functions: bytes into the writable *buffer* starting at *offset*. Note that the offset is a required argument. - .. versionadded:: 2.5 - .. function:: unpack(fmt, string) @@ -55,8 +53,6 @@ The module defines the following exception and functions: of data required by the format (``len(buffer[offset:])`` must be at least ``calcsize(fmt)``). - .. versionadded:: 2.5 - .. function:: calcsize(fmt) @@ -114,15 +110,11 @@ Notes: C99. If this type is not available, it is simulated using a :ctype:`char`. In standard mode, it is always represented by one byte. - .. versionadded:: 2.6 - (2) The ``'q'`` and ``'Q'`` conversion codes are available in native mode only if the platform C compiler supports C :ctype:`long long`, or, on Windows, :ctype:`__int64`. They are always available in standard modes. - .. versionadded:: 2.2 - A format character may be preceded by an integral repeat count. For example, the format string ``'4h'`` means exactly the same as ``'hhhh'``. @@ -258,11 +250,9 @@ The :mod:`struct` module also defines the following type: is more efficient than calling the :mod:`struct` functions with the same format since the format string only needs to be compiled once. - .. versionadded:: 2.5 Compiled Struct objects support the following methods and attributes: - .. method:: Struct.pack(v1, v2, ...) Identical to the :func:`pack` function, using the compiled format. diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index a3bc2cb..dfd21a2 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Peter Åstrand <astrand@lysator.liu.se> -.. versionadded:: 2.4 - The :mod:`subprocess` module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes. This module intends to replace several other, older modules and functions, such as:: @@ -138,8 +136,6 @@ This module also defines two shortcut functions: check_call(["ls", "-l"]) - .. versionadded:: 2.5 - Exceptions ^^^^^^^^^^ diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 5184c25..c2a0a6e 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -29,8 +29,6 @@ always available. big-endian (most-significant byte first) platforms, and ``'little'`` on little-endian (least-significant byte first) platforms. - .. versionadded:: 2.0 - .. data:: subversion @@ -43,8 +41,6 @@ always available. exported (or svnversion was not available), it is the revision of ``Include/patchlevel.h`` if the branch is a tag. Otherwise, it is ``None``. - .. versionadded:: 2.5 - .. data:: builtin_module_names @@ -73,8 +69,6 @@ always available. This function should be used for internal and specialized purposes only. - .. versionadded:: 2.5 - .. data:: dllhandle @@ -194,16 +188,12 @@ always available. Return the interpreter's "check interval"; see :func:`setcheckinterval`. - .. versionadded:: 2.3 - .. function:: getdefaultencoding() Return the name of the current default string encoding used by the Unicode implementation. - .. versionadded:: 2.0 - .. function:: getdlopenflags() @@ -211,8 +201,6 @@ always available. The flag constants are defined in the :mod:`dl` and :mod:`DLFCN` modules. Availability: Unix. - .. versionadded:: 2.2 - .. function:: getfilesystemencoding() @@ -232,8 +220,6 @@ always available. the encoding that applications should use when they explicitly want to convert Unicode strings to byte strings that are equivalent when used as file names. - .. versionadded:: 2.3 - .. function:: getrefcount(object) @@ -285,8 +271,6 @@ always available. Availability: Windows. - .. versionadded:: 2.3 - .. data:: hexversion @@ -306,8 +290,6 @@ always available. ``version_info`` value may be used for a more human-friendly encoding of the same information. - .. versionadded:: 1.5.2 - .. function:: intern(string) @@ -319,10 +301,8 @@ always available. names used in Python programs are automatically interned, and the dictionaries used to hold module, class or instance attributes have interned keys. - .. versionchanged:: 2.3 - Interned strings are not immortal (like they used to be in Python 2.2 and - before); you must keep a reference to the return value of :func:`intern` around - to benefit from it. + Interned strings are not immortal; you must keep a reference to the return + value of :func:`intern` around to benefit from it. .. data:: last_type @@ -381,9 +361,6 @@ always available. A program is free to modify this list for its own purposes. - .. versionchanged:: 2.3 - Unicode strings are no longer ignored. - .. data:: platform @@ -441,8 +418,6 @@ always available. .. % the \programopt{-S} option is passed to the interpreter, in which .. % case this function will remain available. - .. versionadded:: 2.0 - .. function:: setdlopenflags(n) @@ -456,8 +431,6 @@ always available. :file:`/usr/include/dlfcn.h` using the :program:`h2py` script. Availability: Unix. - .. versionadded:: 2.2 - .. function:: setprofile(profilefunc) @@ -515,8 +488,6 @@ always available. available only if Python was compiled with :option:`--with-tsc`. To understand the output of this dump, read :file:`Python/ceval.c` in the Python sources. - .. versionadded:: 2.4 - .. data:: stdin stdout @@ -569,8 +540,6 @@ always available. The C API version for this interpreter. Programmers may find this useful when debugging version conflicts between Python and extension modules. - .. versionadded:: 2.3 - .. data:: version_info @@ -580,8 +549,6 @@ always available. ``'final'``. The ``version_info`` value corresponding to the Python version 2.0 is ``(2, 0, 0, 'final', 0)``. - .. versionadded:: 2.0 - .. data:: warnoptions diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index 85c0674..dcd62a0 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -7,8 +7,6 @@ :synopsis: Read and write tar-format archive files. -.. versionadded:: 2.3 - .. moduleauthor:: Lars Gustäbel <lars@gustaebel.de> .. sectionauthor:: Lars Gustäbel <lars@gustaebel.de> @@ -25,8 +23,6 @@ Some facts and figures: * read/write support for the POSIX.1-2001 (pax) format. - .. versionadded:: 2.6 - * handles directories, regular files, hardlinks, symbolic links, fifos, character devices and block devices and is able to acquire and restore file information like timestamp, access permissions and owner. @@ -172,7 +168,6 @@ Some facts and figures: Is raised by :meth:`frombuf` if the buffer it gets is invalid. - .. versionadded:: 2.6 Each of the following constants defines a tar archive format that the :mod:`tarfile` module is able to create. See section :ref:`tar-formats` for @@ -248,13 +243,9 @@ object, see :ref:`tarinfo-objects` for details. :const:`USTAR_FORMAT`, :const:`GNU_FORMAT` or :const:`PAX_FORMAT` that are defined at module level. - .. versionadded:: 2.6 - The *tarinfo* argument can be used to replace the default :class:`TarInfo` class with a different one. - .. versionadded:: 2.6 - If *dereference* is ``False``, add symbolic and hard links to the archive. If it is ``True``, add the content of the target files to the archive. This has no effect on systems that do not support symbolic links. @@ -277,13 +268,9 @@ object, see :ref:`tarinfo-objects` for details. to be handled. The default settings will work for most users. See section :ref:`tar-unicode` for in-depth information. - .. versionadded:: 2.6 - The *pax_headers* argument is an optional dictionary of strings which will be added as a pax global header if *format* is :const:`PAX_FORMAT`. - .. versionadded:: 2.6 - .. method:: TarFile.open(...) @@ -345,8 +332,6 @@ object, see :ref:`tarinfo-objects` for details. that have absolute filenames starting with ``"/"`` or filenames with two dots ``".."``. - .. versionadded:: 2.5 - .. method:: TarFile.extract(member[, path]) @@ -384,14 +369,11 @@ object, see :ref:`tarinfo-objects` for details. Add the file *name* to the archive. *name* may be any type of file (directory, fifo, symbolic link, etc.). If given, *arcname* specifies an alternative name for the file in the archive. Directories are added recursively by default. This - can be avoided by setting *recursive* to :const:`False`. If *exclude* is given + can be avoided by setting *recursive* to :const:`False`. If *exclude* is given, it must be a function that takes one filename argument and returns a boolean value. Depending on this value the respective file is either excluded (:const:`True`) or added (:const:`False`). - .. versionchanged:: 2.6 - Added the *exclude* parameter. - .. method:: TarFile.addfile(tarinfo[, fileobj]) @@ -425,8 +407,7 @@ object, see :ref:`tarinfo-objects` for details. attribute to :const:`USTAR_FORMAT`, :const:`False` is equivalent to :const:`GNU_FORMAT`. - .. versionchanged:: 2.4 - *posix* defaults to :const:`False`. + *posix* defaults to :const:`False`. .. deprecated:: 2.6 Use the :attr:`format` attribute instead. @@ -436,7 +417,6 @@ object, see :ref:`tarinfo-objects` for details. A dictionary containing key-value pairs of pax global headers. - .. versionadded:: 2.6 .. % ----------------- .. % TarInfo Objects @@ -466,8 +446,7 @@ It does *not* contain the file's data itself. Create and return a :class:`TarInfo` object from string buffer *buf*. - .. versionadded:: 2.6 - Raises :exc:`HeaderError` if the buffer is invalid.. + Raises :exc:`HeaderError` if the buffer is invalid.. .. method:: TarInfo.fromtarfile(tarfile) @@ -475,16 +454,12 @@ It does *not* contain the file's data itself. Read the next member from the :class:`TarFile` object *tarfile* and return it as a :class:`TarInfo` object. - .. versionadded:: 2.6 - .. method:: TarInfo.tobuf([format[, encoding [, errors]]]) Create a string buffer from a :class:`TarInfo` object. For information on the arguments see the constructor of the :class:`TarFile` class. - .. versionchanged:: 2.6 - The arguments were added. A ``TarInfo`` object has the following public data attributes: @@ -548,7 +523,6 @@ A ``TarInfo`` object has the following public data attributes: A dictionary containing key-value pairs of an associated pax extended header. - .. versionadded:: 2.6 A :class:`TarInfo` object also provides some convenient query methods: diff --git a/Doc/library/telnetlib.rst b/Doc/library/telnetlib.rst index f6ab852..c1f1260 100644 --- a/Doc/library/telnetlib.rst +++ b/Doc/library/telnetlib.rst @@ -39,9 +39,6 @@ Character), EL (Erase Line), GA (Go Ahead), SB (Subnegotiation Begin). :exc:`EOFError` when the end of the connection is read, because they can return an empty string for other reasons. See the individual descriptions below. - .. versionchanged:: 2.6 - *timeout* was added. - .. seealso:: @@ -119,8 +116,6 @@ Telnet Objects callback should access these data when it was invoked with a ``SE`` command. This method never blocks. - .. versionadded:: 2.3 - .. method:: Telnet.open(host[, port[, timeout]]) @@ -131,9 +126,6 @@ Telnet Objects Do not try to reopen an already connected instance. - .. versionchanged:: 2.6 - *timeout* was added. - .. method:: Telnet.msg(msg[, *args]) diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index c4ddf8b..74c032f 100644 --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@ -60,11 +60,6 @@ The module defines the following user-callable functions: across platforms (it can be so used on Unix; it cannot on Windows NT or later). If *delete* is true (the default), the file is deleted as soon as it is closed. - .. versionadded:: 2.3 - - .. versionadded:: 2.6 - The *delete* parameter. - .. function:: SpooledTemporaryFile([max_size=0, [mode='w+b'[, bufsize=-1[, suffix[, prefix[, dir]]]]]]) @@ -76,8 +71,6 @@ The module defines the following user-callable functions: The resulting file has one additional method, :func:`rollover`, which causes the file to roll over to an on-disk file regardless of its size. - .. versionadded:: 2.6 - .. function:: mkstemp([suffix[, prefix[, dir[, text]]]]) @@ -114,8 +107,6 @@ The module defines the following user-callable functions: (as would be returned by :func:`os.open`) and the absolute pathname of that file, in that order. - .. versionadded:: 2.3 - .. function:: mkdtemp([suffix[, prefix[, dir]]]) @@ -130,8 +121,6 @@ The module defines the following user-callable functions: :func:`mkdtemp` returns the absolute pathname of the new directory. - .. versionadded:: 2.3 - .. function:: mktemp([suffix[, prefix[, dir]]]) @@ -209,5 +198,3 @@ function arguments, instead. contain the directory component. Using this function is preferred over reading the *template* variable directly. - .. versionadded:: 1.5.2 - diff --git a/Doc/library/test.rst b/Doc/library/test.rst index 90b4db3..305c26f 100644 --- a/Doc/library/test.rst +++ b/Doc/library/test.rst @@ -297,8 +297,6 @@ The :mod:`test.test_support` module defines the following functions: warnings.warn("foo") assert str(w.message) == "foo" - .. versionadded:: 2.6 - .. function:: captured_stdout() @@ -312,8 +310,6 @@ The :mod:`test.test_support` module defines the following functions: print "hello" assert s.getvalue() == "hello" - .. versionadded:: 2.6 - The :mod:`test.test_support` module defines the following classes: @@ -325,16 +321,12 @@ The :mod:`test.test_support` module defines the following classes: :keyword:`with` statement. Only if all pairs match properly against attributes on the exception is :exc:`ResourceDenied` raised. - .. versionadded:: 2.6 - .. class:: EnvironmentVarGuard() Class used to temporarily set or unset environment variables. Instances can be used as a context manager. - .. versionadded:: 2.6 - .. method:: EnvironmentVarGuard.set(envvar, value) diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst index f729a64..e4340fa 100644 --- a/Doc/library/textwrap.rst +++ b/Doc/library/textwrap.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Greg Ward <gward@python.net> -.. versionadded:: 2.3 - The :mod:`textwrap` module provides two convenience functions, :func:`wrap` and :func:`fill`, as well as :class:`TextWrapper`, the class that does all the work, and a utility function :func:`dedent`. If you're just wrapping or filling one @@ -124,9 +122,6 @@ constructor) are as follows: at the beginning or end of a line is dropped (leading whitespace in the first line is always preserved, though). - .. versionadded:: 2.6 - Whitespace was always dropped in earlier versions. - .. attribute:: TextWrapper.initial_indent diff --git a/Doc/library/thread.rst b/Doc/library/thread.rst index c9be598..a2eeb8a 100644 --- a/Doc/library/thread.rst +++ b/Doc/library/thread.rst @@ -55,8 +55,6 @@ It defines the following constant and functions: Raise a :exc:`KeyboardInterrupt` exception in the main thread. A subthread can use this function to interrupt the main thread. - .. versionadded:: 2.3 - .. function:: exit() @@ -102,7 +100,6 @@ It defines the following constant and functions: the suggested approach in the absence of more specific information). Availability: Windows, systems with POSIX threads. - .. versionadded:: 2.5 Lock objects have the following methods: diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 92ce02a..a676a1e 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -67,8 +67,6 @@ This module defines the following functions and objects: For more details and extensive examples, see the documentation string of the :mod:`_threading_local` module. - .. versionadded:: 2.4 - .. function:: Lock() @@ -123,8 +121,6 @@ This module defines the following functions and objects: The *func* will be passed to :func:`sys.settrace` for each thread, before its :meth:`run` method is called. - .. versionadded:: 2.3 - .. function:: setprofile(func) @@ -134,8 +130,6 @@ This module defines the following functions and objects: The *func* will be passed to :func:`sys.setprofile` for each thread, before its :meth:`run` method is called. - .. versionadded:: 2.3 - .. function:: stack_size([size]) @@ -154,7 +148,6 @@ This module defines the following functions and objects: the suggested approach in the absence of more specific information). Availability: Windows, systems with POSIX threads. - .. versionadded:: 2.5 Detailed interfaces for the objects are documented below. diff --git a/Doc/library/time.rst b/Doc/library/time.rst index 04c8f66..1907011 100644 --- a/Doc/library/time.rst +++ b/Doc/library/time.rst @@ -115,10 +115,6 @@ An explanation of some terminology and conventions is in order. :class:`struct_time`, or having elements of the wrong type, a :exc:`TypeError` is raised. - .. versionchanged:: 2.2 - The time value sequence was changed from a tuple to a :class:`struct_time`, with - the addition of attribute names for the fields. - The module defines the following functions and data items: @@ -149,9 +145,6 @@ The module defines the following functions and data items: Unlike the C function of the same name, there is no trailing newline. - .. versionchanged:: 2.1 - Allowed *t* to be omitted. - .. function:: clock() @@ -178,12 +171,6 @@ The module defines the following functions and data items: returned by :func:`time` is used. ``ctime(secs)`` is equivalent to ``asctime(localtime(secs))``. Locale information is not used by :func:`ctime`. - .. versionchanged:: 2.1 - Allowed *secs* to be omitted. - - .. versionchanged:: 2.4 - If *secs* is :const:`None`, the current time is used. - .. data:: daylight @@ -199,12 +186,6 @@ The module defines the following functions and data items: :class:`struct_time` object. See :func:`calendar.timegm` for the inverse of this function. - .. versionchanged:: 2.1 - Allowed *secs* to be omitted. - - .. versionchanged:: 2.4 - If *secs* is :const:`None`, the current time is used. - .. function:: localtime([secs]) @@ -212,12 +193,6 @@ The module defines the following functions and data items: :const:`None`, the current time as returned by :func:`time` is used. The dst flag is set to ``1`` when DST applies to the given time. - .. versionchanged:: 2.1 - Allowed *secs* to be omitted. - - .. versionchanged:: 2.4 - If *secs* is :const:`None`, the current time is used. - .. function:: mktime(t) @@ -249,96 +224,89 @@ The module defines the following functions and data items: :func:`localtime` is used. *format* must be a string. :exc:`ValueError` is raised if any field in *t* is outside of the allowed range. - .. versionchanged:: 2.1 - Allowed *t* to be omitted. - - .. versionchanged:: 2.4 - :exc:`ValueError` raised if a field in *t* is out of range. - - .. versionchanged:: 2.5 - 0 is now a legal argument for any position in the time tuple; if it is normally - illegal the value is forced to a correct one.. + 0 is a legal argument for any position in the time tuple; if it is normally + illegal the value is forced to a correct one. The following directives can be embedded in the *format* string. They are shown without the optional field width and precision specification, and are replaced by the indicated characters in the :func:`strftime` result: - +-----------+--------------------------------+-------+ - | Directive | Meaning | Notes | - +===========+================================+=======+ - | ``%a`` | Locale's abbreviated weekday | | - | | name. | | - +-----------+--------------------------------+-------+ - | ``%A`` | Locale's full weekday name. | | - +-----------+--------------------------------+-------+ - | ``%b`` | Locale's abbreviated month | | - | | name. | | - +-----------+--------------------------------+-------+ - | ``%B`` | Locale's full month name. | | - +-----------+--------------------------------+-------+ - | ``%c`` | Locale's appropriate date and | | - | | time representation. | | - +-----------+--------------------------------+-------+ - | ``%d`` | Day of the month as a decimal | | - | | number [01,31]. | | - +-----------+--------------------------------+-------+ - | ``%H`` | Hour (24-hour clock) as a | | - | | decimal number [00,23]. | | - +-----------+--------------------------------+-------+ - | ``%I`` | Hour (12-hour clock) as a | | - | | decimal number [01,12]. | | - +-----------+--------------------------------+-------+ - | ``%j`` | Day of the year as a decimal | | - | | number [001,366]. | | - +-----------+--------------------------------+-------+ - | ``%m`` | Month as a decimal number | | - | | [01,12]. | | - +-----------+--------------------------------+-------+ - | ``%M`` | Minute as a decimal number | | - | | [00,59]. | | - +-----------+--------------------------------+-------+ - | ``%p`` | Locale's equivalent of either | \(1) | - | | AM or PM. | | - +-----------+--------------------------------+-------+ - | ``%S`` | Second as a decimal number | \(2) | - | | [00,61]. | | - +-----------+--------------------------------+-------+ - | ``%U`` | Week number of the year | \(3) | - | | (Sunday as the first day of | | - | | the week) as a decimal number | | - | | [00,53]. All days in a new | | - | | year preceding the first | | - | | Sunday are considered to be in | | - | | week 0. | | - +-----------+--------------------------------+-------+ - | ``%w`` | Weekday as a decimal number | | - | | [0(Sunday),6]. | | - +-----------+--------------------------------+-------+ - | ``%W`` | Week number of the year | \(3) | - | | (Monday as the first day of | | - | | the week) as a decimal number | | - | | [00,53]. All days in a new | | - | | year preceding the first | | - | | Monday are considered to be in | | - | | week 0. | | - +-----------+--------------------------------+-------+ - | ``%x`` | Locale's appropriate date | | - | | representation. | | - +-----------+--------------------------------+-------+ - | ``%X`` | Locale's appropriate time | | - | | representation. | | - +-----------+--------------------------------+-------+ - | ``%y`` | Year without century as a | | - | | decimal number [00,99]. | | - +-----------+--------------------------------+-------+ - | ``%Y`` | Year with century as a decimal | | - | | number. | | - +-----------+--------------------------------+-------+ - | ``%Z`` | Time zone name (no characters | | - | | if no time zone exists). | | - +-----------+--------------------------------+-------+ - | ``%%`` | A literal ``'%'`` character. | | - +-----------+--------------------------------+-------+ + +-----------+------------------------------------------------+-------+ + | Directive | Meaning | Notes | + +===========+================================================+=======+ + | ``%a`` | Locale's abbreviated weekday name. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%A`` | Locale's full weekday name. | | + +-----------+------------------------------------------------+-------+ + | ``%b`` | Locale's abbreviated month name. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%B`` | Locale's full month name. | | + +-----------+------------------------------------------------+-------+ + | ``%c`` | Locale's appropriate date and time | | + | | representation. | | + +-----------+------------------------------------------------+-------+ + | ``%d`` | Day of the month as a decimal number [01,31]. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%H`` | Hour (24-hour clock) as a decimal number | | + | | [00,23]. | | + +-----------+------------------------------------------------+-------+ + | ``%I`` | Hour (12-hour clock) as a decimal number | | + | | [01,12]. | | + +-----------+------------------------------------------------+-------+ + | ``%j`` | Day of the year as a decimal number [001,366]. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%m`` | Month as a decimal number [01,12]. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%M`` | Minute as a decimal number [00,59]. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%p`` | Locale's equivalent of either AM or PM. | \(1) | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%S`` | Second as a decimal number [00,61]. | \(2) | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%U`` | Week number of the year (Sunday as the first | \(3) | + | | day of the week) as a decimal number [00,53]. | | + | | All days in a new year preceding the first | | + | | Sunday are considered to be in week 0. | | + | | | | + | | | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%w`` | Weekday as a decimal number [0(Sunday),6]. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%W`` | Week number of the year (Monday as the first | \(3) | + | | day of the week) as a decimal number [00,53]. | | + | | All days in a new year preceding the first | | + | | Monday are considered to be in week 0. | | + | | | | + | | | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%x`` | Locale's appropriate date representation. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%X`` | Locale's appropriate time representation. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%y`` | Year without century as a decimal number | | + | | [00,99]. | | + +-----------+------------------------------------------------+-------+ + | ``%Y`` | Year with century as a decimal number. | | + | | | | + +-----------+------------------------------------------------+-------+ + | ``%Z`` | Time zone name (no characters if no time zone | | + | | exists). | | + +-----------+------------------------------------------------+-------+ + | ``%%`` | A literal ``'%'`` character. | | + +-----------+------------------------------------------------+-------+ Notes: @@ -405,8 +373,6 @@ The module defines the following functions and data items: The type of the time value sequence returned by :func:`gmtime`, :func:`localtime`, and :func:`strptime`. - .. versionadded:: 2.2 - .. function:: time() @@ -436,8 +402,6 @@ The module defines the following functions and data items: Resets the time conversion rules used by the library routines. The environment variable :envvar:`TZ` specifies how this is done. - .. versionadded:: 2.3 - Availability: Unix. .. note:: diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index 8c0cda3..bc9615a 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -6,8 +6,6 @@ :synopsis: Measure the execution time of small code snippets. -.. versionadded:: 2.3 - .. index:: single: Benchmarking single: Performance @@ -33,11 +31,10 @@ The module defines the following public class: method. The :meth:`repeat` method is a convenience to call :meth:`timeit` multiple times and return a list of results. - .. versionchanged:: 2.6 - The *stmt* and *setup* parameters can now also take objects that are callable - without arguments. This will embed calls to them in a timer function that will - then be executed by :meth:`timeit`. Note that the timing overhead is a little - larger in this case because of the extra function calls. + The *stmt* and *setup* parameters can also take objects that are callable + without arguments. This will embed calls to them in a timer function that + will then be executed by :meth:`timeit`. Note that the timing overhead is a + little larger in this case because of the extra function calls. .. method:: Timer.print_exc([file=None]) @@ -105,16 +102,12 @@ Starting with version 2.6, the module also defines two convenience functions: function and run its :meth:`repeat` method with the given repeat count and *number* executions. - .. versionadded:: 2.6 - .. function:: timeit(stmt[, setup[, timer[, number=1000000]]]) Create a :class:`Timer` instance with the given statement, setup code and timer function and run its :meth:`timeit` method with *number* executions. - .. versionadded:: 2.6 - Command Line Interface ---------------------- diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst index fe01490..c4df617 100644 --- a/Doc/library/tkinter.rst +++ b/Doc/library/tkinter.rst @@ -61,9 +61,6 @@ Or, more often:: .. % FIXME: The following keyword arguments are currently recognized: - .. versionchanged:: 2.4 - The *useTk* parameter was added. - .. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=0) @@ -75,7 +72,6 @@ Or, more often:: created by the :func:`Tcl` object can have a Toplevel window created (and the Tk subsystem initialized) by calling its :meth:`loadtk` method. - .. versionadded:: 2.4 Other modules that provide Tk support include: diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst index 61f2c4d..61b8497 100644 --- a/Doc/library/tokenize.rst +++ b/Doc/library/tokenize.rst @@ -31,11 +31,9 @@ The primary entry point is a generator: token was found. The line passed is the *logical* line; continuation lines are included. - .. versionadded:: 2.2 An older entry point is retained for backward compatibility: - .. function:: tokenize(readline[, tokeneater]) The :func:`tokenize` function accepts two parameters: one representing the input @@ -47,18 +45,15 @@ An older entry point is retained for backward compatibility: line of input as a string. Alternately, *readline* may be a callable object that signals completion by raising :exc:`StopIteration`. - .. versionchanged:: 2.5 - Added :exc:`StopIteration` support. - The second parameter, *tokeneater*, must also be a callable object. It is called once for each token, with five arguments, corresponding to the tuples generated by :func:`generate_tokens`. + All constants from the :mod:`token` module are also exported from :mod:`tokenize`, as are two additional token type values that might be passed to the *tokeneater* function by :func:`tokenize`: - .. data:: COMMENT Token value used to indicate a comment. @@ -87,7 +82,6 @@ back the modified script. type and token string as the spacing between tokens (column positions) may change. - .. versionadded:: 2.5 Example of a script re-writer that transforms float literals into Decimal objects:: diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst index ec8687f..a9b15db 100644 --- a/Doc/library/traceback.rst +++ b/Doc/library/traceback.rst @@ -50,8 +50,6 @@ The module defines the following functions: This is like ``print_exc(limit)`` but returns a string instead of printing to a file. - .. versionadded:: 2.4 - .. function:: print_last([limit[, file]]) diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 354bb11..b772c88 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -92,15 +92,11 @@ The :mod:`turtle` module defines the following functions: ``'fastest'`` (no delay), ``'fast'``, (delay 5ms), ``'normal'`` (delay 10ms), ``'slow'`` (delay 15ms), and ``'slowest'`` (delay 20ms). - .. versionadded:: 2.5 - .. function:: delay(delay) Set the speed of the turtle to *delay*, which is given in ms. - .. versionadded:: 2.5 - .. function:: forward(distance) @@ -168,15 +164,11 @@ The :mod:`turtle` module defines the following functions: Switch turtle into filling mode; Must eventually be followed by a corresponding end_fill() call. Otherwise it will be ignored. - .. versionadded:: 2.5 - .. function:: end_fill() End filling mode, and fill the shape; equivalent to ``fill(0)``. - .. versionadded:: 2.5 - .. function:: circle(radius[, extent]) @@ -203,56 +195,41 @@ The :mod:`turtle` module defines the following functions: The co-ordinates may be specified either as two separate arguments, as a 2-tuple, or as another pen object. - .. versionadded:: 2.5 - .. function:: heading() Return the current orientation of the turtle. - .. versionadded:: 2.3 - .. function:: setheading(angle) Set the orientation of the turtle to *angle*. - .. versionadded:: 2.3 - .. function:: position() Return the current location of the turtle as an ``(x,y)`` pair. - .. versionadded:: 2.3 - .. function:: setx(x) Set the x coordinate of the turtle to *x*. - .. versionadded:: 2.3 - .. function:: sety(y) Set the y coordinate of the turtle to *y*. - .. versionadded:: 2.3 - .. function:: window_width() Return the width of the canvas window. - .. versionadded:: 2.3 - .. function:: window_height() Return the height of the canvas window. - .. versionadded:: 2.3 This module also does ``from math import *``, so see the documentation for the :mod:`math` module for additional constants and functions useful for turtle diff --git a/Doc/library/types.rst b/Doc/library/types.rst index eb009ff..6d499fb 100644 --- a/Doc/library/types.rst +++ b/Doc/library/types.rst @@ -54,8 +54,6 @@ The module defines the following names: The type of the :class:`bool` values ``True`` and ``False``; alias of the built-in :class:`bool`. - .. versionadded:: 2.3 - .. data:: IntType @@ -123,8 +121,6 @@ The module defines the following names: The type of generator-iterator objects, produced by calling a generator function. - .. versionadded:: 2.2 - .. data:: CodeType @@ -225,8 +221,6 @@ The module defines the following names: defined in implementations of Python that do not have such extension types, so for portable code use ``hasattr(types, 'GetSetDescriptorType')``. - .. versionadded:: 2.5 - .. data:: MemberDescriptorType @@ -235,8 +229,6 @@ The module defines the following names: Python that do not have such extension types, so for portable code use ``hasattr(types, 'MemberDescriptorType')``. - .. versionadded:: 2.5 - .. data:: StringTypes @@ -245,5 +237,3 @@ The module defines the following names: sequence of the two string types constructed elsewhere since it only contains ``UnicodeType`` if it has been built in the running version of Python. For example: ``isinstance(s, types.StringTypes)``. - - .. versionadded:: 2.2 diff --git a/Doc/library/unicodedata.rst b/Doc/library/unicodedata.rst index ec788c5..9a238f1 100644 --- a/Doc/library/unicodedata.rst +++ b/Doc/library/unicodedata.rst @@ -81,8 +81,6 @@ the following functions: Returns the east asian width assigned to the Unicode character *unichr* as string. - .. versionadded:: 2.4 - .. function:: mirrored(unichr) @@ -130,17 +128,13 @@ the following functions: 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: - .. data:: unidata_version The version of the Unicode database used in this module. - .. versionadded:: 2.3 - .. data:: ucd_3_2_0 @@ -148,8 +142,6 @@ In addition, the module exposes the following constant: Unicode database version 3.2 instead, for applications that require this specific version of the Unicode database (such as IDNA). - .. versionadded:: 2.5 - Examples:: >>> unicodedata.lookup('LEFT CURLY BRACKET') diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 3d3727f..b1315c0 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -10,8 +10,6 @@ .. sectionauthor:: Raymond Hettinger <python@rcn.com> -.. versionadded:: 2.1 - The Python unit testing framework, sometimes referred to as "PyUnit," is a Python language version of JUnit, by Kent Beck and Erich Gamma. JUnit is, in turn, a Java version of Kent's Smalltalk testing framework. Each is the de @@ -505,8 +503,6 @@ module. If so, that module provides a :class:`DocTestSuite` class that can automatically build :class:`unittest.TestSuite` instances from the existing :mod:`doctest`\ -based tests. -.. versionadded:: 2.3 - .. _testcase-objects: @@ -750,9 +746,6 @@ interest when inspecting the results of running a set of tests: formatted tracebacks. Each tuple represents a test which raised an unexpected exception. - .. versionchanged:: 2.2 - Contains formatted tracebacks instead of :func:`sys.exc_info` results. - .. attribute:: TestResult.failures @@ -761,9 +754,6 @@ interest when inspecting the results of running a set of tests: explicitly signalled using the :meth:`TestCase.fail\*` or :meth:`TestCase.assert\*` methods. - .. versionchanged:: 2.2 - Contains formatted tracebacks instead of :func:`sys.exc_info` results. - .. attribute:: TestResult.testsRun diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst index ef8264f..914351a 100644 --- a/Doc/library/urllib.rst +++ b/Doc/library/urllib.rst @@ -106,9 +106,6 @@ It defines the following public functions: Proxies which require authentication for use are not currently supported; this is considered an implementation limitation. - .. versionchanged:: 2.3 - Added the *proxies* support. - .. function:: urlretrieve(url[, filename[, reporthook[, data]]]) @@ -135,22 +132,21 @@ It defines the following public functions: :mimetype:`application/x-www-form-urlencoded` format; see the :func:`urlencode` function below. - .. versionchanged:: 2.5 - :func:`urlretrieve` will raise :exc:`ContentTooShortError` when it detects that - the amount of data available was less than the expected amount (which is the - size reported by a *Content-Length* header). This can occur, for example, when - the download is interrupted. + :func:`urlretrieve` will raise :exc:`ContentTooShortError` when it detects that + the amount of data available was less than the expected amount (which is the + size reported by a *Content-Length* header). This can occur, for example, when + the download is interrupted. - The *Content-Length* is treated as a lower bound: if there's more data to read, - urlretrieve reads more data, but if less data is available, it raises the - exception. + The *Content-Length* is treated as a lower bound: if there's more data to read, + urlretrieve reads more data, but if less data is available, it raises the + exception. - You can still retrieve the downloaded data in this case, it is stored in the - :attr:`content` attribute of the exception instance. + You can still retrieve the downloaded data in this case, it is stored in the + :attr:`content` attribute of the exception instance. - If no *Content-Length* header was supplied, urlretrieve can not check the size - of the data it has downloaded, and just returns it. In this case you just have - to assume that the download was successful. + If no *Content-Length* header was supplied, urlretrieve can not check the size + of the data it has downloaded, and just returns it. In this case you just have + to assume that the download was successful. .. data:: _urlopener @@ -301,8 +297,6 @@ It defines the following public functions: *Content-Length* header). The :attr:`content` attribute stores the downloaded (and supposedly truncated) data. - .. versionadded:: 2.5 - Restrictions: .. index:: diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst index ea43ebf..6360ab8 100644 --- a/Doc/library/urllib2.rst +++ b/Doc/library/urllib2.rst @@ -44,9 +44,6 @@ The :mod:`urllib2` module defines the following functions: default installed global :class:`OpenerDirector` uses :class:`UnknownHandler` to ensure this never happens). - .. versionchanged:: 2.6 - *timeout* was added. - .. function:: install_opener(opener) @@ -302,16 +299,12 @@ so all must be overridden in subclasses. Add a header that will not be added to a redirected request. - .. versionadded:: 2.4 - .. method:: Request.has_header(header) Return whether the instance has the named header (checks both regular and unredirected). - .. versionadded:: 2.4 - .. method:: Request.get_full_url() @@ -392,9 +385,6 @@ OpenerDirector Objects specified, or passed as None, the global default timeout setting will be used; this actually only work for HTTP, HTTPS, FTP and FTPS connections). - .. versionchanged:: 2.6 - *timeout* was added. - .. method:: OpenerDirector.error(proto[, arg[, ...]]) @@ -611,11 +601,8 @@ HTTPRedirectHandler Objects HTTPCookieProcessor Objects --------------------------- -.. versionadded:: 2.4 - :class:`HTTPCookieProcessor` instances have one attribute: - .. attribute:: HTTPCookieProcessor.cookiejar The :class:`cookielib.CookieJar` in which cookies are stored. @@ -825,9 +812,6 @@ UnknownHandler Objects HTTPErrorProcessor Objects -------------------------- -.. versionadded:: 2.4 - - .. method:: HTTPErrorProcessor.unknown_open() Process HTTP error responses. diff --git a/Doc/library/urlparse.rst b/Doc/library/urlparse.rst index c6bc82b..1c095ae 100644 --- a/Doc/library/urlparse.rst +++ b/Doc/library/urlparse.rst @@ -24,9 +24,6 @@ following URL schemes: ``file``, ``ftp``, ``gopher``, ``hdl``, ``http``, ``rsync``, ``rtsp``, ``rtspu``, ``sftp``, ``shttp``, ``sip``, ``sips``, ``snews``, ``svn``, ``svn+ssh``, ``telnet``, ``wais``. -.. versionadded:: 2.5 - Support for the ``sftp`` and ``sips`` schemes. - The :mod:`urlparse` module defines the following functions: @@ -91,9 +88,6 @@ The :mod:`urlparse` module defines the following functions: See section :ref:`urlparse-result-object` for more information on the result object. - .. versionchanged:: 2.5 - Added attributes to return value. - .. function:: urlunparse(parts) @@ -142,11 +136,6 @@ The :mod:`urlparse` module defines the following functions: See section :ref:`urlparse-result-object` for more information on the result object. - .. versionadded:: 2.2 - - .. versionchanged:: 2.5 - Added attributes to return value. - .. function:: urlunsplit(parts) @@ -156,8 +145,6 @@ The :mod:`urlparse` module defines the following functions: originally had unnecessary delimiters (for example, a ? with an empty query; the RFC states that these are equivalent). - .. versionadded:: 2.2 - .. function:: urljoin(base, url[, allow_fragments]) @@ -242,7 +229,6 @@ described in those functions, as well as provide an additional method: >>> r2.geturl() 'http://www.Python.org/doc/' - .. versionadded:: 2.5 The following classes provide the implementations of the parse results:: diff --git a/Doc/library/userdict.rst b/Doc/library/userdict.rst index 11d46ed..d15f518 100644 --- a/Doc/library/userdict.rst +++ b/Doc/library/userdict.rst @@ -120,11 +120,6 @@ special methods supported by this class will need to be overridden; please consult the sources for information about the methods which need to be provided in that case. -.. versionchanged:: 2.0 - Python versions 1.5.2 and 1.6 also required that the constructor be callable - with no parameters, and offer a mutable :attr:`data` attribute. Earlier - versions of Python did not attempt to create instances of the derived class. - :mod:`UserString` --- Class wrapper for string objects ====================================================== diff --git a/Doc/library/uuid.rst b/Doc/library/uuid.rst index dd52638..6ab4889 100644 --- a/Doc/library/uuid.rst +++ b/Doc/library/uuid.rst @@ -8,8 +8,6 @@ .. sectionauthor:: George Yoshida <quiver@users.sourceforge.net> -.. versionadded:: 2.5 - This module provides immutable :class:`UUID` objects (the :class:`UUID` class) and the functions :func:`uuid1`, :func:`uuid3`, :func:`uuid4`, :func:`uuid5` for generating version 1, 3, 4, and 5 UUIDs as specified in :rfc:`4122`. diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst index 35e9888..684209f 100644 --- a/Doc/library/warnings.rst +++ b/Doc/library/warnings.rst @@ -8,8 +8,6 @@ :synopsis: Issue warning messages and control their disposition. -.. versionadded:: 2.1 - Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program, where that condition (normally) doesn't warrant raising an exception and terminating the program. For example, one diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst index c5857ba..44f8d96 100644 --- a/Doc/library/weakref.rst +++ b/Doc/library/weakref.rst @@ -10,8 +10,6 @@ .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> -.. versionadded:: 2.1 - The :mod:`weakref` module allows the Python programmer to create :dfn:`weak references` to objects. @@ -54,9 +52,6 @@ unbound), sets, frozensets, file objects, generators, type objects, DBcursor objects from the :mod:`bsddb` module, sockets, arrays, deques, and regular expression pattern objects. -.. versionchanged:: 2.4 - Added support for files, sockets, arrays, and patterns. - Several builtin types such as :class:`list` and :class:`dict` do not directly support weak references but can add support through subclassing:: @@ -97,9 +92,7 @@ Extension types can easily be made to support weak references; see referents (regardless of the *callback*). If either referent has been deleted, the references are equal only if the reference objects are the same object. - .. versionchanged:: 2.4 - This is now a subclassable type rather than a factory function; it derives from - :class:`object`. + This is a subclassable type rather than a factory function. .. function:: proxy(object[, callback]) @@ -152,15 +145,11 @@ than needed. Return an iterator that yields the weak references to the keys. - .. versionadded:: 2.5 - .. method:: WeakKeyDictionary.keyrefs() Return a list of weak references to the keys. - .. versionadded:: 2.5 - .. class:: WeakValueDictionary([dict]) @@ -184,15 +173,11 @@ methods of :class:`WeakKeyDictionary` objects. Return an iterator that yields the weak references to the values. - .. versionadded:: 2.5 - .. method:: WeakValueDictionary.valuerefs() Return a list of weak references to the values. - .. versionadded:: 2.5 - .. data:: ReferenceType diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst index c243f7c..22580d8 100644 --- a/Doc/library/webbrowser.rst +++ b/Doc/library/webbrowser.rst @@ -55,9 +55,6 @@ The following functions are defined: under many window managers this will occur regardless of the setting of this variable). - .. versionchanged:: 2.5 - *new* can now be 2. - .. function:: open_new(url) @@ -70,8 +67,6 @@ The following functions are defined: Open *url* in a new page ("tab") of the default browser, if possible, otherwise equivalent to :func:`open_new`. - .. versionadded:: 2.5 - .. function:: get([name]) @@ -194,6 +189,3 @@ convenience functions: Open *url* in a new page ("tab") of the browser handled by this controller, if possible, otherwise equivalent to :func:`open_new`. - - .. versionadded:: 2.5 - diff --git a/Doc/library/winsound.rst b/Doc/library/winsound.rst index c4c04bd..923c7c4 100644 --- a/Doc/library/winsound.rst +++ b/Doc/library/winsound.rst @@ -9,8 +9,6 @@ .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> -.. versionadded:: 1.5.2 - The :mod:`winsound` module provides access to the basic sound-playing machinery provided by Windows platforms. It includes functions and several constants. @@ -29,8 +27,6 @@ provided by Windows platforms. It includes functions and several constants. port manipulation (added in version 2.1). It's unknown whether that will work on all systems. - .. versionadded:: 1.6 - .. function:: PlaySound(sound, flags) @@ -50,8 +46,6 @@ provided by Windows platforms. It includes functions and several constants. described below. The value ``-1`` produces a "simple beep"; this is the final fallback if a sound cannot be played otherwise. - .. versionadded:: 2.3 - .. data:: SND_FILENAME diff --git a/Doc/library/wsgiref.rst b/Doc/library/wsgiref.rst index ff68684..b3a3a9f 100644 --- a/Doc/library/wsgiref.rst +++ b/Doc/library/wsgiref.rst @@ -7,8 +7,6 @@ .. sectionauthor:: Phillip J. Eby <pje@telecommunity.com> -.. versionadded:: 2.5 - The Web Server Gateway Interface (WSGI) is a standard interface between web server software and web applications written in Python. Having a standard interface makes it easy to use an application that supports WSGI with a number diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst index 54c5f3d..1af07b3 100644 --- a/Doc/library/xml.dom.minidom.rst +++ b/Doc/library/xml.dom.minidom.rst @@ -9,8 +9,6 @@ .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> -.. versionadded:: 2.0 - :mod:`xml.dom.minidom` is a light-weight implementation of the Document Object Model interface. It is intended to be simpler than the full DOM and also significantly smaller. @@ -136,13 +134,8 @@ module documentation. This section lists the differences between the API and indentation to use for subnodes of the current one. The *newl* parameter specifies the string to use to terminate newlines. - .. versionchanged:: 2.1 - The optional keyword parameters *indent*, *addindent*, and *newl* were added to - support pretty output. - - .. versionchanged:: 2.3 - For the :class:`Document` node, an additional keyword argument *encoding* can be - used to specify the encoding field of the XML header. + For the :class:`Document` node, an additional keyword argument *encoding* can be + used to specify the encoding field of the XML header. .. method:: Node.toxml([encoding]) @@ -159,25 +152,19 @@ module documentation. This section lists the differences between the API and avoid :exc:`UnicodeError` exceptions in case of unrepresentable text data, the encoding argument should be specified as "utf-8". - .. versionchanged:: 2.3 - the *encoding* argument was introduced. - -.. method:: Node.toprettyxml([indent[, newl]]) +.. method:: Node.toprettyxml([indent[, newl[, encoding]]]) Return a pretty-printed version of the document. *indent* specifies the indentation string and defaults to a tabulator; *newl* specifies the string emitted at the end of each line and defaults to ``\n``. - .. versionadded:: 2.1 + There's also an *encoding* argument; see :meth:`toxml`. - .. versionchanged:: 2.3 - the encoding argument; see :meth:`toxml`. The following standard DOM methods have special considerations with :mod:`xml.dom.minidom`: - .. method:: Node.cloneNode(deep) Although this method was present in the version of :mod:`xml.dom.minidom` diff --git a/Doc/library/xml.dom.pulldom.rst b/Doc/library/xml.dom.pulldom.rst index 80a91b8..18b166f 100644 --- a/Doc/library/xml.dom.pulldom.rst +++ b/Doc/library/xml.dom.pulldom.rst @@ -7,8 +7,6 @@ .. moduleauthor:: Paul Prescod <paul@prescod.net> -.. versionadded:: 2.0 - :mod:`xml.dom.pulldom` allows building only selected portions of a Document Object Model representation of a document from SAX events. @@ -42,9 +40,8 @@ Object Model representation of a document from SAX events. Default value for the *bufsize* parameter to :func:`parse`. - .. versionchanged:: 2.1 - The value of this variable can be changed before calling :func:`parse` and the - new value will take effect. + The value of this variable can be changed before calling :func:`parse` and + the new value will take effect. .. _domeventstream-objects: diff --git a/Doc/library/xml.dom.rst b/Doc/library/xml.dom.rst index 76f5cc1..e13999c 100644 --- a/Doc/library/xml.dom.rst +++ b/Doc/library/xml.dom.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> -.. versionadded:: 2.0 - The Document Object Model, or "DOM," is a cross-language API from the World Wide Web Consortium (W3C) for accessing and modifying XML documents. A DOM implementation presents an XML document as a tree structure, or allows client @@ -122,16 +120,12 @@ Some convenience constants are also provided: DOM. This is typically found as the :attr:`namespaceURI` of a node, or used as the *namespaceURI* parameter to a namespaces-specific method. - .. versionadded:: 2.2 - .. data:: XML_NAMESPACE The namespace URI associated with the reserved prefix ``xml``, as defined by `Namespaces in XML <http://www.w3.org/TR/REC-xml-names/>`_ (section 4). - .. versionadded:: 2.2 - .. data:: XMLNS_NAMESPACE @@ -139,15 +133,12 @@ Some convenience constants are also provided: Model (DOM) Level 2 Core Specification <http://www.w3.org/TR/DOM-Level-2-Core/core.html>`_ (section 1.1.8). - .. versionadded:: 2.2 - .. data:: XHTML_NAMESPACE The URI of the XHTML namespace as defined by `XHTML 1.0: The Extensible HyperText Markup Language <http://www.w3.org/TR/xhtml1/>`_ (section 3.1.1). - .. versionadded:: 2.2 In addition, :mod:`xml.dom` contains a base :class:`Node` class and the DOM exception classes. The :class:`Node` class provided by this module does not @@ -404,8 +395,6 @@ All of the components of an XML document are subclasses of :class:`Node`. :class:`Text` instances. This simplifies processing text from a DOM tree for many applications. - .. versionadded:: 2.1 - .. method:: Node.cloneNode(deep) @@ -813,8 +802,6 @@ Represents a processing instruction in the XML document; this inherits from the Exceptions ^^^^^^^^^^ -.. versionadded:: 2.1 - The DOM Level 2 recommendation defines a single exception, :exc:`DOMException`, and a number of constants that allow applications to determine what sort of error occurred. :exc:`DOMException` instances carry a :attr:`code` attribute diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst index ead8d29..0ad3b17 100644 --- a/Doc/library/xml.etree.elementtree.rst +++ b/Doc/library/xml.etree.elementtree.rst @@ -7,8 +7,6 @@ .. moduleauthor:: Fredrik Lundh <fredrik@pythonware.com> -.. versionadded:: 2.5 - The Element type is a flexible container object, designed to store hierarchical data structures in memory. The type can be described as a cross between a list and a dictionary. diff --git a/Doc/library/xml.etree.rst b/Doc/library/xml.etree.rst index e14c5f9..9d39559 100644 --- a/Doc/library/xml.etree.rst +++ b/Doc/library/xml.etree.rst @@ -6,8 +6,6 @@ .. moduleauthor:: Fredrik Lundh <fredrik@pythonware.com> -.. versionadded:: 2.5 - The ElementTree package is a simple, efficient, and quite popular library for XML manipulation in Python. The :mod:`xml.etree` package contains the most common components from the ElementTree API library. In the current release, diff --git a/Doc/library/xml.sax.handler.rst b/Doc/library/xml.sax.handler.rst index bc287d1..3ef3c83 100644 --- a/Doc/library/xml.sax.handler.rst +++ b/Doc/library/xml.sax.handler.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> -.. versionadded:: 2.0 - The SAX API defines four kinds of handlers: content handlers, DTD handlers, error handlers, and entity resolvers. Applications normally only need to implement those interfaces whose events they are interested in; they can diff --git a/Doc/library/xml.sax.reader.rst b/Doc/library/xml.sax.reader.rst index d64a4fc..c3534bb 100644 --- a/Doc/library/xml.sax.reader.rst +++ b/Doc/library/xml.sax.reader.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> -.. versionadded:: 2.0 - SAX parsers implement the :class:`XMLReader` interface. They are implemented in a Python module, which must provide a function :func:`create_parser`. This function is invoked by :func:`xml.sax.make_parser` with no arguments to create diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst index 43d17c2..163833c 100644 --- a/Doc/library/xml.sax.rst +++ b/Doc/library/xml.sax.rst @@ -9,8 +9,6 @@ .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> -.. versionadded:: 2.0 - The :mod:`xml.sax` package provides a number of modules which implement the Simple API for XML (SAX) interface for Python. The package itself provides the SAX exceptions and the convenience functions which will be most used by users of diff --git a/Doc/library/xml.sax.utils.rst b/Doc/library/xml.sax.utils.rst index 0585a9b..639b63f 100644 --- a/Doc/library/xml.sax.utils.rst +++ b/Doc/library/xml.sax.utils.rst @@ -8,8 +8,6 @@ .. sectionauthor:: Martin v. Löwis <martin@v.loewis.de> -.. versionadded:: 2.0 - The module :mod:`xml.sax.saxutils` contains a number of classes and functions that are commonly useful when creating SAX applications, either in direct use, or as base classes. @@ -32,8 +30,6 @@ or as base classes. *entities* parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. - .. versionadded:: 2.3 - .. function:: quoteattr(data[, entities]) @@ -52,8 +48,6 @@ or as base classes. This function is useful when generating attribute values for HTML or any SGML using the reference concrete syntax. - .. versionadded:: 2.2 - .. class:: XMLGenerator([out[, encoding]]) diff --git a/Doc/library/xmlrpclib.rst b/Doc/library/xmlrpclib.rst index 9e568e1..d2ed771 100644 --- a/Doc/library/xmlrpclib.rst +++ b/Doc/library/xmlrpclib.rst @@ -11,8 +11,6 @@ .. % Not everything is documented yet. It might be good to describe .. % Marshaller, Unmarshaller, getparser, dumps, loads, and Transport. -.. versionadded:: 2.2 - XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP as a transport. With it, a client can call methods with parameters on a remote server (the server is named by a URI) and get back structured data. This module @@ -109,13 +107,6 @@ between conformable Python objects and XML on the wire. :class:`Server` is retained as an alias for :class:`ServerProxy` for backwards compatibility. New code should use :class:`ServerProxy`. - .. versionchanged:: 2.5 - The *use_datetime* flag was added. - - .. versionchanged:: 2.6 - Instances of new-style classes can be passed in if they have an *__dict__* - attribute and don't have a base class that is marshalled in a special way. - .. seealso:: @@ -312,8 +303,6 @@ does not exist). It has the following members: MultiCall Objects ----------------- -.. versionadded:: 2.4 - In http://www.xmlrpc.com/discuss/msgReader%241208, an approach is presented to encapsulate multiple calls to a remote server into a single request. @@ -368,9 +357,6 @@ Convenience Functions objects, they are converted to :class:`DateTime` objects internally, so only :class:`datetime.datetime` objects will be returned. - .. versionchanged:: 2.5 - The *use_datetime* flag was added. - .. _xmlrpc-client-example: diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 7257b35..92a4526 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -10,8 +10,6 @@ .. % LaTeX markup by Fred L. Drake, Jr. <fdrake@acm.org> -.. versionadded:: 1.6 - The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ZIP file. Any advanced use of this module will require an understanding of the format, as @@ -121,9 +119,6 @@ ZipFile Objects because the default :program:`zip` and :program:`unzip` commands on Unix (the InfoZIP utilities) don't support these extensions. - .. versionchanged:: 2.6 - If the file does not exist, it is created if the mode is 'a'. - .. method:: ZipFile.close() @@ -176,8 +171,6 @@ ZipFile Objects create a new file object that will be held by the ZipExtFile, allowing it to operate independently of the ZipFile. - .. versionadded:: 2.6 - .. method:: ZipFile.printdir() @@ -188,8 +181,6 @@ ZipFile Objects Set *pwd* as default password to extract encrypted files. - .. versionadded:: 2.6 - .. method:: ZipFile.read(name[, pwd]) @@ -198,9 +189,6 @@ ZipFile Objects will override the default password set with :meth:`setpassword`. Calling :meth:`read` on a closed ZipFile will raise a :exc:`RuntimeError`. - .. versionchanged:: 2.6 - *pwd* was added. - .. method:: ZipFile.testzip() diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst index f2b2358..6845bf7 100644 --- a/Doc/library/zipimport.rst +++ b/Doc/library/zipimport.rst @@ -7,8 +7,6 @@ .. moduleauthor:: Just van Rossum <just@letterror.com> -.. versionadded:: 2.3 - This module adds the ability to import Python modules (:file:`\*.py`, :file:`\*.py[co]`) and packages from ZIP-format archives. It is usually not needed to use the :mod:`zipimport` module explicitly; it is automatically used diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst index e57a156..3f051a7 100644 --- a/Doc/library/zlib.rst +++ b/Doc/library/zlib.rst @@ -130,7 +130,6 @@ Compression objects support the following methods: Returns a copy of the compression object. This can be used to efficiently compress a set of data that share a common initial prefix. - .. versionadded:: 2.5 Decompression objects support the following methods, and two attributes: @@ -192,8 +191,6 @@ Decompression objects support the following methods, and two attributes: of the decompressor midway through the data stream in order to speed up random seeks into the stream at a future point. - .. versionadded:: 2.5 - .. seealso:: |