forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pythongh-115999-thread-local-bytecode
- Loading branch information
Showing
77 changed files
with
1,498 additions
and
514 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
path: config.cache | ||
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }} | ||
- name: Install Homebrew dependencies | ||
run: brew install pkg-config [email protected] xz gdbm tcl-tk | ||
run: brew install pkg-config [email protected] xz gdbm tcl-tk make | ||
- name: Configure CPython | ||
run: | | ||
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \ | ||
|
@@ -44,14 +44,27 @@ jobs: | |
--config-cache \ | ||
--with-pydebug \ | ||
--enable-slower-safety \ | ||
--enable-safety \ | ||
${{ inputs.free-threading && '--disable-gil' || '' }} \ | ||
--prefix=/opt/python-dev \ | ||
--with-openssl="$(brew --prefix [email protected])" | ||
- name: Build CPython | ||
run: set -o pipefail; make -j8 2>&1 | tee compiler_output.txt | ||
if : ${{ inputs.free-threading || inputs.os != 'macos-13' }} | ||
run: gmake -j8 | ||
- name: Build CPython for compiler warning check | ||
if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }} | ||
run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt | ||
- name: Display build info | ||
run: make pythoninfo | ||
- name: Check compiler warnings | ||
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 | ||
if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }} | ||
run: >- | ||
python3 Tools/build/check_warnings.py | ||
--compiler-output-file-path=compiler_output_macos.txt | ||
--warning-ignore-file-path=Tools/build/.warningignore_macos | ||
--compiler-output-type=clang | ||
--fail-on-regression | ||
--fail-on-improvement | ||
--path-prefix="./" | ||
- name: Tests | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,68 @@ | ||
Pending Removal in Python 3.15 | ||
------------------------------ | ||
|
||
* :class:`http.server.CGIHTTPRequestHandler` will be removed along with its | ||
related ``--cgi`` flag to ``python -m http.server``. It was obsolete and | ||
rarely used. No direct replacement exists. *Anything* is better than CGI | ||
to interface a web server with a request handler. | ||
|
||
* :class:`locale`: :func:`locale.getdefaultlocale` was deprecated in Python 3.11 | ||
and originally planned for removal in Python 3.13 (:gh:`90817`), | ||
but removal has been postponed to Python 3.15. | ||
Use :func:`locale.setlocale`, :func:`locale.getencoding` and | ||
:func:`locale.getlocale` instead. | ||
(Contributed by Hugo van Kemenade in :gh:`111187`.) | ||
* :mod:`ctypes`: | ||
|
||
* The undocumented :func:`!ctypes.SetPointerType` function | ||
has been deprecated since Python 3.13. | ||
|
||
* :mod:`http.server`: | ||
|
||
* The obsolete and rarely used :class:`~http.server.CGIHTTPRequestHandler` | ||
has been deprecated since Python 3.13. | ||
No direct replacement exists. | ||
*Anything* is better than CGI to interface | ||
a web server with a request handler. | ||
|
||
* The :option:`!--cgi` flag to the :program:`python -m http.server` | ||
command-line interface has been deprecated since Python 3.13. | ||
|
||
* :class:`locale`: | ||
|
||
* The :func:`~locale.getdefaultlocale` function | ||
has been deprecated since Python 3.11. | ||
Its removal was originally planned for Python 3.13 (:gh:`90817`), | ||
but has been postponed to Python 3.15. | ||
Use :func:`~locale.getlocale`, :func:`~locale.setlocale`, | ||
and :func:`~locale.getencoding` instead. | ||
(Contributed by Hugo van Kemenade in :gh:`111187`.) | ||
|
||
* :mod:`pathlib`: | ||
:meth:`pathlib.PurePath.is_reserved` is deprecated and scheduled for | ||
removal in Python 3.15. Use :func:`os.path.isreserved` to detect reserved | ||
paths on Windows. | ||
|
||
* :meth:`.PurePath.is_reserved` | ||
has been deprecated since Python 3.13. | ||
Use :func:`os.path.isreserved` to detect reserved paths on Windows. | ||
|
||
* :mod:`platform`: | ||
:func:`~platform.java_ver` is deprecated and will be removed in 3.15. | ||
It was largely untested, had a confusing API, | ||
and was only useful for Jython support. | ||
(Contributed by Nikita Sobolev in :gh:`116349`.) | ||
|
||
* :func:`~platform.java_ver` has been deprecated since Python 3.13. | ||
This function is only useful for Jython support, has a confusing API, | ||
and is largely untested. | ||
|
||
* :mod:`threading`: | ||
Passing any arguments to :func:`threading.RLock` is now deprecated. | ||
C version allows any numbers of args and kwargs, | ||
but they are just ignored. Python version does not allow any arguments. | ||
All arguments will be removed from :func:`threading.RLock` in Python 3.15. | ||
(Contributed by Nikita Sobolev in :gh:`102029`.) | ||
|
||
* :class:`typing.NamedTuple`: | ||
|
||
* The undocumented keyword argument syntax for creating :class:`!NamedTuple` classes | ||
(``NT = NamedTuple("NT", x=int)``) is deprecated, and will be disallowed in | ||
3.15. Use the class-based syntax or the functional syntax instead. | ||
|
||
* When using the functional syntax to create a :class:`!NamedTuple` class, failing to | ||
pass a value to the *fields* parameter (``NT = NamedTuple("NT")``) is | ||
deprecated. Passing ``None`` to the *fields* parameter | ||
(``NT = NamedTuple("NT", None)``) is also deprecated. Both will be | ||
disallowed in Python 3.15. To create a :class:`!NamedTuple` class with 0 fields, use | ||
``class NT(NamedTuple): pass`` or ``NT = NamedTuple("NT", [])``. | ||
|
||
* :class:`typing.TypedDict`: When using the functional syntax to create a | ||
:class:`!TypedDict` class, failing to pass a value to the *fields* parameter (``TD = | ||
TypedDict("TD")``) is deprecated. Passing ``None`` to the *fields* parameter | ||
(``TD = TypedDict("TD", None)``) is also deprecated. Both will be disallowed | ||
in Python 3.15. To create a :class:`!TypedDict` class with 0 fields, use ``class | ||
TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``. | ||
|
||
* :mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and ``getmarkers()`` | ||
methods of the :class:`wave.Wave_read` and :class:`wave.Wave_write` classes. | ||
They will be removed in Python 3.15. | ||
(Contributed by Victor Stinner in :gh:`105096`.) | ||
|
||
* :func:`~threading.RLock` will take no arguments in Python 3.15. | ||
Passing any arguments has been deprecated since Python 3.14, | ||
as the Python version does not permit any arguments, | ||
but the C version allows any number of positional or keyword arguments, | ||
ignoring every argument. | ||
|
||
* :mod:`typing`: | ||
|
||
* The undocumented keyword argument syntax for creating | ||
:class:`~typing.NamedTuple` classes | ||
(e.g. ``Point = NamedTuple("Point", x=int, y=int)``) | ||
has been deprecated since Python 3.13. | ||
Use the class-based syntax or the functional syntax instead. | ||
|
||
* The :func:`typing.no_type_check_decorator` decorator function | ||
has been deprecated since Python 3.13. | ||
After eight years in the :mod:`typing` module, | ||
it has yet to be supported by any major type checker. | ||
|
||
* :mod:`wave`: | ||
|
||
* The :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, | ||
and :meth:`~wave.Wave_read.getmarkers` methods of | ||
the :class:`~wave.Wave_read` and :class:`~wave.Wave_write` classes | ||
have been deprecated since Python 3.13. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,42 @@ | ||
Pending Removal in Python 3.16 | ||
------------------------------ | ||
|
||
* :mod:`builtins`: | ||
|
||
* Bitwise inversion on boolean types, ``~True`` or ``~False`` | ||
has been deprecated since Python 3.12, | ||
as it produces surprising and unintuitive results (``-2`` and ``-1``). | ||
Use ``not x`` instead for the logical negation of a Boolean. | ||
In the rare case that you need the bitwise inversion of | ||
the underlying integer, convert to ``int`` explicitly (``~int(x)``). | ||
|
||
* :mod:`array`: | ||
:class:`array.array` ``'u'`` type (:c:type:`wchar_t`): | ||
use the ``'w'`` type instead (``Py_UCS4``). | ||
|
||
* :mod:`builtins`: | ||
``~bool``, bitwise inversion on bool. | ||
* The ``'u'`` format code (:c:type:`wchar_t`) | ||
has been deprecated in documentation since Python 3.3 | ||
and at runtime since Python 3.13. | ||
Use the ``'w'`` format code (:c:type:`Py_UCS4`) | ||
for Unicode characters instead. | ||
|
||
* :mod:`shutil`: | ||
|
||
* The :class:`!ExecError` exception | ||
has been deprecated since Python 3.14. | ||
It has not been used by any function in :mod:`!shutil` since Python 3.4, | ||
and is now an alias of :exc:`RuntimeError`. | ||
|
||
* :mod:`symtable`: | ||
Deprecate :meth:`symtable.Class.get_methods` due to the lack of interest. | ||
(Contributed by Bénédikt Tran in :gh:`119698`.) | ||
|
||
* :mod:`shutil`: Deprecate :class:`!shutil.ExecError`, which hasn't | ||
been raised by any :mod:`!shutil` function since Python 3.4. It's | ||
now an alias for :exc:`RuntimeError`. | ||
* The :meth:`Class.get_methods <symtable.Class.get_methods>` method | ||
has been deprecated since Python 3.14. | ||
|
||
* :mod:`sys`: | ||
|
||
* The :func:`~sys._enablelegacywindowsfsencoding` function | ||
has been deprecated since Python 3.13. | ||
Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment variable instead. | ||
|
||
* :mod:`tarfile`: | ||
|
||
* The undocumented and unused :attr:`!TarFile.tarfile` attribute | ||
has been deprecated since Python 3.13. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.