Skip to content

Commit

Permalink
Merge branch 'main' into iOS-test-skips
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 authored Feb 2, 2024
2 parents 3f83f4c + 1aec064 commit 490b8b1
Show file tree
Hide file tree
Showing 54 changed files with 403 additions and 260 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
with:
python-version: '3.x'
- name: Restore config.cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Restore config.cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
Expand All @@ -274,7 +274,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@v3
uses: actions/cache@v4
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
Expand Down Expand Up @@ -319,7 +319,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@v3
uses: actions/cache@v4
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
Expand All @@ -342,7 +342,7 @@ jobs:
- name: Bind mount sources read-only
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
- name: Restore config.cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
Expand Down Expand Up @@ -375,7 +375,7 @@ jobs:
./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt
- name: 'Restore Hypothesis database'
id: cache-hypothesis-database
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./hypothesis
key: hypothesis-database-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -421,7 +421,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Restore config.cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
Expand All @@ -440,7 +440,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@v3
uses: actions/cache@v4
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
jit:
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ubuntu-doc-${{ hashFiles('Doc/requirements.txt') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Restore config.cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ matrix.os }}-${{ inputs.config_hash }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,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@v3
uses: actions/cache@v4
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Bind mount sources read-only
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
- name: Restore config.cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
key: ${{ github.job }}-${{ runner.os }}-${{ inputs.config_hash }}
Expand Down
43 changes: 22 additions & 21 deletions Doc/howto/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ custom handlers) are the following configuration methods:

* The :meth:`~Handler.setLevel` method, just as in logger objects, specifies the
lowest severity that will be dispatched to the appropriate destination. Why
are there two :func:`setLevel` methods? The level set in the logger
are there two :meth:`~Handler.setLevel` methods? The level set in the logger
determines which severity of messages it will pass to its handlers. The level
set in each handler determines which messages that handler will send on.

Expand Down Expand Up @@ -774,29 +774,29 @@ What happens if no configuration is provided

If no logging configuration is provided, it is possible to have a situation
where a logging event needs to be output, but no handlers can be found to
output the event. The behaviour of the logging package in these
circumstances is dependent on the Python version.
output the event.

For versions of Python prior to 3.2, the behaviour is as follows:
The event is output using a 'handler of last resort', stored in
:data:`lastResort`. This internal handler is not associated with any
logger, and acts like a :class:`~logging.StreamHandler` which writes the
event description message to the current value of ``sys.stderr`` (therefore
respecting any redirections which may be in effect). No formatting is
done on the message - just the bare event description message is printed.
The handler's level is set to ``WARNING``, so all events at this and
greater severities will be output.

* If *logging.raiseExceptions* is ``False`` (production mode), the event is
silently dropped.
.. versionchanged:: 3.2

* If *logging.raiseExceptions* is ``True`` (development mode), a message
'No handlers could be found for logger X.Y.Z' is printed once.
For versions of Python prior to 3.2, the behaviour is as follows:

In Python 3.2 and later, the behaviour is as follows:
* If :data:`raiseExceptions` is ``False`` (production mode), the event is
silently dropped.

* The event is output using a 'handler of last resort', stored in
``logging.lastResort``. This internal handler is not associated with any
logger, and acts like a :class:`~logging.StreamHandler` which writes the
event description message to the current value of ``sys.stderr`` (therefore
respecting any redirections which may be in effect). No formatting is
done on the message - just the bare event description message is printed.
The handler's level is set to ``WARNING``, so all events at this and
greater severities will be output.
* If :data:`raiseExceptions` is ``True`` (development mode), a message
'No handlers could be found for logger X.Y.Z' is printed once.

To obtain the pre-3.2 behaviour, ``logging.lastResort`` can be set to ``None``.
To obtain the pre-3.2 behaviour,
:data:`lastResort` can be set to ``None``.

.. _library-config:

Expand Down Expand Up @@ -998,7 +998,7 @@ Logged messages are formatted for presentation through instances of the
use with the % operator and a dictionary.

For formatting multiple messages in a batch, instances of
:class:`~handlers.BufferingFormatter` can be used. In addition to the format
:class:`BufferingFormatter` can be used. In addition to the format
string (which is applied to each message in the batch), there is provision for
header and trailer format strings.

