Skip to content

Commit

Permalink
Merge branch 'main' into pep649-typevar2
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra authored Jul 27, 2024
2 parents 742400f + 45614ec commit 2f251cf
Show file tree
Hide file tree
Showing 102 changed files with 2,493 additions and 1,669 deletions.
75 changes: 58 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
# }}
#
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
run-win-msi: ${{ steps.win-msi-changes.outputs.run-win-msi || false }}
run_tests: ${{ steps.check.outputs.run_tests || false }}
run_hypothesis: ${{ steps.check.outputs.run_hypothesis || false }}
run_cifuzz: ${{ steps.check.outputs.run_cifuzz || false }}
Expand Down Expand Up @@ -123,6 +124,20 @@ jobs:
id: docs-changes
run: |
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
- name: Get a list of the MSI installer-related files
id: changed-win-msi-files
uses: Ana06/get-changed-files@v2.3.0
with:
filter: |
Tools/msi/**
.github/workflows/reusable-windows-msi.yml
format: csv # works for paths with spaces
- name: Check for changes in MSI installer-related files
if: >-
steps.changed-win-msi-files.outputs.added_modified_renamed != ''
id: win-msi-changes
run: |
echo "run-win-msi=true" >> "${GITHUB_OUTPUT}"
check-docs:
name: Docs
Expand Down Expand Up @@ -218,28 +233,54 @@ jobs:
arch: ${{ matrix.arch }}
free-threading: ${{ matrix.free-threading }}

build_macos:
name: 'macOS'
build_windows_msi:
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
Windows MSI${{ '' }}
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
uses: ./.github/workflows/reusable-macos.yml
if: fromJSON(needs.check_source.outputs.run-win-msi)
strategy:
matrix:
arch:
- x86
- x64
- arm64
uses: ./.github/workflows/reusable-windows-msi.yml
with:
config_hash: ${{ needs.check_source.outputs.config_hash }}
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
# Cirrus used for upstream, macos-14 for forks.
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14", "macos-13"]'
arch: ${{ matrix.arch }}

build_macos_free_threading:
name: 'macOS (free-threading)'
build_macos:
name: >-
macOS
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'
strategy:
fail-fast: false
matrix:
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
# macOS 13 only runs tests against the GIL-enabled CPython.
# Cirrus used for upstream, macos-14 for forks.
os:
- ghcr.io/cirruslabs/macos-runner:sonoma
- macos-14
- macos-13
is-fork: # only used for the exclusion trick
- ${{ github.repository_owner != 'python' }}
free-threading:
- false
- true
exclude:
- os: ghcr.io/cirruslabs/macos-runner:sonoma
is-fork: true
- os: macos-14
is-fork: false
- os: macos-13
free-threading: true
uses: ./.github/workflows/reusable-macos.yml
with:
config_hash: ${{ needs.check_source.outputs.config_hash }}
free-threading: true
# Cirrus and macos-14 are M1.
# Cirrus used for upstream, macos-14 for forks.
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14"]'
free-threading: ${{ matrix.free-threading }}
os: ${{ matrix.os }}

build_ubuntu:
name: >-
Expand Down Expand Up @@ -307,7 +348,7 @@ jobs:
with:
save: false
- name: Configure CPython
run: ./configure --config-cache --enable-slower-safety --with-pydebug --with-openssl=$OPENSSL_DIR
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl=$OPENSSL_DIR
- name: Build CPython
run: make -j4
- name: Display build info
Expand Down Expand Up @@ -566,11 +607,11 @@ jobs:
- check-docs
- check_generated_files
- build_macos
- build_macos_free_threading
- build_ubuntu
- build_ubuntu_ssltests
- build_wasi
- build_windows
- build_windows_msi
- test_hypothesis
- build_asan
- build_tsan
Expand All @@ -585,6 +626,7 @@ jobs:
with:
allowed-failures: >-
build_ubuntu_ssltests,
build_windows_msi,
cifuzz,
test_hypothesis,
allowed-skips: >-
Expand All @@ -600,7 +642,6 @@ jobs:
&& '
check_generated_files,
build_macos,
build_macos_free_threading,
build_ubuntu,
build_ubuntu_ssltests,
build_wasi,
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/build_msi.yml

This file was deleted.

22 changes: 6 additions & 16 deletions .github/workflows/reusable-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ on:
required: false
type: boolean
default: false
os-matrix:
required: false
os:
description: OS to run the job
required: true
type: string

jobs:
build_macos:
name: build and test (${{ matrix.os }})
name: build and test (${{ inputs.os }})
timeout-minutes: 60
env:
HOMEBREW_NO_ANALYTICS: 1
Expand All @@ -23,18 +24,7 @@ jobs:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
PYTHONSTRICTEXTENSIONBUILD: 1
TERM: linux
strategy:
fail-fast: false
matrix:
os: ${{fromJson(inputs.os-matrix)}}
is-fork:
- ${{ github.repository_owner != 'python' }}
exclude:
- os: "ghcr.io/cirruslabs/macos-runner:sonoma"
is-fork: true
- os: "macos-14"
is-fork: false
runs-on: ${{ matrix.os }}
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- name: Runner image version
Expand All @@ -43,7 +33,7 @@ jobs:
uses: actions/cache@v4
with:
path: config.cache
key: ${{ github.job }}-${{ matrix.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
- name: Install Homebrew dependencies
run: brew install pkg-config openssl@3.0 xz gdbm tcl-tk
- name: Configure CPython
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/reusable-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,20 @@ jobs:
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: >-
../cpython-ro-srcdir/configure
CFLAGS="-fdiagnostics-format=json"
--config-cache
--with-pydebug
--enable-slower-safety
--with-openssl=$OPENSSL_DIR
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
- name: Build CPython out-of-tree
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: make -j4
run: make -j4 &> compiler_output.txt
- name: Display build info
working-directory: ${{ env.CPYTHON_BUILDDIR }}
run: make pythoninfo
- name: Check compiler warnings
run: python Tools/build/check_warnings.py --compiler-output-file-path=${{ env.CPYTHON_BUILDDIR }}/compiler_output.txt --warning-ignore-file-path ${GITHUB_WORKSPACE}/Tools/build/.warningignore_ubuntu
- name: Remount sources writable for tests
# some tests write to srcdir, lack of pyc files slows down testing
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/reusable-windows-msi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: TestsMSI

on:
workflow_call:
inputs:
arch:
description: CPU architecture
required: true
type: string

permissions:
contents: read

jobs:
build:
name: installer for ${{ inputs.arch }}
runs-on: windows-latest
timeout-minutes: 60
env:
IncludeFreethreaded: true
steps:
- uses: actions/checkout@v4
- name: Build CPython installer
run: .\Tools\msi\build.bat --doc -${{ inputs.arch }}
9 changes: 2 additions & 7 deletions Doc/bugs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,16 @@ Documentation bugs
==================

If you find a bug in this documentation or would like to propose an improvement,
please submit a bug report on the :ref:`tracker <using-the-tracker>`. If you
please submit a bug report on the :ref:`issue tracker <using-the-tracker>`. If you
have a suggestion on how to fix it, include that as well.

You can also open a discussion item on our
`Documentation Discourse forum <https://discuss.python.org/c/documentation/26>`_.

If you find a bug in the theme (HTML / CSS / JavaScript) of the
documentation, please submit a bug report on the `python-doc-theme bug
documentation, please submit a bug report on the `python-doc-theme issue
tracker <https://github.com/python/python-docs-theme>`_.

If you're short on time, you can also email documentation bug reports to
docs@python.org (behavioral bugs can be sent to python-list@python.org).
'docs@' is a mailing list run by volunteers; your request will be noticed,
though it may take a while to be processed.

.. seealso::

`Documentation bugs`_
Expand Down
52 changes: 52 additions & 0 deletions Doc/deprecations/pending-removal-in-3.13.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Pending Removal in Python 3.13
------------------------------

Modules (see :pep:`594`):

* :mod:`!aifc`
* :mod:`!audioop`
* :mod:`!cgi`
* :mod:`!cgitb`
* :mod:`!chunk`
* :mod:`!crypt`
* :mod:`!imghdr`
* :mod:`!mailcap`
* :mod:`!msilib`
* :mod:`!nis`
* :mod:`!nntplib`
* :mod:`!ossaudiodev`
* :mod:`!pipes`
* :mod:`!sndhdr`
* :mod:`!spwd`
* :mod:`!sunau`
* :mod:`!telnetlib`
* :mod:`!uu`
* :mod:`!xdrlib`

Other modules:

* :mod:`!lib2to3`, and the :program:`2to3` program (:gh:`84540`)

APIs:

* :class:`!configparser.LegacyInterpolation` (:gh:`90765`)
* ``locale.resetlocale()`` (:gh:`90817`)
* :meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)
* :func:`!unittest.findTestCases` (:gh:`50096`)
* :func:`!unittest.getTestCaseNames` (:gh:`50096`)
* :func:`!unittest.makeSuite` (:gh:`50096`)
* :meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)
* :class:`!webbrowser.MacOSX` (:gh:`86421`)
* :class:`classmethod` descriptor chaining (:gh:`89519`)
* :mod:`importlib.resources` deprecated methods:

* ``contents()``
* ``is_resource()``
* ``open_binary()``
* ``open_text()``
* ``path()``
* ``read_binary()``
* ``read_text()``

Use :func:`importlib.resources.files()` instead. Refer to `importlib-resources: Migrating from Legacy
<https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy>`_ (:gh:`106531`)
19 changes: 19 additions & 0 deletions Doc/deprecations/pending-removal-in-3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ Pending Removal in Python 3.14
Use :class:`ast.Constant` instead.
(Contributed by Serhiy Storchaka in :gh:`90953`.)

* :mod:`asyncio`:

* The child watcher classes :class:`!asyncio.MultiLoopChildWatcher`,
:class:`!asyncio.FastChildWatcher`, :class:`!asyncio.AbstractChildWatcher`
and :class:`!asyncio.SafeChildWatcher` are deprecated and
will be removed in Python 3.14.
(Contributed by Kumar Aditya in :gh:`94597`.)

* :func:`!asyncio.set_child_watcher`, :func:`!asyncio.get_child_watcher`,
:meth:`!asyncio.AbstractEventLoopPolicy.set_child_watcher` and
:meth:`!asyncio.AbstractEventLoopPolicy.get_child_watcher` are deprecated
and will be removed in Python 3.14.
(Contributed by Kumar Aditya in :gh:`94597`.)

* The :meth:`~asyncio.get_event_loop` method of the
default event loop policy now emits a :exc:`DeprecationWarning` if there
is no current event loop set and it decides to create one.
(Contributed by Serhiy Storchaka and Guido van Rossum in :gh:`100160`.)

* :mod:`collections.abc`: Deprecated :class:`!collections.abc.ByteString`.
Prefer :class:`!Sequence` or :class:`~collections.abc.Buffer`.
For use in typing, prefer a union, like ``bytes | bytearray``,
Expand Down
7 changes: 6 additions & 1 deletion Doc/deprecations/pending-removal-in-3.16.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Pending Removal in Python 3.16
------------------------------

* :class:`array.array` ``'u'`` type (:c:type:`wchar_t`):
* :mod:`array`:
:class:`array.array` ``'u'`` type (:c:type:`wchar_t`):
use the ``'w'`` type instead (``Py_UCS4``).

* :mod:`symtable`:
Deprecate :meth:`symtable.Class.get_methods` due to the lack of interest.
(Contributed by Bénédikt Tran in :gh:`119698`.)
Loading

0 comments on commit 2f251cf

Please sign in to comment.