mirror of https://github.com/python/cpython
gh-123517: Remove unnecessary ``:meth:`` parentheses (#123518)
This commit is contained in:
parent
34ddb64d08
commit
cf472577e2
|
@ -318,10 +318,10 @@ Macros for the convenience of modules implementing the DB API:
|
||||||
.. c:function:: PyObject* PyDateTime_FromTimestamp(PyObject *args)
|
.. c:function:: PyObject* PyDateTime_FromTimestamp(PyObject *args)
|
||||||
|
|
||||||
Create and return a new :class:`datetime.datetime` object given an argument
|
Create and return a new :class:`datetime.datetime` object given an argument
|
||||||
tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`.
|
tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp`.
|
||||||
|
|
||||||
|
|
||||||
.. c:function:: PyObject* PyDate_FromTimestamp(PyObject *args)
|
.. c:function:: PyObject* PyDate_FromTimestamp(PyObject *args)
|
||||||
|
|
||||||
Create and return a new :class:`datetime.date` object given an argument
|
Create and return a new :class:`datetime.date` object given an argument
|
||||||
tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`.
|
tuple suitable for passing to :meth:`datetime.date.fromtimestamp`.
|
||||||
|
|
|
@ -67,7 +67,7 @@ although there is currently no date scheduled for their removal.
|
||||||
* Implicit ``None`` on return values.
|
* Implicit ``None`` on return values.
|
||||||
|
|
||||||
* :mod:`logging`: the ``warn()`` method has been deprecated
|
* :mod:`logging`: the ``warn()`` method has been deprecated
|
||||||
since Python 3.3, use :meth:`~logging.warning()` instead.
|
since Python 3.3, use :meth:`~logging.warning` instead.
|
||||||
|
|
||||||
* :mod:`mailbox`: Use of StringIO input and text mode is deprecated, use
|
* :mod:`mailbox`: Use of StringIO input and text mode is deprecated, use
|
||||||
BytesIO and binary mode instead.
|
BytesIO and binary mode instead.
|
||||||
|
|
|
@ -447,7 +447,7 @@ Further, the attributes can be deleted, setting the C pointers to ``NULL``. Eve
|
||||||
though we can make sure the members are initialized to non-``NULL`` values, the
|
though we can make sure the members are initialized to non-``NULL`` values, the
|
||||||
members can be set to ``NULL`` if the attributes are deleted.
|
members can be set to ``NULL`` if the attributes are deleted.
|
||||||
|
|
||||||
We define a single method, :meth:`!Custom.name()`, that outputs the objects name as the
|
We define a single method, :meth:`!Custom.name`, that outputs the objects name as the
|
||||||
concatenation of the first and last names. ::
|
concatenation of the first and last names. ::
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
|
|
@ -1013,7 +1013,7 @@ Not as such.
|
||||||
For simple input parsing, the easiest approach is usually to split the line into
|
For simple input parsing, the easiest approach is usually to split the line into
|
||||||
whitespace-delimited words using the :meth:`~str.split` method of string objects
|
whitespace-delimited words using the :meth:`~str.split` method of string objects
|
||||||
and then convert decimal strings to numeric values using :func:`int` or
|
and then convert decimal strings to numeric values using :func:`int` or
|
||||||
:func:`float`. :meth:`!split()` supports an optional "sep" parameter which is useful
|
:func:`float`. :meth:`!split` supports an optional "sep" parameter which is useful
|
||||||
if the line uses something other than whitespace as a separator.
|
if the line uses something other than whitespace as a separator.
|
||||||
|
|
||||||
For more complicated input parsing, regular expressions are more powerful
|
For more complicated input parsing, regular expressions are more powerful
|
||||||
|
|
|
@ -803,7 +803,7 @@ The full C implementation can be found in :c:func:`!super_getattro` in
|
||||||
Summary of invocation logic
|
Summary of invocation logic
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
The mechanism for descriptors is embedded in the :meth:`__getattribute__()`
|
The mechanism for descriptors is embedded in the :meth:`__getattribute__`
|
||||||
methods for :class:`object`, :class:`type`, and :func:`super`.
|
methods for :class:`object`, :class:`type`, and :func:`super`.
|
||||||
|
|
||||||
The important points to remember are:
|
The important points to remember are:
|
||||||
|
|
|
@ -126,7 +126,7 @@ Running and stopping the loop
|
||||||
|
|
||||||
Run the event loop until :meth:`stop` is called.
|
Run the event loop until :meth:`stop` is called.
|
||||||
|
|
||||||
If :meth:`stop` is called before :meth:`run_forever()` is called,
|
If :meth:`stop` is called before :meth:`run_forever` is called,
|
||||||
the loop will poll the I/O selector once with a timeout of zero,
|
the loop will poll the I/O selector once with a timeout of zero,
|
||||||
run all callbacks scheduled in response to I/O events (and
|
run all callbacks scheduled in response to I/O events (and
|
||||||
those that were already scheduled), and then exit.
|
those that were already scheduled), and then exit.
|
||||||
|
@ -165,7 +165,7 @@ Running and stopping the loop
|
||||||
.. coroutinemethod:: loop.shutdown_asyncgens()
|
.. coroutinemethod:: loop.shutdown_asyncgens()
|
||||||
|
|
||||||
Schedule all currently open :term:`asynchronous generator` objects to
|
Schedule all currently open :term:`asynchronous generator` objects to
|
||||||
close with an :meth:`~agen.aclose()` call. After calling this method,
|
close with an :meth:`~agen.aclose` call. After calling this method,
|
||||||
the event loop will issue a warning if a new asynchronous generator
|
the event loop will issue a warning if a new asynchronous generator
|
||||||
is iterated. This should be used to reliably finalize all scheduled
|
is iterated. This should be used to reliably finalize all scheduled
|
||||||
asynchronous generators.
|
asynchronous generators.
|
||||||
|
@ -1402,7 +1402,7 @@ Allows customizing how exceptions are handled in the event loop.
|
||||||
|
|
||||||
This method should not be overloaded in subclassed
|
This method should not be overloaded in subclassed
|
||||||
event loops. For custom exception handling, use
|
event loops. For custom exception handling, use
|
||||||
the :meth:`set_exception_handler()` method.
|
the :meth:`set_exception_handler` method.
|
||||||
|
|
||||||
Enabling debug mode
|
Enabling debug mode
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -1485,7 +1485,7 @@ async/await code consider using the high-level
|
||||||
* *stdin* can be any of these:
|
* *stdin* can be any of these:
|
||||||
|
|
||||||
* a file-like object
|
* a file-like object
|
||||||
* an existing file descriptor (a positive integer), for example those created with :meth:`os.pipe()`
|
* an existing file descriptor (a positive integer), for example those created with :meth:`os.pipe`
|
||||||
* the :const:`subprocess.PIPE` constant (default) which will create a new
|
* the :const:`subprocess.PIPE` constant (default) which will create a new
|
||||||
pipe and connect it,
|
pipe and connect it,
|
||||||
* the value ``None`` which will make the subprocess inherit the file
|
* the value ``None`` which will make the subprocess inherit the file
|
||||||
|
|
|
@ -56,10 +56,10 @@ See also the main documentation section about the
|
||||||
* - :meth:`loop.close`
|
* - :meth:`loop.close`
|
||||||
- Close the event loop.
|
- Close the event loop.
|
||||||
|
|
||||||
* - :meth:`loop.is_running()`
|
* - :meth:`loop.is_running`
|
||||||
- Return ``True`` if the event loop is running.
|
- Return ``True`` if the event loop is running.
|
||||||
|
|
||||||
* - :meth:`loop.is_closed()`
|
* - :meth:`loop.is_closed`
|
||||||
- Return ``True`` if the event loop is closed.
|
- Return ``True`` if the event loop is closed.
|
||||||
|
|
||||||
* - ``await`` :meth:`loop.shutdown_asyncgens`
|
* - ``await`` :meth:`loop.shutdown_asyncgens`
|
||||||
|
|
|
@ -55,7 +55,7 @@ Queue
|
||||||
Return ``True`` if there are :attr:`maxsize` items in the queue.
|
Return ``True`` if there are :attr:`maxsize` items in the queue.
|
||||||
|
|
||||||
If the queue was initialized with ``maxsize=0`` (the default),
|
If the queue was initialized with ``maxsize=0`` (the default),
|
||||||
then :meth:`full()` never returns ``True``.
|
then :meth:`full` never returns ``True``.
|
||||||
|
|
||||||
.. coroutinemethod:: get()
|
.. coroutinemethod:: get()
|
||||||
|
|
||||||
|
|
|
@ -986,7 +986,7 @@ ConfigParser Objects
|
||||||
When *converters* is given, it should be a dictionary where each key
|
When *converters* is given, it should be a dictionary where each key
|
||||||
represents the name of a type converter and each value is a callable
|
represents the name of a type converter and each value is a callable
|
||||||
implementing the conversion from string to the desired datatype. Every
|
implementing the conversion from string to the desired datatype. Every
|
||||||
converter gets its own corresponding :meth:`!get*()` method on the parser
|
converter gets its own corresponding :meth:`!get*` method on the parser
|
||||||
object and section proxies.
|
object and section proxies.
|
||||||
|
|
||||||
It is possible to read several configurations into a single
|
It is possible to read several configurations into a single
|
||||||
|
@ -1026,7 +1026,7 @@ ConfigParser Objects
|
||||||
The *converters* argument was added.
|
The *converters* argument was added.
|
||||||
|
|
||||||
.. versionchanged:: 3.7
|
.. versionchanged:: 3.7
|
||||||
The *defaults* argument is read with :meth:`read_dict()`,
|
The *defaults* argument is read with :meth:`read_dict`,
|
||||||
providing consistent behavior across the parser: non-string
|
providing consistent behavior across the parser: non-string
|
||||||
keys and values are implicitly converted to strings.
|
keys and values are implicitly converted to strings.
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ Module contents
|
||||||
- *unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` method
|
- *unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` method
|
||||||
is generated according to how *eq* and *frozen* are set.
|
is generated according to how *eq* and *frozen* are set.
|
||||||
|
|
||||||
:meth:`!__hash__` is used by built-in :meth:`hash()`, and when objects are
|
:meth:`!__hash__` is used by built-in :meth:`hash`, and when objects are
|
||||||
added to hashed collections such as dictionaries and sets. Having a
|
added to hashed collections such as dictionaries and sets. Having a
|
||||||
:meth:`!__hash__` implies that instances of the class are immutable.
|
:meth:`!__hash__` implies that instances of the class are immutable.
|
||||||
Mutability is a complicated property that depends on the programmer's
|
Mutability is a complicated property that depends on the programmer's
|
||||||
|
|
|
@ -1053,7 +1053,7 @@ Other constructors, all class methods:
|
||||||
.. versionadded:: 3.7
|
.. versionadded:: 3.7
|
||||||
.. versionchanged:: 3.11
|
.. versionchanged:: 3.11
|
||||||
Previously, this method only supported formats that could be emitted by
|
Previously, this method only supported formats that could be emitted by
|
||||||
:meth:`date.isoformat()` or :meth:`datetime.isoformat()`.
|
:meth:`date.isoformat` or :meth:`datetime.isoformat`.
|
||||||
|
|
||||||
|
|
||||||
.. classmethod:: datetime.fromisocalendar(year, week, day)
|
.. classmethod:: datetime.fromisocalendar(year, week, day)
|
||||||
|
@ -1861,7 +1861,7 @@ Other constructor:
|
||||||
.. versionadded:: 3.7
|
.. versionadded:: 3.7
|
||||||
.. versionchanged:: 3.11
|
.. versionchanged:: 3.11
|
||||||
Previously, this method only supported formats that could be emitted by
|
Previously, this method only supported formats that could be emitted by
|
||||||
:meth:`time.isoformat()`.
|
:meth:`time.isoformat`.
|
||||||
|
|
||||||
|
|
||||||
Instance methods:
|
Instance methods:
|
||||||
|
|
|
@ -105,7 +105,7 @@ Here are the methods of the :class:`Message` class:
|
||||||
|
|
||||||
.. method:: __str__()
|
.. method:: __str__()
|
||||||
|
|
||||||
Equivalent to :meth:`.as_string()`. Allows ``str(msg)`` to produce a
|
Equivalent to :meth:`.as_string`. Allows ``str(msg)`` to produce a
|
||||||
string containing the formatted message.
|
string containing the formatted message.
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ Here are the methods of the :class:`Message` class:
|
||||||
|
|
||||||
.. method:: __bytes__()
|
.. method:: __bytes__()
|
||||||
|
|
||||||
Equivalent to :meth:`.as_bytes()`. Allows ``bytes(msg)`` to produce a
|
Equivalent to :meth:`.as_bytes`. Allows ``bytes(msg)`` to produce a
|
||||||
bytes object containing the formatted message.
|
bytes object containing the formatted message.
|
||||||
|
|
||||||
.. versionadded:: 3.4
|
.. versionadded:: 3.4
|
||||||
|
|
|
@ -124,7 +124,7 @@ message objects.
|
||||||
|
|
||||||
.. method:: __bytes__()
|
.. method:: __bytes__()
|
||||||
|
|
||||||
Equivalent to :meth:`.as_bytes()`. Allows ``bytes(msg)`` to produce a
|
Equivalent to :meth:`.as_bytes`. Allows ``bytes(msg)`` to produce a
|
||||||
bytes object containing the serialized message.
|
bytes object containing the serialized message.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -263,7 +263,7 @@ provides three different variants:
|
||||||
|
|
||||||
Adds a blank line
|
Adds a blank line
|
||||||
(indicating the end of the HTTP headers in the response)
|
(indicating the end of the HTTP headers in the response)
|
||||||
to the headers buffer and calls :meth:`flush_headers()`.
|
to the headers buffer and calls :meth:`flush_headers`.
|
||||||
|
|
||||||
.. versionchanged:: 3.2
|
.. versionchanged:: 3.2
|
||||||
The buffered headers are written to the output stream.
|
The buffered headers are written to the output stream.
|
||||||
|
|
|
@ -55,7 +55,7 @@ the backing store is natively made of bytes (such as in the case of a file),
|
||||||
encoding and decoding of data is made transparently as well as optional
|
encoding and decoding of data is made transparently as well as optional
|
||||||
translation of platform-specific newline characters.
|
translation of platform-specific newline characters.
|
||||||
|
|
||||||
The easiest way to create a text stream is with :meth:`open()`, optionally
|
The easiest way to create a text stream is with :meth:`open`, optionally
|
||||||
specifying an encoding::
|
specifying an encoding::
|
||||||
|
|
||||||
f = open("myfile.txt", "r", encoding="utf-8")
|
f = open("myfile.txt", "r", encoding="utf-8")
|
||||||
|
@ -77,7 +77,7 @@ objects. No encoding, decoding, or newline translation is performed. This
|
||||||
category of streams can be used for all kinds of non-text data, and also when
|
category of streams can be used for all kinds of non-text data, and also when
|
||||||
manual control over the handling of text data is desired.
|
manual control over the handling of text data is desired.
|
||||||
|
|
||||||
The easiest way to create a binary stream is with :meth:`open()` with ``'b'`` in
|
The easiest way to create a binary stream is with :meth:`open` with ``'b'`` in
|
||||||
the mode string::
|
the mode string::
|
||||||
|
|
||||||
f = open("myfile.jpg", "rb")
|
f = open("myfile.jpg", "rb")
|
||||||
|
|
|
@ -69,7 +69,7 @@ in :mod:`logging` itself) and defining handlers which are declared either in
|
||||||
dictConfigClass(config).configure()
|
dictConfigClass(config).configure()
|
||||||
|
|
||||||
For example, a subclass of :class:`DictConfigurator` could call
|
For example, a subclass of :class:`DictConfigurator` could call
|
||||||
``DictConfigurator.__init__()`` in its own :meth:`__init__()`, then
|
``DictConfigurator.__init__()`` in its own :meth:`__init__`, then
|
||||||
set up custom prefixes which would be usable in the subsequent
|
set up custom prefixes which would be usable in the subsequent
|
||||||
:meth:`configure` call. :attr:`dictConfigClass` would be bound to
|
:meth:`configure` call. :attr:`dictConfigClass` would be bound to
|
||||||
this new subclass, and then :func:`dictConfig` could be called exactly as
|
this new subclass, and then :func:`dictConfig` could be called exactly as
|
||||||
|
|
|
@ -505,7 +505,7 @@ The :mod:`multiprocessing` package mostly replicates the API of the
|
||||||
The constructor should always be called with keyword arguments. *group*
|
The constructor should always be called with keyword arguments. *group*
|
||||||
should always be ``None``; it exists solely for compatibility with
|
should always be ``None``; it exists solely for compatibility with
|
||||||
:class:`threading.Thread`. *target* is the callable object to be invoked by
|
:class:`threading.Thread`. *target* is the callable object to be invoked by
|
||||||
the :meth:`run()` method. It defaults to ``None``, meaning nothing is
|
the :meth:`run` method. It defaults to ``None``, meaning nothing is
|
||||||
called. *name* is the process name (see :attr:`name` for more details).
|
called. *name* is the process name (see :attr:`name` for more details).
|
||||||
*args* is the argument tuple for the target invocation. *kwargs* is a
|
*args* is the argument tuple for the target invocation. *kwargs* is a
|
||||||
dictionary of keyword arguments for the target invocation. If provided,
|
dictionary of keyword arguments for the target invocation. If provided,
|
||||||
|
@ -642,7 +642,7 @@ The :mod:`multiprocessing` package mostly replicates the API of the
|
||||||
|
|
||||||
You can use this value if you want to wait on several events at
|
You can use this value if you want to wait on several events at
|
||||||
once using :func:`multiprocessing.connection.wait`. Otherwise
|
once using :func:`multiprocessing.connection.wait`. Otherwise
|
||||||
calling :meth:`join()` is simpler.
|
calling :meth:`join` is simpler.
|
||||||
|
|
||||||
On Windows, this is an OS handle usable with the ``WaitForSingleObject``
|
On Windows, this is an OS handle usable with the ``WaitForSingleObject``
|
||||||
and ``WaitForMultipleObjects`` family of API calls. On POSIX, this is
|
and ``WaitForMultipleObjects`` family of API calls. On POSIX, this is
|
||||||
|
@ -669,7 +669,7 @@ The :mod:`multiprocessing` package mostly replicates the API of the
|
||||||
|
|
||||||
.. method:: kill()
|
.. method:: kill()
|
||||||
|
|
||||||
Same as :meth:`terminate()` but using the ``SIGKILL`` signal on POSIX.
|
Same as :meth:`terminate` but using the ``SIGKILL`` signal on POSIX.
|
||||||
|
|
||||||
.. versionadded:: 3.7
|
.. versionadded:: 3.7
|
||||||
|
|
||||||
|
@ -712,7 +712,7 @@ The :mod:`multiprocessing` package mostly replicates the API of the
|
||||||
|
|
||||||
.. exception:: BufferTooShort
|
.. exception:: BufferTooShort
|
||||||
|
|
||||||
Exception raised by :meth:`Connection.recv_bytes_into()` when the supplied
|
Exception raised by :meth:`Connection.recv_bytes_into` when the supplied
|
||||||
buffer object is too small for the message read.
|
buffer object is too small for the message read.
|
||||||
|
|
||||||
If ``e`` is an instance of :exc:`BufferTooShort` then ``e.args[0]`` will give
|
If ``e`` is an instance of :exc:`BufferTooShort` then ``e.args[0]`` will give
|
||||||
|
@ -2961,7 +2961,7 @@ Beware of replacing :data:`sys.stdin` with a "file like object"
|
||||||
resulting in a bad file descriptor error, but introduces a potential danger
|
resulting in a bad file descriptor error, but introduces a potential danger
|
||||||
to applications which replace :func:`sys.stdin` with a "file-like object"
|
to applications which replace :func:`sys.stdin` with a "file-like object"
|
||||||
with output buffering. This danger is that if multiple processes call
|
with output buffering. This danger is that if multiple processes call
|
||||||
:meth:`~io.IOBase.close()` on this file-like object, it could result in the same
|
:meth:`~io.IOBase.close` on this file-like object, it could result in the same
|
||||||
data being flushed to the object multiple times, resulting in corruption.
|
data being flushed to the object multiple times, resulting in corruption.
|
||||||
|
|
||||||
If you write a file-like object and implement your own caching, you can
|
If you write a file-like object and implement your own caching, you can
|
||||||
|
|
|
@ -193,7 +193,7 @@ process and user.
|
||||||
to the environment made after this time are not reflected in :data:`os.environ`,
|
to the environment made after this time are not reflected in :data:`os.environ`,
|
||||||
except for changes made by modifying :data:`os.environ` directly.
|
except for changes made by modifying :data:`os.environ` directly.
|
||||||
|
|
||||||
The :meth:`!os.environ.refresh()` method updates :data:`os.environ` with
|
The :meth:`!os.environ.refresh` method updates :data:`os.environ` with
|
||||||
changes to the environment made by :func:`os.putenv`, by
|
changes to the environment made by :func:`os.putenv`, by
|
||||||
:func:`os.unsetenv`, or made outside Python in the same process.
|
:func:`os.unsetenv`, or made outside Python in the same process.
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ process and user.
|
||||||
Updated to support :pep:`584`'s merge (``|``) and update (``|=``) operators.
|
Updated to support :pep:`584`'s merge (``|``) and update (``|=``) operators.
|
||||||
|
|
||||||
.. versionchanged:: 3.14
|
.. versionchanged:: 3.14
|
||||||
Added the :meth:`!os.environ.refresh()` method.
|
Added the :meth:`!os.environ.refresh` method.
|
||||||
|
|
||||||
|
|
||||||
.. data:: environb
|
.. data:: environb
|
||||||
|
|
|
@ -997,10 +997,10 @@ Querying file type and status
|
||||||
|
|
||||||
.. versionchanged:: 3.8
|
.. versionchanged:: 3.8
|
||||||
|
|
||||||
:meth:`~Path.exists()`, :meth:`~Path.is_dir()`, :meth:`~Path.is_file()`,
|
:meth:`~Path.exists`, :meth:`~Path.is_dir`, :meth:`~Path.is_file`,
|
||||||
:meth:`~Path.is_mount()`, :meth:`~Path.is_symlink()`,
|
:meth:`~Path.is_mount`, :meth:`~Path.is_symlink`,
|
||||||
:meth:`~Path.is_block_device()`, :meth:`~Path.is_char_device()`,
|
:meth:`~Path.is_block_device`, :meth:`~Path.is_char_device`,
|
||||||
:meth:`~Path.is_fifo()`, :meth:`~Path.is_socket()` now return ``False``
|
:meth:`~Path.is_fifo`, :meth:`~Path.is_socket` now return ``False``
|
||||||
instead of raising an exception for paths that contain characters
|
instead of raising an exception for paths that contain characters
|
||||||
unrepresentable at the OS level.
|
unrepresentable at the OS level.
|
||||||
|
|
||||||
|
@ -1385,7 +1385,7 @@ Reading directories
|
||||||
This can be used to prune the search, or to impose a specific order of visiting,
|
This can be used to prune the search, or to impose a specific order of visiting,
|
||||||
or even to inform :meth:`Path.walk` about directories the caller creates or
|
or even to inform :meth:`Path.walk` about directories the caller creates or
|
||||||
renames before it resumes :meth:`Path.walk` again. Modifying *dirnames* when
|
renames before it resumes :meth:`Path.walk` again. Modifying *dirnames* when
|
||||||
*top_down* is false has no effect on the behavior of :meth:`Path.walk()` since the
|
*top_down* is false has no effect on the behavior of :meth:`Path.walk` since the
|
||||||
directories in *dirnames* have already been generated by the time *dirnames*
|
directories in *dirnames* have already been generated by the time *dirnames*
|
||||||
is yielded to the caller.
|
is yielded to the caller.
|
||||||
|
|
||||||
|
|
|
@ -740,7 +740,7 @@ The following functions all create :ref:`socket objects <socket-objects>`.
|
||||||
of :meth:`socket.getpeername` but not the actual OS resource. Unlike
|
of :meth:`socket.getpeername` but not the actual OS resource. Unlike
|
||||||
:func:`socket.fromfd`, *fileno* will return the same socket and not a
|
:func:`socket.fromfd`, *fileno* will return the same socket and not a
|
||||||
duplicate. This may help close a detached socket using
|
duplicate. This may help close a detached socket using
|
||||||
:meth:`socket.close()`.
|
:meth:`socket.close`.
|
||||||
|
|
||||||
The newly created socket is :ref:`non-inheritable <fd_inheritance>`.
|
The newly created socket is :ref:`non-inheritable <fd_inheritance>`.
|
||||||
|
|
||||||
|
@ -1419,7 +1419,7 @@ to sockets.
|
||||||
.. method:: socket.close()
|
.. method:: socket.close()
|
||||||
|
|
||||||
Mark the socket closed. The underlying system resource (e.g. a file
|
Mark the socket closed. The underlying system resource (e.g. a file
|
||||||
descriptor) is also closed when all file objects from :meth:`makefile()`
|
descriptor) is also closed when all file objects from :meth:`makefile`
|
||||||
are closed. Once that happens, all future operations on the socket
|
are closed. Once that happens, all future operations on the socket
|
||||||
object will fail. The remote end will receive no more data (after
|
object will fail. The remote end will receive no more data (after
|
||||||
queued data is flushed).
|
queued data is flushed).
|
||||||
|
@ -1434,10 +1434,10 @@ to sockets.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
:meth:`close()` releases the resource associated with a connection but
|
:meth:`close` releases the resource associated with a connection but
|
||||||
does not necessarily close the connection immediately. If you want
|
does not necessarily close the connection immediately. If you want
|
||||||
to close the connection in a timely fashion, call :meth:`shutdown()`
|
to close the connection in a timely fashion, call :meth:`shutdown`
|
||||||
before :meth:`close()`.
|
before :meth:`close`.
|
||||||
|
|
||||||
|
|
||||||
.. method:: socket.connect(address)
|
.. method:: socket.connect(address)
|
||||||
|
@ -2046,7 +2046,7 @@ can be changed by calling :func:`setdefaulttimeout`.
|
||||||
in non-blocking mode. Also, the blocking and timeout modes are shared between
|
in non-blocking mode. Also, the blocking and timeout modes are shared between
|
||||||
file descriptors and socket objects that refer to the same network endpoint.
|
file descriptors and socket objects that refer to the same network endpoint.
|
||||||
This implementation detail can have visible consequences if e.g. you decide
|
This implementation detail can have visible consequences if e.g. you decide
|
||||||
to use the :meth:`~socket.fileno()` of a socket.
|
to use the :meth:`~socket.fileno` of a socket.
|
||||||
|
|
||||||
Timeouts and the ``connect`` method
|
Timeouts and the ``connect`` method
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -127,7 +127,7 @@ and call :meth:`res.fetchone() <Cursor.fetchone>` to fetch the resulting row:
|
||||||
We can see that the table has been created,
|
We can see that the table has been created,
|
||||||
as the query returns a :class:`tuple` containing the table's name.
|
as the query returns a :class:`tuple` containing the table's name.
|
||||||
If we query ``sqlite_master`` for a non-existent table ``spam``,
|
If we query ``sqlite_master`` for a non-existent table ``spam``,
|
||||||
:meth:`!res.fetchone()` will return ``None``:
|
:meth:`!res.fetchone` will return ``None``:
|
||||||
|
|
||||||
.. doctest::
|
.. doctest::
|
||||||
|
|
||||||
|
|
|
@ -1049,25 +1049,25 @@ SSL Sockets
|
||||||
|
|
||||||
SSL sockets provide the following methods of :ref:`socket-objects`:
|
SSL sockets provide the following methods of :ref:`socket-objects`:
|
||||||
|
|
||||||
- :meth:`~socket.socket.accept()`
|
- :meth:`~socket.socket.accept`
|
||||||
- :meth:`~socket.socket.bind()`
|
- :meth:`~socket.socket.bind`
|
||||||
- :meth:`~socket.socket.close()`
|
- :meth:`~socket.socket.close`
|
||||||
- :meth:`~socket.socket.connect()`
|
- :meth:`~socket.socket.connect`
|
||||||
- :meth:`~socket.socket.detach()`
|
- :meth:`~socket.socket.detach`
|
||||||
- :meth:`~socket.socket.fileno()`
|
- :meth:`~socket.socket.fileno`
|
||||||
- :meth:`~socket.socket.getpeername()`, :meth:`~socket.socket.getsockname()`
|
- :meth:`~socket.socket.getpeername`, :meth:`~socket.socket.getsockname`
|
||||||
- :meth:`~socket.socket.getsockopt()`, :meth:`~socket.socket.setsockopt()`
|
- :meth:`~socket.socket.getsockopt`, :meth:`~socket.socket.setsockopt`
|
||||||
- :meth:`~socket.socket.gettimeout()`, :meth:`~socket.socket.settimeout()`,
|
- :meth:`~socket.socket.gettimeout`, :meth:`~socket.socket.settimeout`,
|
||||||
:meth:`~socket.socket.setblocking()`
|
:meth:`~socket.socket.setblocking`
|
||||||
- :meth:`~socket.socket.listen()`
|
- :meth:`~socket.socket.listen`
|
||||||
- :meth:`~socket.socket.makefile()`
|
- :meth:`~socket.socket.makefile`
|
||||||
- :meth:`~socket.socket.recv()`, :meth:`~socket.socket.recv_into()`
|
- :meth:`~socket.socket.recv`, :meth:`~socket.socket.recv_into`
|
||||||
(but passing a non-zero ``flags`` argument is not allowed)
|
(but passing a non-zero ``flags`` argument is not allowed)
|
||||||
- :meth:`~socket.socket.send()`, :meth:`~socket.socket.sendall()` (with
|
- :meth:`~socket.socket.send`, :meth:`~socket.socket.sendall` (with
|
||||||
the same limitation)
|
the same limitation)
|
||||||
- :meth:`~socket.socket.sendfile()` (but :mod:`os.sendfile` will be used
|
- :meth:`~socket.socket.sendfile` (but :mod:`os.sendfile` will be used
|
||||||
for plain-text sockets only, else :meth:`~socket.socket.send()` will be used)
|
for plain-text sockets only, else :meth:`~socket.socket.send` will be used)
|
||||||
- :meth:`~socket.socket.shutdown()`
|
- :meth:`~socket.socket.shutdown`
|
||||||
|
|
||||||
However, since the SSL (and TLS) protocol has its own framing atop
|
However, since the SSL (and TLS) protocol has its own framing atop
|
||||||
of TCP, the SSL sockets abstraction can, in certain respects, diverge from
|
of TCP, the SSL sockets abstraction can, in certain respects, diverge from
|
||||||
|
|
|
@ -4023,7 +4023,7 @@ copying.
|
||||||
dangling resources) as soon as possible.
|
dangling resources) as soon as possible.
|
||||||
|
|
||||||
After this method has been called, any further operation on the view
|
After this method has been called, any further operation on the view
|
||||||
raises a :class:`ValueError` (except :meth:`release()` itself which can
|
raises a :class:`ValueError` (except :meth:`release` itself which can
|
||||||
be called multiple times)::
|
be called multiple times)::
|
||||||
|
|
||||||
>>> m = memoryview(b'abc')
|
>>> m = memoryview(b'abc')
|
||||||
|
|
|
@ -983,10 +983,10 @@ option (other options are available as well).
|
||||||
Added the :class:`!PhotoImage` method :meth:`!copy_replace` to copy a region
|
Added the :class:`!PhotoImage` method :meth:`!copy_replace` to copy a region
|
||||||
from one image to other image, possibly with pixel zooming and/or
|
from one image to other image, possibly with pixel zooming and/or
|
||||||
subsampling.
|
subsampling.
|
||||||
Add *from_coords* parameter to :class:`!PhotoImage` methods :meth:`!copy()`,
|
Add *from_coords* parameter to :class:`!PhotoImage` methods :meth:`!copy`,
|
||||||
:meth:`!zoom()` and :meth:`!subsample()`.
|
:meth:`!zoom` and :meth:`!subsample`.
|
||||||
Add *zoom* and *subsample* parameters to :class:`!PhotoImage` method
|
Add *zoom* and *subsample* parameters to :class:`!PhotoImage` method
|
||||||
:meth:`!copy()`.
|
:meth:`!copy`.
|
||||||
|
|
||||||
The image object can then be used wherever an ``image`` option is supported by
|
The image object can then be used wherever an ``image`` option is supported by
|
||||||
some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a
|
some widget (e.g. labels, buttons, menus). In these cases, Tk will not keep a
|
||||||
|
|
|
@ -241,7 +241,7 @@ The following classes are provided:
|
||||||
|
|
||||||
*method* should be a string that indicates the HTTP request method that
|
*method* should be a string that indicates the HTTP request method that
|
||||||
will be used (e.g. ``'HEAD'``). If provided, its value is stored in the
|
will be used (e.g. ``'HEAD'``). If provided, its value is stored in the
|
||||||
:attr:`~Request.method` attribute and is used by :meth:`get_method()`.
|
:attr:`~Request.method` attribute and is used by :meth:`get_method`.
|
||||||
The default is ``'GET'`` if *data* is ``None`` or ``'POST'`` otherwise.
|
The default is ``'GET'`` if *data* is ``None`` or ``'POST'`` otherwise.
|
||||||
Subclasses may indicate a different default method by setting the
|
Subclasses may indicate a different default method by setting the
|
||||||
:attr:`~Request.method` attribute in the class itself.
|
:attr:`~Request.method` attribute in the class itself.
|
||||||
|
|
|
@ -46,8 +46,8 @@ The :mod:`wave` module defines the following function and exception:
|
||||||
the file object.
|
the file object.
|
||||||
|
|
||||||
The :func:`.open` function may be used in a :keyword:`with` statement. When
|
The :func:`.open` function may be used in a :keyword:`with` statement. When
|
||||||
the :keyword:`!with` block completes, the :meth:`Wave_read.close()` or
|
the :keyword:`!with` block completes, the :meth:`Wave_read.close` or
|
||||||
:meth:`Wave_write.close()` method is called.
|
:meth:`Wave_write.close` method is called.
|
||||||
|
|
||||||
.. versionchanged:: 3.4
|
.. versionchanged:: 3.4
|
||||||
Added support for unseekable files.
|
Added support for unseekable files.
|
||||||
|
|
|
@ -772,7 +772,7 @@ which are used to control the execution of a generator function.
|
||||||
.. coroutinemethod:: agen.asend(value)
|
.. coroutinemethod:: agen.asend(value)
|
||||||
|
|
||||||
Returns an awaitable which when run resumes the execution of the
|
Returns an awaitable which when run resumes the execution of the
|
||||||
asynchronous generator. As with the :meth:`~generator.send()` method for a
|
asynchronous generator. As with the :meth:`~generator.send` method for a
|
||||||
generator, this "sends" a value into the asynchronous generator function,
|
generator, this "sends" a value into the asynchronous generator function,
|
||||||
and the *value* argument becomes the result of the current yield expression.
|
and the *value* argument becomes the result of the current yield expression.
|
||||||
The awaitable returned by the :meth:`asend` method will return the next
|
The awaitable returned by the :meth:`asend` method will return the next
|
||||||
|
|
|
@ -281,7 +281,7 @@ When the named module is not found in :data:`sys.modules`, Python next
|
||||||
searches :data:`sys.meta_path`, which contains a list of meta path finder
|
searches :data:`sys.meta_path`, which contains a list of meta path finder
|
||||||
objects. These finders are queried in order to see if they know how to handle
|
objects. These finders are queried in order to see if they know how to handle
|
||||||
the named module. Meta path finders must implement a method called
|
the named module. Meta path finders must implement a method called
|
||||||
:meth:`~importlib.abc.MetaPathFinder.find_spec()` which takes three arguments:
|
:meth:`~importlib.abc.MetaPathFinder.find_spec` which takes three arguments:
|
||||||
a name, an import path, and (optionally) a target module. The meta path
|
a name, an import path, and (optionally) a target module. The meta path
|
||||||
finder can use any strategy it wants to determine whether it can handle
|
finder can use any strategy it wants to determine whether it can handle
|
||||||
the named module or not.
|
the named module or not.
|
||||||
|
@ -292,7 +292,7 @@ spec object. If it cannot handle the named module, it returns ``None``. If
|
||||||
a spec, then a :exc:`ModuleNotFoundError` is raised. Any other exceptions
|
a spec, then a :exc:`ModuleNotFoundError` is raised. Any other exceptions
|
||||||
raised are simply propagated up, aborting the import process.
|
raised are simply propagated up, aborting the import process.
|
||||||
|
|
||||||
The :meth:`~importlib.abc.MetaPathFinder.find_spec()` method of meta path
|
The :meth:`~importlib.abc.MetaPathFinder.find_spec` method of meta path
|
||||||
finders is called with two or three arguments. The first is the fully
|
finders is called with two or three arguments. The first is the fully
|
||||||
qualified name of the module being imported, for example ``foo.bar.baz``.
|
qualified name of the module being imported, for example ``foo.bar.baz``.
|
||||||
The second argument is the path entries to use for the module search. For
|
The second argument is the path entries to use for the module search. For
|
||||||
|
|
|
@ -1453,7 +1453,7 @@ that will be the numerator and denominator of the resulting fraction. ::
|
||||||
Fraction(5, 3)
|
Fraction(5, 3)
|
||||||
|
|
||||||
For converting floating-point numbers to rationals,
|
For converting floating-point numbers to rationals,
|
||||||
the float type now has an :meth:`as_integer_ratio()` method that returns
|
the float type now has an :meth:`as_integer_ratio` method that returns
|
||||||
the numerator and denominator for a fraction that evaluates to the same
|
the numerator and denominator for a fraction that evaluates to the same
|
||||||
floating-point value::
|
floating-point value::
|
||||||
|
|
||||||
|
@ -2273,7 +2273,7 @@ changes, or look through the Subversion logs for all the details.
|
||||||
(Contributed by Guido van Rossum from work for Google App Engine;
|
(Contributed by Guido van Rossum from work for Google App Engine;
|
||||||
:issue:`3487`.)
|
:issue:`3487`.)
|
||||||
|
|
||||||
* The :mod:`rlcompleter` module's :meth:`Completer.complete()` method
|
* The :mod:`rlcompleter` module's :meth:`Completer.complete` method
|
||||||
will now ignore exceptions triggered while evaluating a name.
|
will now ignore exceptions triggered while evaluating a name.
|
||||||
(Fixed by Lorenz Quack; :issue:`2250`.)
|
(Fixed by Lorenz Quack; :issue:`2250`.)
|
||||||
|
|
||||||
|
@ -2566,7 +2566,7 @@ changes, or look through the Subversion logs for all the details.
|
||||||
:meth:`tracer`, and :meth:`speed` methods.
|
:meth:`tracer`, and :meth:`speed` methods.
|
||||||
* The ability to set new shapes for the turtle, and to
|
* The ability to set new shapes for the turtle, and to
|
||||||
define a new coordinate system.
|
define a new coordinate system.
|
||||||
* Turtles now have an :meth:`undo()` method that can roll back actions.
|
* Turtles now have an :meth:`undo` method that can roll back actions.
|
||||||
* Simple support for reacting to input events such as mouse and keyboard
|
* Simple support for reacting to input events such as mouse and keyboard
|
||||||
activity, making it possible to write simple games.
|
activity, making it possible to write simple games.
|
||||||
* A :file:`turtle.cfg` file can be used to customize the starting appearance
|
* A :file:`turtle.cfg` file can be used to customize the starting appearance
|
||||||
|
|
|
@ -291,7 +291,7 @@ modules.
|
||||||
configuration files can now be read, modified, and then written back
|
configuration files can now be read, modified, and then written back
|
||||||
in their original order.
|
in their original order.
|
||||||
|
|
||||||
* The :meth:`~collections.somenamedtuple._asdict()` method for
|
* The :meth:`~collections.somenamedtuple._asdict` method for
|
||||||
:func:`collections.namedtuple` now returns an ordered dictionary with the
|
:func:`collections.namedtuple` now returns an ordered dictionary with the
|
||||||
values appearing in the same order as the underlying tuple indices.
|
values appearing in the same order as the underlying tuple indices.
|
||||||
|
|
||||||
|
|
|
@ -2032,8 +2032,8 @@ Removed C APIs are :ref:`listed separately <whatsnew311-c-api-removed>`.
|
||||||
It was introduced in Python 3.4 but has been broken since Python 3.7.
|
It was introduced in Python 3.4 but has been broken since Python 3.7.
|
||||||
(Contributed by Inada Naoki in :issue:`23882`.)
|
(Contributed by Inada Naoki in :issue:`23882`.)
|
||||||
|
|
||||||
* Removed the undocumented private :meth:`!float.__set_format__()` method,
|
* Removed the undocumented private :meth:`!float.__set_format__` method,
|
||||||
previously known as :meth:`!float.__setformat__()` in Python 3.7.
|
previously known as :meth:`!float.__setformat__` in Python 3.7.
|
||||||
Its docstring said: "You probably don't want to use this function.
|
Its docstring said: "You probably don't want to use this function.
|
||||||
It exists mainly to be used in Python's test suite."
|
It exists mainly to be used in Python's test suite."
|
||||||
(Contributed by Victor Stinner in :issue:`46852`.)
|
(Contributed by Victor Stinner in :issue:`46852`.)
|
||||||
|
|
|
@ -1433,7 +1433,7 @@ importlib
|
||||||
* Many previously deprecated cleanups in :mod:`importlib` have now been
|
* Many previously deprecated cleanups in :mod:`importlib` have now been
|
||||||
completed:
|
completed:
|
||||||
|
|
||||||
* References to, and support for :meth:`!module_repr()` has been removed.
|
* References to, and support for :meth:`!module_repr` has been removed.
|
||||||
(Contributed by Barry Warsaw in :gh:`97850`.)
|
(Contributed by Barry Warsaw in :gh:`97850`.)
|
||||||
|
|
||||||
* ``importlib.util.set_package``, ``importlib.util.set_loader`` and
|
* ``importlib.util.set_package``, ``importlib.util.set_loader`` and
|
||||||
|
|
|
@ -201,7 +201,7 @@ pdb
|
||||||
|
|
||||||
* Hard-coded breakpoints (:func:`breakpoint` and :func:`pdb.set_trace`) now
|
* Hard-coded breakpoints (:func:`breakpoint` and :func:`pdb.set_trace`) now
|
||||||
reuse the most recent :class:`~pdb.Pdb` instance that calls
|
reuse the most recent :class:`~pdb.Pdb` instance that calls
|
||||||
:meth:`~pdb.Pdb.set_trace()`, instead of creating a new one each time.
|
:meth:`~pdb.Pdb.set_trace`, instead of creating a new one each time.
|
||||||
As a result, all the instance specific data like :pdbcmd:`display` and
|
As a result, all the instance specific data like :pdbcmd:`display` and
|
||||||
:pdbcmd:`commands` are preserved across hard-coded breakpoints.
|
:pdbcmd:`commands` are preserved across hard-coded breakpoints.
|
||||||
(Contributed by Tian Gao in :gh:`121450`.)
|
(Contributed by Tian Gao in :gh:`121450`.)
|
||||||
|
|
|
@ -531,7 +531,7 @@ Some smaller changes made to the core Python language are:
|
||||||
|
|
||||||
(Proposed and implemented by Mark Dickinson; :issue:`9337`.)
|
(Proposed and implemented by Mark Dickinson; :issue:`9337`.)
|
||||||
|
|
||||||
* :class:`memoryview` objects now have a :meth:`~memoryview.release()` method
|
* :class:`memoryview` objects now have a :meth:`~memoryview.release` method
|
||||||
and they also now support the context management protocol. This allows timely
|
and they also now support the context management protocol. This allows timely
|
||||||
release of any resources that were acquired when requesting a buffer from the
|
release of any resources that were acquired when requesting a buffer from the
|
||||||
original object.
|
original object.
|
||||||
|
@ -1325,7 +1325,7 @@ the constructor and to support mixed-type comparisons.
|
||||||
and :class:`fractions.Fraction` (:issue:`2531` and :issue:`8188`).
|
and :class:`fractions.Fraction` (:issue:`2531` and :issue:`8188`).
|
||||||
|
|
||||||
Similar changes were made to :class:`fractions.Fraction` so that the
|
Similar changes were made to :class:`fractions.Fraction` so that the
|
||||||
:meth:`~fractions.Fraction.from_float()` and :meth:`~fractions.Fraction.from_decimal`
|
:meth:`~fractions.Fraction.from_float` and :meth:`~fractions.Fraction.from_decimal`
|
||||||
methods are no longer needed (:issue:`8294`):
|
methods are no longer needed (:issue:`8294`):
|
||||||
|
|
||||||
>>> from decimal import Decimal
|
>>> from decimal import Decimal
|
||||||
|
@ -1622,7 +1622,7 @@ socket
|
||||||
|
|
||||||
The :mod:`socket` module has two new improvements.
|
The :mod:`socket` module has two new improvements.
|
||||||
|
|
||||||
* Socket objects now have a :meth:`~socket.socket.detach()` method which puts
|
* Socket objects now have a :meth:`~socket.socket.detach` method which puts
|
||||||
the socket into closed state without actually closing the underlying file
|
the socket into closed state without actually closing the underlying file
|
||||||
descriptor. The latter can then be reused for other purposes.
|
descriptor. The latter can then be reused for other purposes.
|
||||||
(Added by Antoine Pitrou; :issue:`8524`.)
|
(Added by Antoine Pitrou; :issue:`8524`.)
|
||||||
|
@ -1859,11 +1859,11 @@ asyncore
|
||||||
--------
|
--------
|
||||||
|
|
||||||
:class:`!asyncore.dispatcher` now provides a
|
:class:`!asyncore.dispatcher` now provides a
|
||||||
:meth:`!handle_accepted()` method
|
:meth:`!handle_accepted` method
|
||||||
returning a ``(sock, addr)`` pair which is called when a connection has actually
|
returning a ``(sock, addr)`` pair which is called when a connection has actually
|
||||||
been established with a new remote endpoint. This is supposed to be used as a
|
been established with a new remote endpoint. This is supposed to be used as a
|
||||||
replacement for old :meth:`!handle_accept()` and avoids
|
replacement for old :meth:`!handle_accept` and avoids
|
||||||
the user to call :meth:`!accept()` directly.
|
the user to call :meth:`!accept` directly.
|
||||||
|
|
||||||
(Contributed by Giampaolo Rodolà; :issue:`6706`.)
|
(Contributed by Giampaolo Rodolà; :issue:`6706`.)
|
||||||
|
|
||||||
|
|
|
@ -1667,7 +1667,7 @@ Both the :class:`!SMTPServer` and :class:`!SMTPChannel` classes now
|
||||||
accept a *decode_data* keyword argument to determine if the ``DATA`` portion of
|
accept a *decode_data* keyword argument to determine if the ``DATA`` portion of
|
||||||
the SMTP transaction is decoded using the ``"utf-8"`` codec or is instead
|
the SMTP transaction is decoded using the ``"utf-8"`` codec or is instead
|
||||||
provided to the
|
provided to the
|
||||||
:meth:`!SMTPServer.process_message()`
|
:meth:`!SMTPServer.process_message`
|
||||||
method as a byte string. The default is ``True`` for backward compatibility
|
method as a byte string. The default is ``True`` for backward compatibility
|
||||||
reasons, but will change to ``False`` in Python 3.6. If *decode_data* is set
|
reasons, but will change to ``False`` in Python 3.6. If *decode_data* is set
|
||||||
to ``False``, the ``process_message`` method must be prepared to accept keyword
|
to ``False``, the ``process_message`` method must be prepared to accept keyword
|
||||||
|
@ -1677,14 +1677,14 @@ arguments.
|
||||||
The :class:`!SMTPServer` class now advertises the ``8BITMIME`` extension
|
The :class:`!SMTPServer` class now advertises the ``8BITMIME`` extension
|
||||||
(:rfc:`6152`) if *decode_data* has been set ``True``. If the client
|
(:rfc:`6152`) if *decode_data* has been set ``True``. If the client
|
||||||
specifies ``BODY=8BITMIME`` on the ``MAIL`` command, it is passed to
|
specifies ``BODY=8BITMIME`` on the ``MAIL`` command, it is passed to
|
||||||
:meth:`!SMTPServer.process_message()`
|
:meth:`!SMTPServer.process_message`
|
||||||
via the *mail_options* keyword.
|
via the *mail_options* keyword.
|
||||||
(Contributed by Milan Oberkirch and R. David Murray in :issue:`21795`.)
|
(Contributed by Milan Oberkirch and R. David Murray in :issue:`21795`.)
|
||||||
|
|
||||||
The :class:`!SMTPServer` class now also supports the ``SMTPUTF8``
|
The :class:`!SMTPServer` class now also supports the ``SMTPUTF8``
|
||||||
extension (:rfc:`6531`: Internationalized Email). If the client specified
|
extension (:rfc:`6531`: Internationalized Email). If the client specified
|
||||||
``SMTPUTF8 BODY=8BITMIME`` on the ``MAIL`` command, they are passed to
|
``SMTPUTF8 BODY=8BITMIME`` on the ``MAIL`` command, they are passed to
|
||||||
:meth:`!SMTPServer.process_message()`
|
:meth:`!SMTPServer.process_message`
|
||||||
via the *mail_options* keyword. It is the responsibility of the
|
via the *mail_options* keyword. It is the responsibility of the
|
||||||
``process_message`` method to correctly handle the ``SMTPUTF8`` data.
|
``process_message`` method to correctly handle the ``SMTPUTF8`` data.
|
||||||
(Contributed by Milan Oberkirch in :issue:`21725`.)
|
(Contributed by Milan Oberkirch in :issue:`21725`.)
|
||||||
|
@ -2405,7 +2405,7 @@ Changes in the Python API
|
||||||
error-prone and has been removed in Python 3.5. See :issue:`13936` for full
|
error-prone and has been removed in Python 3.5. See :issue:`13936` for full
|
||||||
details.
|
details.
|
||||||
|
|
||||||
* The :meth:`ssl.SSLSocket.send()` method now raises either
|
* The :meth:`ssl.SSLSocket.send` method now raises either
|
||||||
:exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError`
|
:exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError`
|
||||||
on a non-blocking socket if the operation would block. Previously,
|
on a non-blocking socket if the operation would block. Previously,
|
||||||
it would return ``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)
|
it would return ``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)
|
||||||
|
|
|
@ -603,7 +603,7 @@ The new :mod:`importlib.resources` module provides several new APIs and one
|
||||||
new ABC for access to, opening, and reading *resources* inside packages.
|
new ABC for access to, opening, and reading *resources* inside packages.
|
||||||
Resources are roughly similar to files inside packages, but they needn't
|
Resources are roughly similar to files inside packages, but they needn't
|
||||||
be actual files on the physical file system. Module loaders can provide a
|
be actual files on the physical file system. Module loaders can provide a
|
||||||
:meth:`get_resource_reader()` function which returns
|
:meth:`get_resource_reader` function which returns
|
||||||
a :class:`importlib.abc.ResourceReader` instance to support this
|
a :class:`importlib.abc.ResourceReader` instance to support this
|
||||||
new API. Built-in file path loaders and zip file loaders both support this.
|
new API. Built-in file path loaders and zip file loaders both support this.
|
||||||
|
|
||||||
|
@ -1133,7 +1133,7 @@ The MIME type of .bmp has been changed from ``'image/x-ms-bmp'`` to
|
||||||
msilib
|
msilib
|
||||||
------
|
------
|
||||||
|
|
||||||
The new :meth:`!Database.Close()` method can be used
|
The new :meth:`!Database.Close` method can be used
|
||||||
to close the :abbr:`MSI` database.
|
to close the :abbr:`MSI` database.
|
||||||
(Contributed by Berker Peksag in :issue:`20486`.)
|
(Contributed by Berker Peksag in :issue:`20486`.)
|
||||||
|
|
||||||
|
@ -2017,11 +2017,11 @@ importlib
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Methods
|
Methods
|
||||||
:meth:`!MetaPathFinder.find_module()`
|
:meth:`!MetaPathFinder.find_module`
|
||||||
(replaced by
|
(replaced by
|
||||||
:meth:`MetaPathFinder.find_spec() <importlib.abc.MetaPathFinder.find_spec>`)
|
:meth:`MetaPathFinder.find_spec() <importlib.abc.MetaPathFinder.find_spec>`)
|
||||||
and
|
and
|
||||||
:meth:`!PathEntryFinder.find_loader()`
|
:meth:`!PathEntryFinder.find_loader`
|
||||||
(replaced by
|
(replaced by
|
||||||
:meth:`PathEntryFinder.find_spec() <importlib.abc.PathEntryFinder.find_spec>`)
|
:meth:`PathEntryFinder.find_spec() <importlib.abc.PathEntryFinder.find_spec>`)
|
||||||
both deprecated in Python 3.4 now emit :exc:`DeprecationWarning`.
|
both deprecated in Python 3.4 now emit :exc:`DeprecationWarning`.
|
||||||
|
@ -2425,7 +2425,7 @@ Changes in the Python API
|
||||||
to :meth:`ArgumentParser.add_subparsers() <argparse.ArgumentParser.add_subparsers>`.
|
to :meth:`ArgumentParser.add_subparsers() <argparse.ArgumentParser.add_subparsers>`.
|
||||||
(Contributed by Anthony Sottile in :issue:`26510`.)
|
(Contributed by Anthony Sottile in :issue:`26510`.)
|
||||||
|
|
||||||
* :meth:`ast.literal_eval()` is now stricter. Addition and subtraction of
|
* :meth:`ast.literal_eval` is now stricter. Addition and subtraction of
|
||||||
arbitrary numbers are no longer allowed.
|
arbitrary numbers are no longer allowed.
|
||||||
(Contributed by Serhiy Storchaka in :issue:`31778`.)
|
(Contributed by Serhiy Storchaka in :issue:`31778`.)
|
||||||
|
|
||||||
|
|
|
@ -1077,16 +1077,16 @@ pathlib
|
||||||
-------
|
-------
|
||||||
|
|
||||||
:mod:`pathlib.Path` methods that return a boolean result like
|
:mod:`pathlib.Path` methods that return a boolean result like
|
||||||
:meth:`~pathlib.Path.exists()`, :meth:`~pathlib.Path.is_dir()`,
|
:meth:`~pathlib.Path.exists`, :meth:`~pathlib.Path.is_dir`,
|
||||||
:meth:`~pathlib.Path.is_file()`, :meth:`~pathlib.Path.is_mount()`,
|
:meth:`~pathlib.Path.is_file`, :meth:`~pathlib.Path.is_mount`,
|
||||||
:meth:`~pathlib.Path.is_symlink()`, :meth:`~pathlib.Path.is_block_device()`,
|
:meth:`~pathlib.Path.is_symlink`, :meth:`~pathlib.Path.is_block_device`,
|
||||||
:meth:`~pathlib.Path.is_char_device()`, :meth:`~pathlib.Path.is_fifo()`,
|
:meth:`~pathlib.Path.is_char_device`, :meth:`~pathlib.Path.is_fifo`,
|
||||||
:meth:`~pathlib.Path.is_socket()` now return ``False`` instead of raising
|
:meth:`~pathlib.Path.is_socket` now return ``False`` instead of raising
|
||||||
:exc:`ValueError` or its subclass :exc:`UnicodeEncodeError` for paths that
|
:exc:`ValueError` or its subclass :exc:`UnicodeEncodeError` for paths that
|
||||||
contain characters unrepresentable at the OS level.
|
contain characters unrepresentable at the OS level.
|
||||||
(Contributed by Serhiy Storchaka in :issue:`33721`.)
|
(Contributed by Serhiy Storchaka in :issue:`33721`.)
|
||||||
|
|
||||||
Added :meth:`!pathlib.Path.link_to()` which creates a hard link pointing
|
Added :meth:`!pathlib.Path.link_to` which creates a hard link pointing
|
||||||
to a path.
|
to a path.
|
||||||
(Contributed by Joannah Nanjekye in :issue:`26978`)
|
(Contributed by Joannah Nanjekye in :issue:`26978`)
|
||||||
Note that ``link_to`` was deprecated in 3.10 and removed in 3.12 in
|
Note that ``link_to`` was deprecated in 3.10 and removed in 3.12 in
|
||||||
|
@ -1170,7 +1170,7 @@ recursively removing their contents first.
|
||||||
socket
|
socket
|
||||||
------
|
------
|
||||||
|
|
||||||
Added :meth:`~socket.create_server()` and :meth:`~socket.has_dualstack_ipv6()`
|
Added :meth:`~socket.create_server` and :meth:`~socket.has_dualstack_ipv6`
|
||||||
convenience functions to automate the necessary tasks usually involved when
|
convenience functions to automate the necessary tasks usually involved when
|
||||||
creating a server socket, including accepting both IPv4 and IPv6 connections
|
creating a server socket, including accepting both IPv4 and IPv6 connections
|
||||||
on the same socket. (Contributed by Giampaolo Rodolà in :issue:`17561`.)
|
on the same socket. (Contributed by Giampaolo Rodolà in :issue:`17561`.)
|
||||||
|
@ -1368,9 +1368,9 @@ have been added as well.
|
||||||
(Contributed by Lisa Roach in :issue:`26467`).
|
(Contributed by Lisa Roach in :issue:`26467`).
|
||||||
|
|
||||||
Added :func:`~unittest.addModuleCleanup` and
|
Added :func:`~unittest.addModuleCleanup` and
|
||||||
:meth:`~unittest.TestCase.addClassCleanup()` to unittest to support
|
:meth:`~unittest.TestCase.addClassCleanup` to unittest to support
|
||||||
cleanups for :func:`~unittest.setUpModule` and
|
cleanups for :func:`~unittest.setUpModule` and
|
||||||
:meth:`~unittest.TestCase.setUpClass()`.
|
:meth:`~unittest.TestCase.setUpClass`.
|
||||||
(Contributed by Lisa Roach in :issue:`24412`.)
|
(Contributed by Lisa Roach in :issue:`24412`.)
|
||||||
|
|
||||||
Several mock assert functions now also print a list of actual calls upon
|
Several mock assert functions now also print a list of actual calls upon
|
||||||
|
@ -1712,7 +1712,7 @@ Deprecated
|
||||||
the ``l*gettext()`` functions.
|
the ``l*gettext()`` functions.
|
||||||
(Contributed by Serhiy Storchaka in :issue:`33710`.)
|
(Contributed by Serhiy Storchaka in :issue:`33710`.)
|
||||||
|
|
||||||
* The :meth:`~threading.Thread.isAlive()` method of :class:`threading.Thread`
|
* The :meth:`~threading.Thread.isAlive` method of :class:`threading.Thread`
|
||||||
has been deprecated.
|
has been deprecated.
|
||||||
(Contributed by Donghee Na in :issue:`35283`.)
|
(Contributed by Donghee Na in :issue:`35283`.)
|
||||||
|
|
||||||
|
|
|
@ -408,8 +408,8 @@ Added :func:`curses.get_escdelay`, :func:`curses.set_escdelay`,
|
||||||
|
|
||||||
datetime
|
datetime
|
||||||
--------
|
--------
|
||||||
The :meth:`~datetime.date.isocalendar()` of :class:`datetime.date`
|
The :meth:`~datetime.date.isocalendar` of :class:`datetime.date`
|
||||||
and :meth:`~datetime.datetime.isocalendar()` of :class:`datetime.datetime`
|
and :meth:`~datetime.datetime.isocalendar` of :class:`datetime.datetime`
|
||||||
methods now returns a :func:`~collections.namedtuple` instead of a :class:`tuple`.
|
methods now returns a :func:`~collections.namedtuple` instead of a :class:`tuple`.
|
||||||
(Contributed by Donghee Na in :issue:`24416`.)
|
(Contributed by Donghee Na in :issue:`24416`.)
|
||||||
|
|
||||||
|
@ -610,7 +610,7 @@ convert a wait status to an exit code.
|
||||||
pathlib
|
pathlib
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Added :meth:`pathlib.Path.readlink()` which acts similarly to
|
Added :meth:`pathlib.Path.readlink` which acts similarly to
|
||||||
:func:`os.readlink`.
|
:func:`os.readlink`.
|
||||||
(Contributed by Girts Folkmanis in :issue:`30618`)
|
(Contributed by Girts Folkmanis in :issue:`30618`)
|
||||||
|
|
||||||
|
@ -987,9 +987,9 @@ Removed
|
||||||
removed. They were deprecated since Python 3.7.
|
removed. They were deprecated since Python 3.7.
|
||||||
(Contributed by Victor Stinner in :issue:`37320`.)
|
(Contributed by Victor Stinner in :issue:`37320`.)
|
||||||
|
|
||||||
* The :meth:`!isAlive()` method of :class:`threading.Thread`
|
* The :meth:`!isAlive` method of :class:`threading.Thread`
|
||||||
has been removed. It was deprecated since Python 3.8.
|
has been removed. It was deprecated since Python 3.8.
|
||||||
Use :meth:`~threading.Thread.is_alive()` instead.
|
Use :meth:`~threading.Thread.is_alive` instead.
|
||||||
(Contributed by Donghee Na in :issue:`37804`.)
|
(Contributed by Donghee Na in :issue:`37804`.)
|
||||||
|
|
||||||
* Methods ``getchildren()`` and ``getiterator()`` of classes
|
* Methods ``getchildren()`` and ``getiterator()`` of classes
|
||||||
|
|
|
@ -1032,7 +1032,7 @@ the :meth:`~object.__int__` method but do not have the
|
||||||
.. nonce: AkRzjb
|
.. nonce: AkRzjb
|
||||||
.. section: Core and Builtins
|
.. section: Core and Builtins
|
||||||
|
|
||||||
Add :meth:`int.bit_count()`, counting the number of ones in the binary
|
Add :meth:`int.bit_count`, counting the number of ones in the binary
|
||||||
representation of an integer. Patch by Niklas Fiekas.
|
representation of an integer. Patch by Niklas Fiekas.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
@ -2452,7 +2452,7 @@ Added the *root_dir* and *dir_fd* parameters in :func:`glob.glob`.
|
||||||
.. nonce: X-TJZO
|
.. nonce: X-TJZO
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
Fix :meth:`IMAP4.noop()` when debug mode is enabled (ex: ``imaplib.Debug =
|
Fix :meth:`IMAP4.noop` when debug mode is enabled (ex: ``imaplib.Debug =
|
||||||
3``).
|
3``).
|
||||||
|
|
||||||
..
|
..
|
||||||
|
|
|
@ -383,7 +383,7 @@ Inwood.
|
||||||
.. nonce: jd_gkA
|
.. nonce: jd_gkA
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
:meth:`sched.scheduler.cancel()` will now cancel the correct event, if two
|
:meth:`sched.scheduler.cancel` will now cancel the correct event, if two
|
||||||
events with same priority are scheduled for the same time. Patch by Bar
|
events with same priority are scheduled for the same time. Patch by Bar
|
||||||
Harel.
|
Harel.
|
||||||
|
|
||||||
|
|
|
@ -1314,7 +1314,7 @@ functions in the :mod:`os` module.
|
||||||
if the basename of current user's home directory does not match their
|
if the basename of current user's home directory does not match their
|
||||||
username.
|
username.
|
||||||
|
|
||||||
:meth:`pathlib.Path.expanduser()` and :meth:`~pathlib.Path.home()` now
|
:meth:`pathlib.Path.expanduser` and :meth:`~pathlib.Path.home` now
|
||||||
consistently raise :exc:`RuntimeError` exception when a home directory
|
consistently raise :exc:`RuntimeError` exception when a home directory
|
||||||
cannot be resolved. Previously a :exc:`KeyError` exception could be raised
|
cannot be resolved. Previously a :exc:`KeyError` exception could be raised
|
||||||
on Windows when the ``"USERNAME"`` environment variable was unset.
|
on Windows when the ``"USERNAME"`` environment variable was unset.
|
||||||
|
@ -1516,7 +1516,7 @@ Adds additional arguments to :func:`os.startfile` function.
|
||||||
.. nonce: F0Cg6X
|
.. nonce: F0Cg6X
|
||||||
.. section: Windows
|
.. section: Windows
|
||||||
|
|
||||||
Avoid raising errors from :meth:`pathlib.Path.exists()` when passed an
|
Avoid raising errors from :meth:`pathlib.Path.exists` when passed an
|
||||||
invalid filename.
|
invalid filename.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
|
|
@ -224,7 +224,7 @@ Kumar Aditya.
|
||||||
.. nonce: ZI05b5
|
.. nonce: ZI05b5
|
||||||
.. section: Core and Builtins
|
.. section: Core and Builtins
|
||||||
|
|
||||||
Improved the performance of :meth:`list.append()` and list comprehensions by
|
Improved the performance of :meth:`list.append` and list comprehensions by
|
||||||
optimizing for the common case, where no resize is needed. Patch by Dennis
|
optimizing for the common case, where no resize is needed. Patch by Dennis
|
||||||
Sweeney.
|
Sweeney.
|
||||||
|
|
||||||
|
@ -1127,7 +1127,7 @@ Raise more accurate and :pep:`249` compatible exceptions in :mod:`sqlite3`.
|
||||||
* Don't overwrite :exc:`BufferError` with :exc:`ValueError` when conversion to
|
* Don't overwrite :exc:`BufferError` with :exc:`ValueError` when conversion to
|
||||||
BLOB fails.
|
BLOB fails.
|
||||||
* Raise :exc:`~sqlite3.ProgrammingError` instead of :exc:`~sqlite3.Warning` if
|
* Raise :exc:`~sqlite3.ProgrammingError` instead of :exc:`~sqlite3.Warning` if
|
||||||
user tries to :meth:`~sqlite3.Cursor.execute()` more than one SQL statement.
|
user tries to :meth:`~sqlite3.Cursor.execute` more than one SQL statement.
|
||||||
* Raise :exc:`~sqlite3.ProgrammingError` instead of :exc:`ValueError` if an SQL
|
* Raise :exc:`~sqlite3.ProgrammingError` instead of :exc:`ValueError` if an SQL
|
||||||
query contains null characters.
|
query contains null characters.
|
||||||
|
|
||||||
|
|
|
@ -399,7 +399,7 @@ Fix refcount error when arguments are packed to tuple in Argument Clinic.
|
||||||
.. nonce: 7uCiIB
|
.. nonce: 7uCiIB
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
:meth:`pathlib.PurePath.relative_to()` now treats naked Windows drive paths
|
:meth:`pathlib.PurePath.relative_to` now treats naked Windows drive paths
|
||||||
as relative. This brings its behaviour in line with other parts of pathlib.
|
as relative. This brings its behaviour in line with other parts of pathlib.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
|
|
@ -863,7 +863,7 @@ Fixed tarfile list() method to show file type.
|
||||||
.. nonce: jLWGlr
|
.. nonce: jLWGlr
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
:meth:`asyncio.futures.Future.set_exception()` now transforms
|
:meth:`asyncio.futures.Future.set_exception` now transforms
|
||||||
:exc:`StopIteration` into :exc:`RuntimeError` instead of hanging or other
|
:exc:`StopIteration` into :exc:`RuntimeError` instead of hanging or other
|
||||||
misbehavior. Patch contributed by Jamie Phan.
|
misbehavior. Patch contributed by Jamie Phan.
|
||||||
|
|
||||||
|
|
|
@ -823,7 +823,7 @@ Add missing call to localization function in :mod:`argparse`.
|
||||||
.. nonce: Me7fJe
|
.. nonce: Me7fJe
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
Fix :meth:`multiprocessing.connection.Listener.accept()` to accept empty
|
Fix :meth:`multiprocessing.connection.Listener.accept` to accept empty
|
||||||
bytes as authkey. Not accepting empty bytes as key causes it to hang
|
bytes as authkey. Not accepting empty bytes as key causes it to hang
|
||||||
indefinitely.
|
indefinitely.
|
||||||
|
|
||||||
|
|
|
@ -692,8 +692,8 @@ image data. Add *background* and *grayscale* parameters to
|
||||||
Add the :class:`!PhotoImage` method :meth:`!copy_replace` to copy a region
|
Add the :class:`!PhotoImage` method :meth:`!copy_replace` to copy a region
|
||||||
from one image to other image, possibly with pixel zooming and/or
|
from one image to other image, possibly with pixel zooming and/or
|
||||||
subsampling. Add *from_coords* parameter to :class:`!PhotoImage` methods
|
subsampling. Add *from_coords* parameter to :class:`!PhotoImage` methods
|
||||||
:meth:`!copy()`, :meth:`!zoom()` and :meth:`!subsample()`. Add *zoom* and
|
:meth:`!copy`, :meth:`!zoom` and :meth:`!subsample`. Add *zoom* and
|
||||||
*subsample* parameters to :class:`!PhotoImage` method :meth:`!copy()`.
|
*subsample* parameters to :class:`!PhotoImage` method :meth:`!copy`.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
|
||||||
|
|
|
@ -601,7 +601,7 @@ Add socket.getblocking() method.
|
||||||
Add :mod:`importlib.resources` and :class:`importlib.abc.ResourceReader` as
|
Add :mod:`importlib.resources` and :class:`importlib.abc.ResourceReader` as
|
||||||
the unified API for reading resources contained within packages. Loaders
|
the unified API for reading resources contained within packages. Loaders
|
||||||
wishing to support resource reading must implement the
|
wishing to support resource reading must implement the
|
||||||
:meth:`get_resource_reader()` method. File-based and zipimport-based
|
:meth:`get_resource_reader` method. File-based and zipimport-based
|
||||||
loaders both implement these APIs. :class:`importlib.abc.ResourceLoader` is
|
loaders both implement these APIs. :class:`importlib.abc.ResourceLoader` is
|
||||||
deprecated in favor of these new APIs.
|
deprecated in favor of these new APIs.
|
||||||
|
|
||||||
|
|
|
@ -2850,8 +2850,8 @@ allow for tweaking of protocols and also to add support by default for
|
||||||
.. nonce: 37IdsA
|
.. nonce: 37IdsA
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
Fixed integer overflow in the :meth:`~hashlib.shake.digest()` and
|
Fixed integer overflow in the :meth:`~hashlib.shake.digest` and
|
||||||
:meth:`~hashlib.shake.hexdigest()` methods for the SHAKE algorithm in the
|
:meth:`~hashlib.shake.hexdigest` methods for the SHAKE algorithm in the
|
||||||
:mod:`hashlib` module.
|
:mod:`hashlib` module.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
@ -3212,9 +3212,9 @@ bytes objects. (microoptimization)
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
Add :func:`~unittest.addModuleCleanup` and
|
Add :func:`~unittest.addModuleCleanup` and
|
||||||
:meth:`~unittest.TestCase.addClassCleanup()` to unittest to support cleanups
|
:meth:`~unittest.TestCase.addClassCleanup` to unittest to support cleanups
|
||||||
for :func:`~unittest.setUpModule` and
|
for :func:`~unittest.setUpModule` and
|
||||||
:meth:`~unittest.TestCase.setUpClass()`. Patch by Lisa Roach.
|
:meth:`~unittest.TestCase.setUpClass`. Patch by Lisa Roach.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
|
||||||
|
@ -3664,7 +3664,7 @@ Add pure Python fallback for functools.reduce. Patch by Robert Wright.
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
The default asyncio task class now always has a name which can be get or set
|
The default asyncio task class now always has a name which can be get or set
|
||||||
using two new methods (:meth:`~asyncio.Task.get_name()` and
|
using two new methods (:meth:`~asyncio.Task.get_name` and
|
||||||
:meth:`~asyncio.Task.set_name`) and is visible in the :func:`repr` output.
|
:meth:`~asyncio.Task.set_name`) and is visible in the :func:`repr` output.
|
||||||
An initial name can also be set using the new ``name`` keyword argument to
|
An initial name can also be set using the new ``name`` keyword argument to
|
||||||
:func:`asyncio.create_task` or the
|
:func:`asyncio.create_task` or the
|
||||||
|
@ -4152,12 +4152,12 @@ Convert content length to string before putting to header.
|
||||||
:func:`~os.path.exists`, :func:`~os.path.lexists`, :func:`~os.path.isdir`,
|
:func:`~os.path.exists`, :func:`~os.path.lexists`, :func:`~os.path.isdir`,
|
||||||
:func:`~os.path.isfile`, :func:`~os.path.islink`, and
|
:func:`~os.path.isfile`, :func:`~os.path.islink`, and
|
||||||
:func:`~os.path.ismount`, and :mod:`pathlib.Path` methods that return a
|
:func:`~os.path.ismount`, and :mod:`pathlib.Path` methods that return a
|
||||||
boolean result like :meth:`~pathlib.Path.exists()`,
|
boolean result like :meth:`~pathlib.Path.exists`,
|
||||||
:meth:`~pathlib.Path.is_dir()`, :meth:`~pathlib.Path.is_file()`,
|
:meth:`~pathlib.Path.is_dir`, :meth:`~pathlib.Path.is_file`,
|
||||||
:meth:`~pathlib.Path.is_mount()`, :meth:`~pathlib.Path.is_symlink()`,
|
:meth:`~pathlib.Path.is_mount`, :meth:`~pathlib.Path.is_symlink`,
|
||||||
:meth:`~pathlib.Path.is_block_device()`,
|
:meth:`~pathlib.Path.is_block_device`,
|
||||||
:meth:`~pathlib.Path.is_char_device()`, :meth:`~pathlib.Path.is_fifo()`,
|
:meth:`~pathlib.Path.is_char_device`, :meth:`~pathlib.Path.is_fifo`,
|
||||||
:meth:`~pathlib.Path.is_socket()` now return ``False`` instead of raising
|
:meth:`~pathlib.Path.is_socket` now return ``False`` instead of raising
|
||||||
:exc:`ValueError` or its subclasses :exc:`UnicodeEncodeError` and
|
:exc:`ValueError` or its subclasses :exc:`UnicodeEncodeError` and
|
||||||
:exc:`UnicodeDecodeError` for paths that contain characters or bytes
|
:exc:`UnicodeDecodeError` for paths that contain characters or bytes
|
||||||
unrepresentable at the OS level.
|
unrepresentable at the OS level.
|
||||||
|
|
|
@ -663,8 +663,8 @@ followed imports. Patch by Brandt Bucher.
|
||||||
.. nonce: QmfNmY
|
.. nonce: QmfNmY
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
Added :meth:`~socket.create_server()` and
|
Added :meth:`~socket.create_server` and
|
||||||
:meth:`~socket.has_dualstack_ipv6()` convenience functions to automate the
|
:meth:`~socket.has_dualstack_ipv6` convenience functions to automate the
|
||||||
necessary tasks usually involved when creating a server socket, including
|
necessary tasks usually involved when creating a server socket, including
|
||||||
accepting both IPv4 and IPv6 connections on the same socket. (Contributed
|
accepting both IPv4 and IPv6 connections on the same socket. (Contributed
|
||||||
by Giampaolo Rodola in :issue:`17561`.)
|
by Giampaolo Rodola in :issue:`17561`.)
|
||||||
|
|
|
@ -538,7 +538,7 @@ module.
|
||||||
.. nonce: TQFOR4
|
.. nonce: TQFOR4
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
:meth:`!msilib.Directory.start_component()` no longer fails if *keyfile* is
|
:meth:`!msilib.Directory.start_component` no longer fails if *keyfile* is
|
||||||
not ``None``.
|
not ``None``.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
@ -1371,7 +1371,7 @@ Asyncio: Remove inner callback on outer cancellation in shield
|
||||||
.. nonce: d8djAJ
|
.. nonce: d8djAJ
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
Fix :meth:`asyncio.SelectorEventLoop.subprocess_exec()` leaks file
|
Fix :meth:`asyncio.SelectorEventLoop.subprocess_exec` leaks file
|
||||||
descriptors if ``Popen`` fails and called with ``stdin=subprocess.PIPE``.
|
descriptors if ``Popen`` fails and called with ``stdin=subprocess.PIPE``.
|
||||||
Patch by Niklas Fiekas.
|
Patch by Niklas Fiekas.
|
||||||
|
|
||||||
|
|
|
@ -3839,7 +3839,7 @@ Added possible exceptions to the description of os.chdir().
|
||||||
.. nonce: r_wGRc
|
.. nonce: r_wGRc
|
||||||
.. section: Documentation
|
.. section: Documentation
|
||||||
|
|
||||||
Documented that in :meth:`datetime.datetime.strptime()`, the leading zero in
|
Documented that in :meth:`datetime.datetime.strptime`, the leading zero in
|
||||||
some two-digit formats is optional. Patch by Mike Gleen.
|
some two-digit formats is optional. Patch by Mike Gleen.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
|
|
@ -755,7 +755,7 @@ dependencies.
|
||||||
.. nonce: X7FRaN
|
.. nonce: X7FRaN
|
||||||
.. section: Windows
|
.. section: Windows
|
||||||
|
|
||||||
:meth:`~pathlib.Path.home()` and :meth:`~pathlib.Path.expanduser()` on
|
:meth:`~pathlib.Path.home` and :meth:`~pathlib.Path.expanduser` on
|
||||||
Windows now prefer :envvar:`USERPROFILE` and no longer use :envvar:`HOME`,
|
Windows now prefer :envvar:`USERPROFILE` and no longer use :envvar:`HOME`,
|
||||||
which is not normally set for regular user accounts. This makes them again
|
which is not normally set for regular user accounts. This makes them again
|
||||||
behave like :func:`os.path.expanduser`, which was changed to ignore
|
behave like :func:`os.path.expanduser`, which was changed to ignore
|
||||||
|
|
|
@ -403,7 +403,7 @@ after encoding it to utf-8, not before.
|
||||||
.. nonce: pDZR6V
|
.. nonce: pDZR6V
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
Added :meth:`pathlib.Path.with_stem()` to create a new Path with the stem
|
Added :meth:`pathlib.Path.with_stem` to create a new Path with the stem
|
||||||
replaced.
|
replaced.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
|
|
@ -532,7 +532,7 @@ Remove ``_random.Random.randbytes()``: the C implementation of
|
||||||
.. section: Library
|
.. section: Library
|
||||||
|
|
||||||
Added default arguments to
|
Added default arguments to
|
||||||
:meth:`difflib.SequenceMatcher.find_longest_match()`.
|
:meth:`difflib.SequenceMatcher.find_longest_match`.
|
||||||
|
|
||||||
..
|
..
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
:exc:`ValueError` messages for :meth:`!list.index()`, :meth:`!range.index()`,
|
:exc:`ValueError` messages for :meth:`!list.index`, :meth:`!range.index`,
|
||||||
:meth:`!deque.index()`, :meth:`!deque.remove()` and
|
:meth:`!deque.index`, :meth:`!deque.remove` and
|
||||||
:meth:`!ShareableList.index()` no longer contain the repr of the searched
|
:meth:`!ShareableList.index` no longer contain the repr of the searched
|
||||||
value (which can be arbitrary large) and are consistent with error messages
|
value (which can be arbitrary large) and are consistent with error messages
|
||||||
for other :meth:`!index()` and :meth:`!remove()` methods.
|
for other :meth:`!index` and :meth:`!remove` methods.
|
||||||
|
|
Loading…
Reference in New Issue