Expand Down Expand Up @@ -1034,7 +1034,8 @@ checks to see if a module-level variable, :data:`raiseExceptions`, is set. If
set, a traceback is printed to :data:`sys.stderr`. If not set, the exception is
swallowed.

.. note:: The default value of :data:`raiseExceptions` is ``True``. This is
.. note::
The default value of :data:`raiseExceptions` is ``True``. This is
because during development, you typically want to be notified of any
exceptions that occur. It's advised that you set :data:`raiseExceptions` to
``False`` for production usage.
Expand Down Expand Up @@ -1072,7 +1073,7 @@ You can write code like this::
expensive_func2())

so that if the logger's threshold is set above ``DEBUG``, the calls to
:func:`expensive_func1` and :func:`expensive_func2` are never made.
``expensive_func1`` and ``expensive_func2`` are never made.

.. note:: In some cases, :meth:`~Logger.isEnabledFor` can itself be more
expensive than you'd like (e.g. for deeply nested loggers where an explicit
Expand Down
4 changes: 4 additions & 0 deletions Doc/library/csv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ The :mod:`csv` module defines the following constants:
Instructs :class:`reader` objects to interpret an empty (unquoted) field as None and
to otherwise behave as :data:`QUOTE_ALL`.

.. versionadded:: 3.12

.. data:: QUOTE_STRINGS

Instructs :class:`writer` objects to always place quotes around fields
Expand All @@ -360,6 +362,8 @@ The :mod:`csv` module defines the following constants:
Instructs :class:`reader` objects to interpret an empty (unquoted) string as ``None`` and
to otherwise behave as :data:`QUOTE_NONNUMERIC`.

.. versionadded:: 3.12

The :mod:`csv` module defines the following exception:


Expand Down
18 changes: 15 additions & 3 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,15 @@ Other constructors, all class methods:
.. classmethod:: date.fromisoformat(date_string)

Return a :class:`date` corresponding to a *date_string* given in any valid
ISO 8601 format, except ordinal dates (e.g. ``YYYY-DDD``)::
ISO 8601 format, with the following exceptions:

1. Reduced precision dates are not currently supported (``YYYY-MM``,
``YYYY``).
2. Extended date representations are not currently supported
(``±YYYYYY-MM-DD``).
3. Ordinal dates are not currently supported (``YYYY-OOO``).

Examples::

>>> from datetime import date
>>> date.fromisoformat('2019-12-04')
Expand Down Expand Up @@ -1017,8 +1025,12 @@ Other constructors, all class methods:

1. Time zone offsets may have fractional seconds.
2. The ``T`` separator may be replaced by any single unicode character.
3. Ordinal dates are not currently supported.
4. Fractional hours and minutes are not supported.
3. Fractional hours and minutes are not supported.
4. Reduced precision dates are not currently supported (``YYYY-MM``,
``YYYY``).
5. Extended date representations are not currently supported
(``±YYYYYY-MM-DD``).
6. Ordinal dates are not currently supported (``YYYY-OOO``).

Examples::

Expand Down
3 changes: 1 addition & 2 deletions Doc/library/gzip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The module defines the following items:

.. exception:: BadGzipFile

An exception raised for invalid gzip files. It inherits :exc:`OSError`.
An exception raised for invalid gzip files. It inherits from :exc:`OSError`.
:exc:`EOFError` and :exc:`zlib.error` can also be raised for invalid gzip
files.

Expand Down Expand Up @@ -287,4 +287,3 @@ Command line options
.. option:: -h, --help

Show the help message.

24 changes: 12 additions & 12 deletions Doc/library/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ I/O Base Classes

.. class:: RawIOBase

Base class for raw binary streams. It inherits :class:`IOBase`.
Base class for raw binary streams. It inherits from :class:`IOBase`.

Raw binary streams typically provide low-level access to an underlying OS
device or API, and do not try to encapsulate it in high-level primitives
Expand Down Expand Up @@ -519,7 +519,7 @@ I/O Base Classes
.. class:: BufferedIOBase

Base class for binary streams that support some kind of buffering.
It inherits :class:`IOBase`.
It inherits from :class:`IOBase`.

