Skip to content

Commit 41c1705

Browse files
Merge branch 'main' into pythongh-95468
2 parents 3f502d7 + a9c2bc1 commit 41c1705

24 files changed

+1296
-381
lines changed

.github/workflows/reusable-macos.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
path: config.cache
3636
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
3737
- name: Install Homebrew dependencies
38-
run: brew install pkg-config [email protected] xz gdbm tcl-tk
38+
run: brew install pkg-config [email protected] xz gdbm tcl-tk make
3939
- name: Configure CPython
4040
run: |
4141
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
@@ -44,14 +44,27 @@ jobs:
4444
--config-cache \
4545
--with-pydebug \
4646
--enable-slower-safety \
47+
--enable-safety \
4748
${{ inputs.free-threading && '--disable-gil' || '' }} \
4849
--prefix=/opt/python-dev \
4950
--with-openssl="$(brew --prefix [email protected])"
5051
- name: Build CPython
51-
run: set -o pipefail; make -j8 2>&1 | tee compiler_output.txt
52+
if : ${{ inputs.free-threading || inputs.os != 'macos-13' }}
53+
run: gmake -j8
54+
- name: Build CPython for compiler warning check
55+
if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }}
56+
run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt
5257
- name: Display build info
5358
run: make pythoninfo
5459
- name: Check compiler warnings
55-
run: python3 Tools/build/check_warnings.py --compiler-output-file-path=compiler_output.txt --warning-ignore-file-path=Tools/build/.warningignore_macos --compiler-output-type=clang
60+
if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }}
61+
run: >-
62+
python3 Tools/build/check_warnings.py
63+
--compiler-output-file-path=compiler_output_macos.txt
64+
--warning-ignore-file-path=Tools/build/.warningignore_macos
65+
--compiler-output-type=clang
66+
--fail-on-regression
67+
--fail-on-improvement
68+
--path-prefix="./"
5669
- name: Tests
5770
run: make test

.github/workflows/reusable-ubuntu.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,33 @@ jobs:
6767
working-directory: ${{ env.CPYTHON_BUILDDIR }}
6868
run: >-
6969
../cpython-ro-srcdir/configure
70-
CFLAGS="-fdiagnostics-format=json"
7170
--config-cache
7271
--with-pydebug
7372
--enable-slower-safety
73+
--enable-safety
7474
--with-openssl=$OPENSSL_DIR
7575
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
7676
- name: Build CPython out-of-tree
77+
if: ${{ inputs.free-threading }}
7778
working-directory: ${{ env.CPYTHON_BUILDDIR }}
78-
run: set -o pipefail; make -j4 2>&1 | tee compiler_output.txt
79+
run: make -j4
80+
- name: Build CPython out-of-tree (for compiler warning check)
81+
if: ${{ !inputs.free-threading}}
82+
working-directory: ${{ env.CPYTHON_BUILDDIR }}
83+
run: set -o pipefail; make -j4 --output-sync 2>&1 | tee compiler_output_ubuntu.txt
7984
- name: Display build info
8085
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8186
run: make pythoninfo
8287
- name: Check compiler warnings
83-
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 --compiler-output-type=json
88+
if: ${{ !inputs.free-threading }}
89+
run: >-
90+
python Tools/build/check_warnings.py
91+
--compiler-output-file-path=${{ env.CPYTHON_BUILDDIR }}/compiler_output_ubuntu.txt
92+
--warning-ignore-file-path ${GITHUB_WORKSPACE}/Tools/build/.warningignore_ubuntu
93+
--compiler-output-type=gcc
94+
--fail-on-regression
95+
--fail-on-improvement
96+
--path-prefix="../cpython-ro-srcdir/"
8497
- name: Remount sources writable for tests
8598
# some tests write to srcdir, lack of pyc files slows down testing
8699
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
Lines changed: 59 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,68 @@
11
Pending Removal in Python 3.15
22
------------------------------
33

