Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into sqlite-cache
  • Loading branch information
Erlend E. Aasland committed Jun 3, 2021
commit d1a233a7322dd0e195021ae481c9a7edd42f939a
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
- name: 'Restore OpenSSL build'
id: cache-openssl
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
- name: 'Restore OpenSSL build'
id: cache-openssl
uses: actions/cache@v2.1.5
uses: actions/cache@v2.1.6
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
Expand Down
13 changes: 10 additions & 3 deletions Doc/c-api/structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ the definition of all other Python objects.

Return a :term:`borrowed reference`.

The :c:func:`Py_SET_TYPE` function must be used to set an object type.
Use the :c:func:`Py_SET_TYPE` function to set an object type.

.. versionchanged:: 3.11
:c:func:`Py_TYPE()` is changed to an inline static function.


.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type)
Expand All @@ -121,9 +124,10 @@ the definition of all other Python objects.

Get the reference count of the Python object *o*.

Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count.

.. versionchanged:: 3.10
:c:func:`Py_REFCNT()` is changed to the inline static function.
Use :c:func:`Py_SET_REFCNT()` to set an object reference count.


.. c:function:: void Py_SET_REFCNT(PyObject *o, Py_ssize_t refcnt)
Expand All @@ -137,7 +141,10 @@ the definition of all other Python objects.

Get the size of the Python object *o*.

The :c:func:`Py_SET_SIZE` function must be used to set an object size.
Use the :c:func:`Py_SET_SIZE` function to set an object size.

.. versionchanged:: 3.11
:c:func:`Py_SIZE()` is changed to an inline static function.


.. c:function:: void Py_SET_SIZE(PyVarObject *o, Py_ssize_t size)
Expand Down
2 changes: 2 additions & 0 deletions Doc/c-api/typeobj.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2453,6 +2453,8 @@ Async Object Structures
See :c:func:`PyIter_Send` for details.
This slot may be set to ``NULL``.

.. versionadded:: 3.10


.. _slot-typedefs:

Expand Down
6 changes: 6 additions & 0 deletions Doc/c-api/unicode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@ APIs:
:c:func:`PyUnicode_KIND`). The *buffer* must point to an array of *size*
units of 1, 2 or 4 bytes per character, as given by the kind.

