mirror of https://github.com/python/cpython
Docs: align usage of versionadded/versionchanged with recommended practice (#114409)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
This commit is contained in:
parent
665b8f365e
commit
1d7bddd961
|
@ -1936,8 +1936,8 @@ FileType objects
|
|||
>>> parser.parse_args(['-'])
|
||||
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>)
|
||||
|
||||
.. versionadded:: 3.4
|
||||
The *encodings* and *errors* keyword arguments.
|
||||
.. versionchanged:: 3.4
|
||||
Added the *encodings* and *errors* parameters.
|
||||
|
||||
|
||||
Argument groups
|
||||
|
|
|
@ -77,8 +77,8 @@ and work with streams:
|
|||
.. versionchanged:: 3.7
|
||||
Added the *ssl_handshake_timeout* parameter.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
Added *happy_eyeballs_delay* and *interleave* parameters.
|
||||
.. versionchanged:: 3.8
|
||||
Added the *happy_eyeballs_delay* and *interleave* parameters.
|
||||
|
||||
.. versionchanged:: 3.10
|
||||
Removed the *loop* parameter.
|
||||
|
|
|
@ -132,8 +132,8 @@ The :mod:`bdb` module also defines two classes:
|
|||
frame is considered to originate in a certain module is determined
|
||||
by the ``__name__`` in the frame globals.
|
||||
|
||||
.. versionadded:: 3.1
|
||||
The *skip* argument.
|
||||
.. versionchanged:: 3.1
|
||||
Added the *skip* parameter.
|
||||
|
||||
The following methods of :class:`Bdb` normally don't need to be overridden.
|
||||
|
||||
|
|
|
@ -171,8 +171,8 @@ And::
|
|||
should be higher than the number of workers
|
||||
for :class:`ProcessPoolExecutor`.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
The *thread_name_prefix* argument was added to allow users to
|
||||
.. versionchanged:: 3.6
|
||||
Added the *thread_name_prefix* parameter to allow users to
|
||||
control the :class:`threading.Thread` names for worker threads created by
|
||||
the pool for easier debugging.
|
||||
|
||||
|
|
|
@ -1045,14 +1045,14 @@ ConfigParser Objects
|
|||
config.read(['site.cfg', os.path.expanduser('~/.myapp.cfg')],
|
||||
encoding='cp1250')
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *encoding* parameter. Previously, all files were read using the
|
||||
default encoding for :func:`open`.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *encoding* parameter.
|
||||
Previously, all files were read using the default encoding for :func:`open`.
|
||||
|
||||
.. versionadded:: 3.6.1
|
||||
.. versionchanged:: 3.6.1
|
||||
The *filenames* parameter accepts a :term:`path-like object`.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
.. versionchanged:: 3.7
|
||||
The *filenames* parameter accepts a :class:`bytes` object.
|
||||
|
||||
|
||||
|
@ -1291,9 +1291,9 @@ Exceptions
|
|||
that is already present or in strict parsers when a section if found more
|
||||
than once in a single input file, string or dictionary.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
Optional ``source`` and ``lineno`` attributes and arguments to
|
||||
:meth:`!__init__` were added.
|
||||
.. versionchanged:: 3.2
|
||||
Added the optional *source* and *lineno* attributes and parameters to
|
||||
:meth:`!__init__`.
|
||||
|
||||
|
||||
.. exception:: DuplicateOptionError
|
||||
|
|
|
@ -859,8 +859,8 @@ Constructor:
|
|||
|
||||
If an argument outside those ranges is given, :exc:`ValueError` is raised.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
Added the ``fold`` argument.
|
||||
.. versionchanged:: 3.6
|
||||
Added the *fold* parameter.
|
||||
|
||||
Other constructors, all class methods:
|
||||
|
||||
|
@ -1258,8 +1258,8 @@ Instance methods:
|
|||
:class:`datetime` objects are also supported by generic function
|
||||
:func:`copy.replace`.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
Added the ``fold`` argument.
|
||||
.. versionchanged:: 3.6
|
||||
Added the *fold* parameter.
|
||||
|
||||
|
||||
.. method:: datetime.astimezone(tz=None)
|
||||
|
@ -1502,8 +1502,8 @@ Instance methods:
|
|||
>>> dt.isoformat(timespec='microseconds')
|
||||
'2015-01-01T12:30:59.000000'
|
||||
|
||||
.. versionadded:: 3.6
|
||||
Added the *timespec* argument.
|
||||
.. versionchanged:: 3.6
|
||||
Added the *timespec* parameter.
|
||||
|
||||
|
||||
.. method:: datetime.__str__()
|
||||
|
@ -1839,8 +1839,8 @@ Instance methods:
|
|||
:class:`time` objects are also supported by generic function
|
||||
:func:`copy.replace`.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
Added the ``fold`` argument.
|
||||
.. versionchanged:: 3.6
|
||||
Added the *fold* parameter.
|
||||
|
||||
|
||||
.. method:: time.isoformat(timespec='auto')
|
||||
|
@ -1883,8 +1883,8 @@ Instance methods:
|
|||
>>> dt.isoformat(timespec='auto')
|
||||
'12:34:56'
|
||||
|
||||
.. versionadded:: 3.6
|
||||
Added the *timespec* argument.
|
||||
.. versionchanged:: 3.6
|
||||
Added the *timespec* parameter.
|
||||
|
||||
|
||||
.. method:: time.__str__()
|
||||
|
|
|
@ -52,8 +52,8 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
|
|||
the purpose of sequence matching. This heuristic can be turned off by setting
|
||||
the ``autojunk`` argument to ``False`` when creating the :class:`SequenceMatcher`.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *autojunk* parameter.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *autojunk* parameter.
|
||||
|
||||
|
||||
.. class:: Differ
|
||||
|
@ -383,8 +383,8 @@ The :class:`SequenceMatcher` class has this constructor:
|
|||
The optional argument *autojunk* can be used to disable the automatic junk
|
||||
heuristic.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *autojunk* parameter.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *autojunk* parameter.
|
||||
|
||||
SequenceMatcher objects get three data attributes: *bjunk* is the
|
||||
set of elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of
|
||||
|
|
|
@ -219,7 +219,6 @@ added matters. To illustrate::
|
|||
Default: :const:`False`.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
The *mangle_from_* parameter.
|
||||
|
||||
|
||||
.. attribute:: message_factory
|
||||
|
|
|
@ -1073,8 +1073,8 @@ are always available. They are listed here in alphabetical order.
|
|||
such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and
|
||||
``heapq.nlargest(1, iterable, key=keyfunc)``.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
The *default* keyword-only argument.
|
||||
.. versionchanged:: 3.4
|
||||
Added the *default* keyword-only parameter.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
The *key* can be ``None``.
|
||||
|
@ -1111,8 +1111,8 @@ are always available. They are listed here in alphabetical order.
|
|||
such as ``sorted(iterable, key=keyfunc)[0]`` and ``heapq.nsmallest(1,
|
||||
iterable, key=keyfunc)``.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
The *default* keyword-only argument.
|
||||
.. versionchanged:: 3.4
|
||||
Added the *default* keyword-only parameter.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
The *key* can be ``None``.
|
||||
|
|
|
@ -194,7 +194,7 @@ The :mod:`functools` module defines the following functions:
|
|||
In contrast, the tuple arguments ``('answer', Decimal(42))`` and
|
||||
``('answer', Fraction(42))`` are treated as equivalent.
|
||||
|
||||
The wrapped function is instrumented with a :func:`cache_parameters`
|
||||
The wrapped function is instrumented with a :func:`!cache_parameters`
|
||||
function that returns a new :class:`dict` showing the values for *maxsize*
|
||||
and *typed*. This is for information purposes only. Mutating the values
|
||||
has no effect.
|
||||
|
@ -275,8 +275,8 @@ The :mod:`functools` module defines the following functions:
|
|||
.. versionchanged:: 3.8
|
||||
Added the *user_function* option.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
Added the function :func:`cache_parameters`
|
||||
.. versionchanged:: 3.9
|
||||
Added the function :func:`!cache_parameters`
|
||||
|
||||
.. decorator:: total_ordering
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@ HTTPConnection Objects
|
|||
:class:`str` or bytes-like object that is not also a file as the
|
||||
body representation.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
.. versionchanged:: 3.2
|
||||
*body* can now be an iterable.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
|
@ -461,9 +461,8 @@ also send your request step by step, by using the four functions below.
|
|||
This is to avoid premature termination of the read of the request by
|
||||
the target server due to malformed encoding.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
Chunked encoding support. The *encode_chunked* parameter was
|
||||
added.
|
||||
.. versionchanged:: 3.6
|
||||
Added chunked encoding support and the *encode_chunked* parameter.
|
||||
|
||||
|
||||
.. method:: HTTPConnection.send(data)
|
||||
|
|
|
@ -328,8 +328,8 @@ provides three different variants:
|
|||
or the current directory if *directory* is not provided, directly
|
||||
mapping the directory structure to HTTP requests.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
The *directory* parameter.
|
||||
.. versionchanged:: 3.7
|
||||
Added the *directory* parameter.
|
||||
|
||||
.. versionchanged:: 3.9
|
||||
The *directory* parameter accepts a :term:`path-like object`.
|
||||
|
@ -438,11 +438,11 @@ to bind to localhost only::
|
|||
|
||||
python -m http.server --bind 127.0.0.1
|
||||
|
||||
.. versionadded:: 3.4
|
||||
``--bind`` argument was introduced.
|
||||
.. versionchanged:: 3.4
|
||||
Added the ``--bind`` option.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
``--bind`` argument enhanced to support IPv6
|
||||
.. versionchanged:: 3.8
|
||||
Support IPv6 in the ``--bind`` option.
|
||||
|
||||
By default, the server uses the current directory. The option ``-d/--directory``
|
||||
specifies a directory to which it should serve the files. For example,
|
||||
|
@ -450,8 +450,8 @@ the following command uses a specific directory::
|
|||
|
||||
python -m http.server --directory /tmp/
|
||||
|
||||
.. versionadded:: 3.7
|
||||
``--directory`` argument was introduced.
|
||||
.. versionchanged:: 3.7
|
||||
Added the ``--directory`` option.
|
||||
|
||||
By default, the server is conformant to HTTP/1.0. The option ``-p/--protocol``
|
||||
specifies the HTTP version to which the server is conformant. For example, the
|
||||
|
@ -459,8 +459,8 @@ following command runs an HTTP/1.1 conformant server::
|
|||
|
||||
python -m http.server --protocol HTTP/1.1
|
||||
|
||||
.. versionadded:: 3.11
|
||||
``--protocol`` argument was introduced.
|
||||
.. versionchanged:: 3.11
|
||||
Added the ``--protocol`` option.
|
||||
|
||||
.. class:: CGIHTTPRequestHandler(request, client_address, server)
|
||||
|
||||
|
@ -537,5 +537,5 @@ default :class:`BaseHTTPRequestHandler` ``.log_message``
|
|||
implementation. This could allow remote clients connecting to your
|
||||
server to send nefarious control codes to your terminal.
|
||||
|
||||
.. versionadded:: 3.12
|
||||
.. versionchanged:: 3.12
|
||||
Control characters are scrubbed in stderr logs.
|
||||
|
|
|
@ -127,8 +127,8 @@ in :mod:`logging` itself) and defining handlers which are declared either in
|
|||
application (e.g. based on command-line parameters or other aspects
|
||||
of the runtime environment) before being passed to ``fileConfig``.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
The *encoding* parameter is added.
|
||||
.. versionchanged:: 3.10
|
||||
Added the *encoding* parameter.
|
||||
|
||||
.. versionchanged:: 3.12
|
||||
An exception will be thrown if the provided file
|
||||
|
|
|
@ -871,8 +871,8 @@ supports sending logging messages to an email address via SMTP.
|
|||
A timeout can be specified for communication with the SMTP server using the
|
||||
*timeout* argument.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *timeout* argument was added.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *timeout* parameter.
|
||||
|
||||
.. method:: emit(record)
|
||||
|
||||
|
|
|
@ -615,14 +615,14 @@ Formatter Objects
|
|||
``logging.Formatter('%(ip)s %(message)s', defaults={"ip": None})``
|
||||
:type defaults: dict[str, Any]
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *style* parameter.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *style* parameter.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
The *validate* parameter.
|
||||
.. versionchanged:: 3.8
|
||||
Added the *validate* parameter.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
The *defaults* parameter.
|
||||
.. versionchanged:: 3.10
|
||||
Added the *defaults* parameter.
|
||||
|
||||
|
||||
.. method:: format(record)
|
||||
|
|
|
@ -88,8 +88,8 @@ copying of data.
|
|||
*track* is ignored on Windows, which has its own tracking and
|
||||
automatically deletes shared memory when all handles to it have been closed.
|
||||
|
||||
.. versionadded:: 3.13
|
||||
The *track* parameter.
|
||||
.. versionchanged:: 3.13
|
||||
Added the *track* parameter.
|
||||
|
||||
.. method:: close()
|
||||
|
||||
|
|
|
@ -1254,8 +1254,8 @@ as internal buffering of data.
|
|||
:meth:`~file.read` and :meth:`~file.write` methods (and many more). To
|
||||
wrap a file descriptor in a file object, use :func:`fdopen`.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* argument.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter.
|
||||
|
||||
.. versionchanged:: 3.5
|
||||
If the system call is interrupted and the signal handler does not raise an
|
||||
|
@ -1991,7 +1991,7 @@ features:
|
|||
|
||||
.. audit-event:: os.chdir path os.chdir
|
||||
|
||||
.. versionadded:: 3.3
|
||||
.. versionchanged:: 3.3
|
||||
Added support for specifying *path* as a file descriptor
|
||||
on some platforms.
|
||||
|
||||
|
@ -2023,8 +2023,8 @@ features:
|
|||
|
||||
.. availability:: Unix, not Emscripten, not WASI.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *follow_symlinks* argument.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *follow_symlinks* parameter.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
@ -2210,8 +2210,8 @@ features:
|
|||
.. versionchanged:: 3.2
|
||||
Added Windows support.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
Added the *src_dir_fd*, *dst_dir_fd*, and *follow_symlinks* arguments.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *src_dir_fd*, *dst_dir_fd*, and *follow_symlinks* parameters.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object` for *src* and *dst*.
|
||||
|
@ -2375,8 +2375,8 @@ features:
|
|||
|
||||
.. audit-event:: os.mkdir path,mode,dir_fd os.mkdir
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* argument.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
@ -2409,8 +2409,8 @@ features:
|
|||
|
||||
.. audit-event:: os.mkdir path,mode,dir_fd os.makedirs
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *exist_ok* parameter.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *exist_ok* parameter.
|
||||
|
||||
.. versionchanged:: 3.4.1
|
||||
|
||||
|
@ -2443,8 +2443,8 @@ features:
|
|||
|
||||
.. availability:: Unix, not Emscripten, not WASI.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* argument.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
@ -2465,8 +2465,8 @@ features:
|
|||
|
||||
.. availability:: Unix, not Emscripten, not WASI.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* argument.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
@ -2546,8 +2546,8 @@ features:
|
|||
.. versionchanged:: 3.2
|
||||
Added support for Windows 6.0 (Vista) symbolic links.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* argument.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object` on Unix.
|
||||
|
@ -2577,8 +2577,8 @@ features:
|
|||
|
||||
.. audit-event:: os.remove path,dir_fd os.remove
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* argument.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
@ -2628,8 +2628,8 @@ features:
|
|||
|
||||
.. audit-event:: os.rename src,dst,src_dir_fd,dst_dir_fd os.rename
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *src_dir_fd* and *dst_dir_fd* arguments.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *src_dir_fd* and *dst_dir_fd* parameters.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object` for *src* and *dst*.
|
||||
|
@ -2684,8 +2684,8 @@ features:
|
|||
|
||||
.. audit-event:: os.rmdir path,dir_fd os.rmdir
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* parameter.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
@ -2759,7 +2759,7 @@ features:
|
|||
|
||||
.. versionadded:: 3.5
|
||||
|
||||
.. versionadded:: 3.6
|
||||
.. versionchanged:: 3.6
|
||||
Added support for the :term:`context manager` protocol and the
|
||||
:func:`~scandir.close()` method. If a :func:`scandir` iterator is neither
|
||||
exhausted nor explicitly closed a :exc:`ResourceWarning` will be emitted
|
||||
|
@ -2973,9 +2973,9 @@ features:
|
|||
|
||||
:func:`fstat` and :func:`lstat` functions.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
Added the *dir_fd* and *follow_symlinks* arguments, specifying a file
|
||||
descriptor instead of a path.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* and *follow_symlinks* parameters,
|
||||
specifying a file descriptor instead of a path.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
@ -3056,16 +3056,22 @@ features:
|
|||
|
||||
Time of most recent access expressed in nanoseconds as an integer.
|
||||
|
||||
.. versionadded: 3.3
|
||||
|
||||
.. attribute:: st_mtime_ns
|
||||
|
||||
Time of most recent content modification expressed in nanoseconds as an
|
||||
integer.
|
||||
|
||||
.. versionadded: 3.3
|
||||
|
||||
.. attribute:: st_ctime_ns
|
||||
|
||||
Time of most recent metadata change expressed in nanoseconds as an
|
||||
integer.
|
||||
|
||||
.. versionadded: 3.3
|
||||
|
||||
.. versionchanged:: 3.12
|
||||
``st_ctime_ns`` is deprecated on Windows. Use ``st_birthtime_ns``
|
||||
for the file creation time. In the future, ``st_ctime`` will contain
|
||||
|
@ -3166,6 +3172,8 @@ features:
|
|||
See the :const:`!FILE_ATTRIBUTE_* <stat.FILE_ATTRIBUTE_ARCHIVE>`
|
||||
constants in the :mod:`stat` module.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
|
||||
.. attribute:: st_reparse_tag
|
||||
|
||||
When :attr:`st_file_attributes` has the :const:`~stat.FILE_ATTRIBUTE_REPARSE_POINT`
|
||||
|
@ -3186,13 +3194,6 @@ features:
|
|||
some implementations. For compatibility with older Python versions,
|
||||
accessing :class:`stat_result` as a tuple always returns integers.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
Added the :attr:`st_atime_ns`, :attr:`st_mtime_ns`, and
|
||||
:attr:`st_ctime_ns` members.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
Added the :attr:`st_file_attributes` member on Windows.
|
||||
|
||||
.. versionchanged:: 3.5
|
||||
Windows now returns the file index as :attr:`st_ino` when
|
||||
available.
|
||||
|
@ -3257,7 +3258,7 @@ features:
|
|||
.. versionchanged:: 3.2
|
||||
The :const:`ST_RDONLY` and :const:`ST_NOSUID` constants were added.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
.. versionchanged:: 3.3
|
||||
Added support for specifying *path* as an open file descriptor.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
|
@ -3269,8 +3270,8 @@ features:
|
|||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
Added :attr:`f_fsid`.
|
||||
.. versionchanged:: 3.7
|
||||
Added the :attr:`f_fsid` attribute.
|
||||
|
||||
|
||||
.. data:: supports_dir_fd
|
||||
|
@ -3394,8 +3395,8 @@ features:
|
|||
.. versionchanged:: 3.2
|
||||
Added support for Windows 6.0 (Vista) symbolic links.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
Added the *dir_fd* argument, and now allow *target_is_directory*
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter, and now allow *target_is_directory*
|
||||
on non-Windows platforms.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
|
@ -3443,8 +3444,8 @@ features:
|
|||
|
||||
.. audit-event:: os.remove path,dir_fd os.unlink
|
||||
|
||||
.. versionadded:: 3.3
|
||||
The *dir_fd* parameter.
|
||||
.. versionchanged:: 3.3
|
||||
Added the *dir_fd* parameter.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
|
@ -3482,7 +3483,7 @@ features:
|
|||
|
||||
.. audit-event:: os.utime path,times,ns,dir_fd os.utime
|
||||
|
||||
.. versionadded:: 3.3
|
||||
.. versionchanged:: 3.3
|
||||
Added support for specifying *path* as an open file descriptor,
|
||||
and the *dir_fd*, *follow_symlinks*, and *ns* parameters.
|
||||
|
||||
|
@ -4217,7 +4218,7 @@ to be ignored.
|
|||
|
||||
.. availability:: Unix, Windows, not Emscripten, not WASI.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
.. versionchanged:: 3.3
|
||||
Added support for specifying *path* as an open file descriptor
|
||||
for :func:`execve`.
|
||||
|
||||
|
@ -4471,8 +4472,8 @@ written in Python, such as a mail server's external command delivery program.
|
|||
|
||||
.. availability:: Unix, Windows, not Emscripten, not WASI.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
Windows support.
|
||||
.. versionchanged:: 3.2
|
||||
Added Windows support.
|
||||
|
||||
|
||||
.. function:: killpg(pgid, sig, /)
|
||||
|
|
|
@ -48,7 +48,7 @@ at the location you want to break into the debugger, and then run the program.
|
|||
You can then step through the code following this statement, and continue
|
||||
running without the debugger using the :pdbcmd:`continue` command.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
.. versionchanged:: 3.7
|
||||
The built-in :func:`breakpoint()`, when called with defaults, can be used
|
||||
instead of ``import pdb; pdb.set_trace()``.
|
||||
|
||||
|
@ -86,12 +86,12 @@ 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:: 3.2
|
||||
``-c`` option is introduced to execute commands as if given
|
||||
in a :file:`.pdbrc` file, see :ref:`debugger-commands`.
|
||||
.. versionchanged:: 3.2
|
||||
Added the ``-c`` option to execute commands as if given
|
||||
in a :file:`.pdbrc` file; see :ref:`debugger-commands`.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
``-m`` option is introduced to execute modules similar to the way
|
||||
.. versionchanged:: 3.7
|
||||
Added the ``-m`` option to execute modules similar to the way
|
||||
``python -m`` does. As with a script, the debugger will pause execution just
|
||||
before the first line of the module.
|
||||
|
||||
|
@ -209,12 +209,12 @@ access further features, you have to do this yourself:
|
|||
|
||||
.. audit-event:: pdb.Pdb "" pdb.Pdb
|
||||
|
||||
.. versionadded:: 3.1
|
||||
The *skip* argument.
|
||||
.. versionchanged:: 3.1
|
||||
Added the *skip* parameter.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *nosigint* argument. Previously, a SIGINT handler was never set by
|
||||
Pdb.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *nosigint* parameter.
|
||||
Previously, a SIGINT handler was never set by Pdb.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
The *readrc* argument.
|
||||
|
@ -467,8 +467,8 @@ can be overridden by the local file.
|
|||
raised or propagated is indicated by ``>>``, if it differs from the current
|
||||
line.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The ``>>`` marker.
|
||||
.. versionchanged:: 3.2
|
||||
Added the ``>>`` marker.
|
||||
|
||||
.. pdbcommand:: ll | longlist
|
||||
|
||||
|
@ -583,8 +583,8 @@ can be overridden by the local file.
|
|||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
.. versionadded:: 3.13
|
||||
``exit()`` and ``quit()`` can be used to exit :pdbcmd:`interact`
|
||||
.. versionchanged:: 3.13
|
||||
``exit()`` and ``quit()`` can be used to exit the :pdbcmd:`interact`
|
||||
command.
|
||||
|
||||
.. versionchanged:: 3.13
|
||||
|
|
|
@ -94,8 +94,8 @@ Programmatic Interface
|
|||
a short description. The value of *annotate* is used as a hint for
|
||||
the column where annotation should start.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *annotate* argument.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *annotate* parameter.
|
||||
|
||||
.. function:: genops(pickle)
|
||||
|
||||
|
|
|
@ -289,8 +289,8 @@ Directory and files operations
|
|||
copy the file more efficiently. See
|
||||
:ref:`shutil-platform-dependent-efficient-copy-operations` section.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
The *dirs_exist_ok* parameter.
|
||||
.. versionchanged:: 3.8
|
||||
Added the *dirs_exist_ok* parameter.
|
||||
|
||||
.. function:: rmtree(path, ignore_errors=False, onerror=None, *, onexc=None, dir_fd=None)
|
||||
|
||||
|
|
|
@ -308,10 +308,10 @@ default values. The arguments that are most commonly needed are:
|
|||
If text mode is not used, *stdin*, *stdout* and *stderr* will be opened as
|
||||
binary streams. No encoding or line ending conversion is performed.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
Added *encoding* and *errors* parameters.
|
||||
.. versionchanged:: 3.6
|
||||
Added the *encoding* and *errors* parameters.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
.. versionchanged:: 3.7
|
||||
Added the *text* parameter as an alias for *universal_newlines*.
|
||||
|
||||
.. note::
|
||||
|
@ -684,8 +684,8 @@ functions.
|
|||
is only changed on platforms that support this (only Linux at this time of
|
||||
writing). Other platforms will ignore this parameter.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
The ``pipesize`` parameter was added.
|
||||
.. versionchanged:: 3.10
|
||||
Added the *pipesize* parameter.
|
||||
|
||||
Popen objects are supported as context managers via the :keyword:`with` statement:
|
||||
on exit, standard file descriptors are closed, and the process is waited for.
|
||||
|
@ -1538,8 +1538,8 @@ handling consistency are valid for these functions.
|
|||
as it did in Python 3.3.3 and earlier. exitcode has the same value as
|
||||
:attr:`~Popen.returncode`.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
Added *encoding* and *errors* arguments.
|
||||
.. versionchanged:: 3.11
|
||||
Added the *encoding* and *errors* parameters.
|
||||
|
||||
.. function:: getoutput(cmd, *, encoding=None, errors=None)
|
||||
|
||||
|
@ -1556,8 +1556,8 @@ handling consistency are valid for these functions.
|
|||
.. versionchanged:: 3.3.4
|
||||
Windows support added
|
||||
|
||||
.. versionadded:: 3.11
|
||||
Added *encoding* and *errors* arguments.
|
||||
.. versionchanged:: 3.11
|
||||
Added the *encoding* and *errors* parameters.
|
||||
|
||||
|
||||
Notes
|
||||
|
|
|
@ -2196,8 +2196,8 @@ Loading and running tests
|
|||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
.. versionadded:: 3.12
|
||||
Added *durations* keyword argument.
|
||||
.. versionchanged:: 3.12
|
||||
Added the *durations* keyword parameter.
|
||||
|
||||
.. data:: defaultTestLoader
|
||||
|
||||
|
|
|
@ -729,8 +729,8 @@ task isn't already covered by the URL parsing functions above.
|
|||
.. versionchanged:: 3.2
|
||||
*query* supports bytes and string objects.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
*quote_via* parameter.
|
||||
.. versionchanged:: 3.5
|
||||
Added the *quote_via* parameter.
|
||||
|
||||
|
||||
.. seealso::
|
||||
|
|
|
@ -201,13 +201,13 @@ creation according to their needs, the :class:`EnvBuilder` class.
|
|||
.. versionchanged:: 3.4
|
||||
Added the ``with_pip`` parameter
|
||||
|
||||
.. versionadded:: 3.6
|
||||
.. versionchanged:: 3.6
|
||||
Added the ``prompt`` parameter
|
||||
|
||||
.. versionadded:: 3.9
|
||||
.. versionchanged:: 3.9
|
||||
Added the ``upgrade_deps`` parameter
|
||||
|
||||
.. versionadded:: 3.13
|
||||
.. versionchanged:: 3.13
|
||||
Added the ``scm_ignore_files`` parameter
|
||||
|
||||
Creators of third-party virtual environment tools will be free to use the
|
||||
|
|
|
@ -705,11 +705,11 @@ Functions
|
|||
meaning as in :meth:`ElementTree.write`. Returns an (optionally) encoded string
|
||||
containing the XML data.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
The *short_empty_elements* parameter.
|
||||
.. versionchanged:: 3.4
|
||||
Added the *short_empty_elements* parameter.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
The *xml_declaration* and *default_namespace* parameters.
|
||||
.. versionchanged:: 3.8
|
||||
Added the *xml_declaration* and *default_namespace* parameters.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
The :func:`tostring` function now preserves the attribute order
|
||||
|
@ -732,11 +732,11 @@ Functions
|
|||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
.. versionadded:: 3.4
|
||||
The *short_empty_elements* parameter.
|
||||
.. versionchanged:: 3.4
|
||||
Added the *short_empty_elements* parameter.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
The *xml_declaration* and *default_namespace* parameters.
|
||||
.. versionchanged:: 3.8
|
||||
Added the *xml_declaration* and *default_namespace* parameters.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
The :func:`tostringlist` function now preserves the attribute order
|
||||
|
@ -858,8 +858,8 @@ Functions
|
|||
this is a Unicode string. If the loader fails, it can return None or
|
||||
raise an exception.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
The *base_url* and *max_depth* parameters.
|
||||
.. versionchanged:: 3.9
|
||||
Added the *base_url* and *max_depth* parameters.
|
||||
|
||||
|
||||
.. _elementtree-element-objects:
|
||||
|
@ -1189,8 +1189,8 @@ ElementTree Objects
|
|||
:term:`file object`; make sure you do not try to write a string to a
|
||||
binary stream and vice versa.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
The *short_empty_elements* parameter.
|
||||
.. versionchanged:: 3.4
|
||||
Added the *short_empty_elements* parameter.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
The :meth:`write` method now preserves the attribute order specified
|
||||
|
|
|
@ -71,8 +71,8 @@ or as base classes.
|
|||
content: if ``False`` (the default) they are emitted as a pair of start/end
|
||||
tags, if set to ``True`` they are emitted as a single self-closed tag.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *short_empty_elements* parameter.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *short_empty_elements* parameter.
|
||||
|
||||
|
||||
.. class:: XMLFilterBase(base)
|
||||
|
|
|
@ -171,8 +171,8 @@ The module defines two convenience functions:
|
|||
passed to the ``zipfile.ZipFile`` class, and must supply the methods
|
||||
needed by that class.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
Added the *filter* and *compressed* arguments.
|
||||
.. versionchanged:: 3.7
|
||||
Added the *filter* and *compressed* parameters.
|
||||
|
||||
.. function:: get_interpreter(archive)
|
||||
|
||||
|
|
|
@ -79,9 +79,9 @@ The module defines the following items:
|
|||
of the last modification to the file; the fields are described in section
|
||||
:ref:`zipinfo-objects`.
|
||||
|
||||
.. versionadded:: 3.13
|
||||
A public ``.compress_level`` attribute has been added to expose the
|
||||
formerly protected ``._compresslevel``. The older protected name
|
||||
.. versionchanged:: 3.13
|
||||
A public :attr:`!compress_level` attribute has been added to expose the
|
||||
formerly protected :attr:`!_compresslevel`. The older protected name
|
||||
continues to work as a property for backwards compatibility.
|
||||
|
||||
.. function:: is_zipfile(filename)
|
||||
|
@ -218,7 +218,7 @@ ZipFile Objects
|
|||
That flag takes precedence over *metadata_encoding*, which is
|
||||
a Python-specific extension.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
.. versionchanged:: 3.2
|
||||
Added the ability to use :class:`ZipFile` as a context manager.
|
||||
|
||||
.. versionchanged:: 3.3
|
||||
|
@ -241,8 +241,8 @@ ZipFile Objects
|
|||
.. versionchanged:: 3.7
|
||||
Add the *compresslevel* parameter.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
The *strict_timestamps* keyword-only argument
|
||||
.. versionchanged:: 3.8
|
||||
The *strict_timestamps* keyword-only parameter.
|
||||
|
||||
.. versionchanged:: 3.11
|
||||
Added support for specifying member name encoding for reading
|
||||
|
@ -648,8 +648,8 @@ The :class:`PyZipFile` constructor takes the same parameters as the
|
|||
.. class:: PyZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=True, \
|
||||
optimize=-1)
|
||||
|
||||
.. versionadded:: 3.2
|
||||
The *optimize* parameter.
|
||||
.. versionchanged:: 3.2
|
||||
Added the *optimize* parameter.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
ZIP64 extensions are enabled by default.
|
||||
|
@ -704,8 +704,8 @@ The :class:`PyZipFile` constructor takes the same parameters as the
|
|||
test/bogus/__init__.pyc # Subpackage directory
|
||||
test/bogus/myfile.pyc # Submodule test.bogus.myfile
|
||||
|
||||
.. versionadded:: 3.4
|
||||
The *filterfunc* parameter.
|
||||
.. versionchanged:: 3.4
|
||||
Added the *filterfunc* parameter.
|
||||
|
||||
.. versionchanged:: 3.6.2
|
||||
The *pathname* parameter accepts a :term:`path-like object`.
|
||||
|
@ -749,8 +749,8 @@ file:
|
|||
.. versionchanged:: 3.6.2
|
||||
The *filename* parameter accepts a :term:`path-like object`.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
The *strict_timestamps* keyword-only argument
|
||||
.. versionchanged:: 3.8
|
||||
Added the *strict_timestamps* keyword-only parameter.
|
||||
|
||||
|
||||
Instances have the following methods and attributes:
|
||||
|
|
Loading…
Reference in New Issue