4-
* :class:`http.server.CGIHTTPRequestHandler` will be removed along with its
5-
related ``--cgi`` flag to ``python -m http.server``. It was obsolete and
6-
rarely used. No direct replacement exists. *Anything* is better than CGI
7-
to interface a web server with a request handler.
8-
9-
* :class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python 3.11
10-
and originally planned for removal in Python 3.13 (:gh:`90817`),
11-
but removal has been postponed to Python 3.15.
12-
Use :func:`locale.setlocale`, :func:`locale.getencoding` and
13-
:func:`locale.getlocale` instead.
14-
(Contributed by Hugo van Kemenade in :gh:`111187`.)
4+
* :mod:`ctypes`:
5+
6+
* The undocumented :func:`!ctypes.SetPointerType` function
7+
has been deprecated since Python 3.13.
8+
9+
* :mod:`http.server`:
10+
11+
* The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler`
12+
has been deprecated since Python 3.13.
13+
No direct replacement exists.
14+
*Anything* is better than CGI to interface
15+
a web server with a request handler.
16+
17+
* The :option:`!--cgi` flag to the :program:`python -m http.server`
18+
command-line interface has been deprecated since Python 3.13.
19+
20+
* :class:`locale`:
21+
22+
* The :func:`~locale.getdefaultlocale` function
23+
has been deprecated since Python 3.11.
24+
Its removal was originally planned for Python 3.13 (:gh:`90817`),
25+
but has been postponed to Python 3.15.
26+
Use :func:`~locale.getlocale`, :func:`~locale.setlocale`,
27+
and :func:`~locale.getencoding` instead.
28+
(Contributed by Hugo van Kemenade in :gh:`111187`.)
1529

1630
* :mod:`pathlib`:
17-
:meth:`pathlib.PurePath.is_reserved` is deprecated and scheduled for
18-
removal in Python 3.15. Use :func:`os.path.isreserved` to detect reserved
19-
paths on Windows.
31+
32+
* :meth:`.PurePath.is_reserved`
33+
has been deprecated since Python 3.13.
34+
Use :func:`os.path.isreserved` to detect reserved paths on Windows.
2035

2136
* :mod:`platform`:
22-
:func:`~platform.java_ver` is deprecated and will be removed in 3.15.
23-
It was largely untested, had a confusing API,
24-
and was only useful for Jython support.
25-
(Contributed by Nikita Sobolev in :gh:`116349`.)
37+
38+
* :func:`~platform.java_ver` has been deprecated since Python 3.13.
39+
This function is only useful for Jython support, has a confusing API,
40+
and is largely untested.
2641

2742
* :mod:`threading`:
28-
Passing any arguments to :func:`threading.RLock` is now deprecated.
29-
C version allows any numbers of args and kwargs,
30-
but they are just ignored. Python version does not allow any arguments.
31-
All arguments will be removed from :func:`threading.RLock` in Python 3.15.
32-
(Contributed by Nikita Sobolev in :gh:`102029`.)
33-
34-
* :class:`typing.NamedTuple`:
35-
36-
* The undocumented keyword argument syntax for creating :class:`!NamedTuple` classes
37-
(``NT = NamedTuple("NT", x=int)``) is deprecated, and will be disallowed in
38-
3.15. Use the class-based syntax or the functional syntax instead.
39-
40-
* When using the functional syntax to create a :class:`!NamedTuple` class, failing to
41-
pass a value to the *fields* parameter (``NT = NamedTuple("NT")``) is
42-
deprecated. Passing ``None`` to the *fields* parameter
43-
(``NT = NamedTuple("NT", None)``) is also deprecated. Both will be
44-
disallowed in Python 3.15. To create a :class:`!NamedTuple` class with 0 fields, use
45-
``class NT(NamedTuple): pass`` or ``NT = NamedTuple("NT", [])``.
46-
47-
* :class:`typing.TypedDict`: When using the functional syntax to create a
48-
:class:`!TypedDict` class, failing to pass a value to the *fields* parameter (``TD =
49-
TypedDict("TD")``) is deprecated. Passing ``None`` to the *fields* parameter
50-
(``TD = TypedDict("TD", None)``) is also deprecated. Both will be disallowed
51-
in Python 3.15. To create a :class:`!TypedDict` class with 0 fields, use ``class
52-
TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``.
53-
54-
* :mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()``
55-
methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes.
56-
They will be removed in Python 3.15.
57-
(Contributed by Victor Stinner in :gh:`105096`.)
43+
44+
* :func:`~threading.RLock` will take no arguments in Python 3.15.
45+
Passing any arguments has been deprecated since Python 3.14,
46+
as the Python version does not permit any arguments,
47+
but the C version allows any number of positional or keyword arguments,
48+
ignoring every argument.
49+
50+
* :mod:`typing`:
51+
52+
* The undocumented keyword argument syntax for creating
53+
:class:`~typing.NamedTuple` classes
54+
(e.g. ``Point = NamedTuple("Point", x=int, y=int)``)
55+
has been deprecated since Python 3.13.
56+
Use the class-based syntax or the functional syntax instead.
57+
58+
* The :func:`typing.no_type_check_decorator` decorator function
59+
has been deprecated since Python 3.13.
60+
After eight years in the :mod:`typing` module,
61+
it has yet to be supported by any major type checker.
62+
63+
* :mod:`wave`:
64+
65+
* The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`,
66+
and :meth:`~wave.Wave_read.getmarkers` methods of
67+
the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes
68+
have been deprecated since Python 3.13.
Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,42 @@
11
Pending Removal in Python 3.16
22
------------------------------
33