If necessary, the input *buffer* is copied and transformed into the
canonical representation. For example, if the *buffer* is a UCS4 string
(:c:macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in
the UCS1 range, it will be transformed into UCS1
(:c:macro:`PyUnicode_1BYTE_KIND`).

.. versionadded:: 3.3


Expand Down
2 changes: 1 addition & 1 deletion Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ Do not instantiate the class directly.
Start accepting connections.

This method is idempotent, so it can be called when
the server is already being serving.
the server is already serving.

The *start_serving* keyword-only parameter to
:meth:`loop.create_server` and
Expand Down
5 changes: 3 additions & 2 deletions Doc/library/contextlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ Functions and classes provided:
.. function:: suppress(*exceptions)

Return a context manager that suppresses any of the specified exceptions
if they occur in the body of a with statement and then resumes execution
with the first statement following the end of the with statement.
if they are raised in the body of a :keyword:`!with` statement and then
resumes execution with the first statement following the end of the
:keyword:`!with` statement.

As with any other mechanism that completely suppresses exceptions, this
context manager should be used only to cover very specific errors where
Expand Down
5 changes: 2 additions & 3 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1059,9 +1059,8 @@ All of the following opcodes use their arguments.
.. opcode:: LOAD_CLOSURE (i)

Pushes a reference to the cell contained in slot *i* of the cell and free
variable storage. The name of the variable is ``co_cellvars[i]`` if *i* is
less than the length of *co_cellvars*. Otherwise it is ``co_freevars[i -
len(co_cellvars)]``.
variable storage. The name of the variable is
``co_fastlocalnames[i + len(co_varnames)]``.


.. opcode:: LOAD_DEREF (i)
Expand Down
97 changes: 7 additions & 90 deletions Doc/library/gettext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ class-based API instead.
returned. [#]_


.. function:: bind_textdomain_codeset(domain, codeset=None)

Bind the *domain* to *codeset*, changing the encoding of byte strings
returned by the :func:`lgettext`, :func:`ldgettext`, :func:`lngettext`
and :func:`ldngettext` functions.
If *codeset* is omitted, then the current binding is returned.

.. deprecated-removed:: 3.8 3.10


.. function:: textdomain(domain=None)

Change or query the current global domain. If *domain* is ``None``, then the
Expand Down Expand Up @@ -108,29 +98,6 @@ class-based API instead.
.. versionadded:: 3.8


.. function:: lgettext(message)
.. function:: ldgettext(domain, message)
.. function:: lngettext(singular, plural, n)
.. function:: ldngettext(domain, singular, plural, n)

Equivalent to the corresponding functions without the ``l`` prefix
(:func:`.gettext`, :func:`dgettext`, :func:`ngettext` and :func:`dngettext`),
but the translation is returned as a byte string encoded in the preferred
system encoding if no other encoding was explicitly set with
:func:`bind_textdomain_codeset`.

.. warning::

These functions should be avoided in Python 3, because they return
encoded bytes. It's much better to use alternatives which return
Unicode strings instead, since most Python applications will want to
manipulate human readable text as strings instead of bytes. Further,
it's possible that you may get unexpected Unicode-related exceptions
if there are encoding problems with the translated strings.

.. deprecated-removed:: 3.8 3.10


Note that GNU :program:`gettext` also defines a :func:`dcgettext` method, but
this was deemed not useful and so it is currently unimplemented.

Expand Down Expand Up @@ -181,7 +148,7 @@ install themselves in the built-in namespace as the function :func:`_`.
the environment variables.


.. function:: translation(domain, localedir=None, languages=None, class_=None, fallback=False, codeset=None)
.. function:: translation(domain, localedir=None, languages=None, class_=None, fallback=False)

Return a :class:`*Translations` instance based on the *domain*, *localedir*,
and *languages*, which are first passed to :func:`find` to get a list of the
Expand All @@ -205,15 +172,13 @@ install themselves in the built-in namespace as the function :func:`_`.
.. versionchanged:: 3.3
:exc:`IOError` used to be raised instead of :exc:`OSError`.

.. deprecated-removed:: 3.8 3.10
The *codeset* parameter.

.. versionchanged:: 3.11
*codeset* parameter is removed.

.. function:: install(domain, localedir=None, codeset=None, names=None)
.. function:: install(domain, localedir=None, *, names=None)

This installs the function :func:`_` in Python's builtins namespace, based on
*domain*, *localedir*, and *codeset* which are passed to the function
:func:`translation`.
*domain* and *localedir* which are passed to the function :func:`translation`.

For the *names* parameter, please see the description of the translation
object's :meth:`~NullTranslations.install` method.
Expand All @@ -228,9 +193,8 @@ install themselves in the built-in namespace as the function :func:`_`.
builtins namespace, so it is easily accessible in all modules of your
application.

.. deprecated-removed:: 3.8 3.10
The *codeset* parameter.

.. versionchanged:: 3.11
*names* is now a keyword-only parameter.

The :class:`NullTranslations` class
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -294,22 +258,6 @@ are the methods of :class:`!NullTranslations`:
.. versionadded:: 3.8


.. method:: lgettext(message)
.. method:: lngettext(singular, plural, n)

Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation
is returned as a byte string encoded in the preferred system encoding
if no encoding was explicitly set with :meth:`set_output_charset`.
Overridden in derived classes.

.. warning::

These methods should be avoided in Python 3. See the warning for the
:func:`lgettext` function.

.. deprecated-removed:: 3.8 3.10


.. method:: info()

Return the "protected" :attr:`_info` variable, a dictionary containing
Expand All @@ -321,21 +269,6 @@ are the methods of :class:`!NullTranslations`:
Return the encoding of the message catalog file.


.. method:: output_charset()

Return the encoding used to return translated messages in :meth:`.lgettext`
and :meth:`.lngettext`.

.. deprecated-removed:: 3.8 3.10


.. method:: set_output_charset(charset)

Change the encoding used to return translated messages.

.. deprecated-removed:: 3.8 3.10


.. method:: install(names=None)

This method installs :meth:`.gettext` into the built-in namespace,
Expand Down Expand Up @@ -450,22 +383,6 @@ unexpected, or if other problems occur while reading the file, instantiating a
.. versionadded:: 3.8


.. method:: lgettext(message)
.. method:: lngettext(singular, plural, n)

Equivalent to :meth:`.gettext` and :meth:`.ngettext`, but the translation
is returned as a byte string encoded in the preferred system encoding
if no encoding was explicitly set with
:meth:`~NullTranslations.set_output_charset`.

.. warning::

These methods should be avoided in Python 3. See the warning for the
:func:`lgettext` function.

.. deprecated-removed:: 3.8 3.10


Solaris message catalog support
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
8 changes: 8 additions & 0 deletions Doc/library/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,14 @@ functions.
.. note:: If you are thinking of defining your own levels, please see the
section on :ref:`custom-levels`.

.. function:: getLevelNamesMapping()

Returns a mapping from level names to their corresponding logging levels. For example, the
string "CRITICAL" maps to :const:`CRITICAL`. The returned mapping is copied from an internal
mapping on each call to this function.

.. versionadded:: 3.11

.. function:: getLevelName(level)

Returns the textual or numeric representation of logging level *level*.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ created. Socket addresses are represented as follows:

- ``PACKET_HOST`` (the default) - Packet addressed to the local host.
- ``PACKET_BROADCAST`` - Physical-layer broadcast packet.
- ``PACKET_MULTIHOST`` - Packet sent to a physical-layer multicast address.
- ``PACKET_MULTICAST`` - Packet sent to a physical-layer multicast address.
- ``PACKET_OTHERHOST`` - Packet to some other host that has been caught by
a device driver in promiscuous mode.
- ``PACKET_OUTGOING`` - Packet originating from the local host that is
Expand Down
10 changes: 5 additions & 5 deletions Doc/library/turtle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ Input methods
Pop up a dialog window for input of a number. title is the title of the
dialog window, prompt is a text mostly describing what numerical information
to input. default: default value, minval: minimum value for input,
maxval: maximum value for input
maxval: maximum value for input.
The number input must be in the range minval .. maxval if these are
given. If not, a hint is issued and the dialog remains open for
correction.
Expand Down Expand Up @@ -1938,7 +1938,7 @@ Settings and special methods
:param cmode: one of the values 1.0 or 255

Return the colormode or set it to 1.0 or 255. Subsequently *r*, *g*, *b*
values of color triples have to be in the range 0..\ *cmode*.
values of color triples have to be in the range 0..*cmode*.

.. doctest::
:skipif: _tkinter is None
Expand Down Expand Up @@ -2002,7 +2002,7 @@ Settings and special methods

>>> screen.register_shape("triangle", ((5,-3), (0,5), (-5,-3)))

(3) *name* is an arbitrary string and shape is a (compound) :class:`Shape`
(3) *name* is an arbitrary string and *shape* is a (compound) :class:`Shape`
object: Install the corresponding compound shape.

Add a turtle shape to TurtleScreen's shapelist. Only thusly registered
Expand Down Expand Up @@ -2349,12 +2349,12 @@ Short explanation of selected entries:
auto``.
- If you set e.g. ``language = italian`` the docstringdict
:file:`turtle_docstringdict_italian.py` will be loaded at import time (if
present on the import path, e.g. in the same directory as :mod:`turtle`.
present on the import path, e.g. in the same directory as :mod:`turtle`).
- The entries *exampleturtle* and *examplescreen* define the names of these
objects as they occur in the docstrings. The transformation of
method-docstrings to function-docstrings will delete these names from the
docstrings.
- *using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its -n
- *using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its ``-n``
switch ("no subprocess"). This will prevent :func:`exitonclick` to enter the
mainloop.

Expand Down
8 changes: 4 additions & 4 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1039,17 +1039,14 @@ and will be incorrect in some rare cases, including some ``_``-s in
importlib.metadata
------------------

Feature parity with ``importlib_metadata`` 4.2
Feature parity with ``importlib_metadata`` 4.4
(`history <https://importlib-metadata.readthedocs.io/en/latest/history.html>`_).

:ref:`importlib.metadata entry points <entry-points>`
now provides a nicer experience
for selecting entry points by group and name through a new
:class:`importlib.metadata.EntryPoints` class. See the Compatibility
Note in the docs for more info on the deprecation and usage.
Incidentally, these changes also removed access by index on the
result of :func:`importlib.metadata.Distribution.entry_points`
(see :issue:`44246` for more detail).

Added :func:`importlib.metadata.packages_distributions` for resolving
top-level Python modules and packages to their
Expand Down Expand Up @@ -1140,6 +1137,9 @@ identification from `freedesktop.org os-release
pprint
------

:func:`pprint.pprint` now accepts a new ``underscore_numbers`` keyword argument.
(Contributed by sblondon in :issue:`42914`.)

:mod:`pprint` can now pretty-print :class:`dataclasses.dataclass` instances.
(Contributed by Lewis Gaul in :issue:`43080`.)

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.