The main difference with :class:`RawIOBase` is that methods :meth:`read`,
:meth:`readinto` and :meth:`write` will try (respectively) to read as much
Expand Down Expand Up @@ -633,7 +633,7 @@ Raw File I/O
.. class:: FileIO(name, mode='r', closefd=True, opener=None)

A raw binary stream representing an OS-level file containing bytes data. It
inherits :class:`RawIOBase`.
inherits from :class:`RawIOBase`.

The *name* can be one of two things:

Expand Down Expand Up @@ -696,7 +696,7 @@ than raw I/O does.

.. class:: BytesIO(initial_bytes=b'')

A binary stream using an in-memory bytes buffer. It inherits
A binary stream using an in-memory bytes buffer. It inherits from
:class:`BufferedIOBase`. The buffer is discarded when the
:meth:`~IOBase.close` method is called.

Expand Down Expand Up @@ -745,7 +745,7 @@ than raw I/O does.
.. class:: BufferedReader(raw, buffer_size=DEFAULT_BUFFER_SIZE)

A buffered binary stream providing higher-level access to a readable, non
seekable :class:`RawIOBase` raw binary stream. It inherits
seekable :class:`RawIOBase` raw binary stream. It inherits from
:class:`BufferedIOBase`.

When reading data from this object, a larger amount of data may be
Expand Down Expand Up @@ -783,7 +783,7 @@ than raw I/O does.
.. class:: BufferedWriter(raw, buffer_size=DEFAULT_BUFFER_SIZE)

A buffered binary stream providing higher-level access to a writeable, non
seekable :class:`RawIOBase` raw binary stream. It inherits
seekable :class:`RawIOBase` raw binary stream. It inherits from
:class:`BufferedIOBase`.

When writing to this object, data is normally placed into an internal
Expand Down Expand Up @@ -818,7 +818,7 @@ than raw I/O does.
.. class:: BufferedRandom(raw, buffer_size=DEFAULT_BUFFER_SIZE)

A buffered binary stream providing higher-level access to a seekable
:class:`RawIOBase` raw binary stream. It inherits :class:`BufferedReader`
:class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedReader`
and :class:`BufferedWriter`.

The constructor creates a reader and writer for a seekable raw stream, given
Expand All @@ -834,7 +834,7 @@ than raw I/O does.

A buffered binary stream providing higher-level access to two non seekable
:class:`RawIOBase` raw binary streams---one readable, the other writeable.
It inherits :class:`BufferedIOBase`.
It inherits from :class:`BufferedIOBase`.

*reader* and *writer* are :class:`RawIOBase` objects that are readable and
writeable respectively. If the *buffer_size* is omitted it defaults to
Expand All @@ -857,7 +857,7 @@ Text I/O
.. class:: TextIOBase

Base class for text streams. This class provides a character and line based
interface to stream I/O. It inherits :class:`IOBase`.
interface to stream I/O. It inherits from :class:`IOBase`.

:class:`TextIOBase` provides or overrides these data attributes and
methods in addition to those from :class:`IOBase`:
Expand Down Expand Up @@ -946,7 +946,7 @@ Text I/O
line_buffering=False, write_through=False)

A buffered text stream providing higher-level access to a
:class:`BufferedIOBase` buffered binary stream. It inherits
:class:`BufferedIOBase` buffered binary stream. It inherits from
:class:`TextIOBase`.

*encoding* gives the name of the encoding that the stream will be decoded or
Expand Down Expand Up @@ -1073,7 +1073,7 @@ Text I/O

.. class:: StringIO(initial_value='', newline='\n')

A text stream using an in-memory text buffer. It inherits
A text stream using an in-memory text buffer. It inherits from
:class:`TextIOBase`.

The text buffer is discarded when the :meth:`~IOBase.close` method is
Expand Down Expand Up @@ -1124,7 +1124,7 @@ Text I/O
.. class:: IncrementalNewlineDecoder

A helper codec that decodes newlines for :term:`universal newlines` mode.
It inherits :class:`codecs.IncrementalDecoder`.
It inherits from :class:`codecs.IncrementalDecoder`.


Performance
Expand Down
Loading

0 comments on commit 490b8b1

Please sign in to comment.