4+
* :mod:`builtins`:
5+
6+
* Bitwise inversion on boolean types, ``~True`` or ``~False``
7+
has been deprecated since Python 3.12,
8+
as it produces surprising and unintuitive results (``-2`` and ``-1``).
9+
Use ``not x`` instead for the logical negation of a Boolean.
10+
In the rare case that you need the bitwise inversion of
11+
the underlying integer, convert to ``int`` explicitly (``~int(x)``).
12+
413
* :mod:`array`:
5-
:class:`array.array` ``'u'`` type (:c:type:`wchar_t`):
6-
use the ``'w'`` type instead (``Py_UCS4``).
714

8-
* :mod:`builtins`:
9-
``~bool``, bitwise inversion on bool.
15+
* The ``'u'`` format code (:c:type:`wchar_t`)
16+
has been deprecated in documentation since Python 3.3
17+
and at runtime since Python 3.13.
18+
Use the ``'w'`` format code (:c:type:`Py_UCS4`)
19+
for Unicode characters instead.
20+
21+
* :mod:`shutil`:
22+
23+
* The :class:`!ExecError` exception
24+
has been deprecated since Python 3.14.
25+
It has not been used by any function in :mod:`!shutil` since Python 3.4,
26+
and is now an alias of :exc:`RuntimeError`.
1027

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

15-
* :mod:`shutil`: Deprecate :class:`!shutil.ExecError`, which hasn't
16-
been raised by any :mod:`!shutil` function since Python 3.4. It's
17-
now an alias for :exc:`RuntimeError`.
30+
* The :meth:`Class.get_methods <symtable.Class.get_methods>` method
31+
has been deprecated since Python 3.14.
32+
33+
* :mod:`sys`:
34+
35+
* The :func:`~sys._enablelegacywindowsfsencoding` function
36+
has been deprecated since Python 3.13.
37+
Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment variable instead.
38+
39+
* :mod:`tarfile`:
1840

41+
* The undocumented and unused :attr:`!TarFile.tarfile` attribute
42+
has been deprecated since Python 3.13.

0 commit comments

Comments
 (0)