8000 Merge branch 'main' into speedup-posixpath.abspath · python/cpython@6bac80e · GitHub
[go: up one dir, main page]

Skip to content

Commit 6bac80e

Browse files
authored
Merge branch 'main' into speedup-posixpath.abspath
2 parents bbbba83 + 72dae53 commit 6bac80e

File tree

109 files changed

+2150
-667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2150
-667
lines changed

.github/workflows/jit.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- true
4242
- false
4343
llvm:
44-
- 16
44+
- 18
4545
include:
4646
- target: i686-pc-windows-msvc/msvc
4747
architecture: Win32
@@ -94,6 +94,7 @@ jobs:
9494
- name: Native Windows
9595
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
9696
run: |
97+
choco upgrade llvm -y
9798
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
9899
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
99100
./PCbuild/rt.bat ${{ matrix.debug && '-d' }} -p ${{ matrix.architecture }} -q --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 4500 --verbose2 --verbose3
@@ -102,27 +103,31 @@ jobs:
102103
- name: Emulated Windows
103104
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
104105
run: |
106+
choco upgrade llvm -y
105107
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
106108
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
107109
108110
- name: Native macOS
109111
if: runner.os == 'macOS'
110112
run: |
113+
brew update
111114
brew install llvm@${{ matrix.llvm }}
112115
SDKROOT="$(xcrun --show-sdk-path)" \
113116
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
114117
make all --jobs 4
115118
./python.exe -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 4500 --verbose2 --verbose3
116119
120+
# --with-lto has been removed temporarily as a result of an open issue in LLVM 18 (see https://github.com/llvm/llvm-project/issues/87553)
117121
- name: Native Linux
118122
if: runner.os == 'Linux' && matrix.architecture == 'x86_64'
119123
run: |
120124
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
121125
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
122-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
126+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations' }}
123127
make all --jobs 4
124128
./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 4500 --verbose2 --verbose3
125129
130+
# --with-lto has been removed temporarily as a result of an open issue in LLVM 18 (see https://github.com/llvm/llvm-project/issues/87553)
126131
- name: Emulated Linux
127132
if: runner.os == 'Linux' && matrix.architecture != 'x86_64'
128133
run: |
@@ -139,6 +144,6 @@ jobs:
139144
CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
140145
CPP="$CC --preprocess" \
141146
HOSTRUNNER=qemu-${{ matrix.architecture }} \
142-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
147+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations ' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
143148
make all --jobs 4
144149
./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 4500 --verbose2 --verbose3

Doc/c-api/exceptions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Printing and clearing
104104
Similar to :c:func:`PyErr_WriteUnraisable`, but the *format* and subsequent
105105
parameters help format the warning message; they have the same meaning and
106106
values as in :c:func:`PyUnicode_FromFormat`.
107-
``PyErr_WriteUnraisable(obj)`` is roughtly equivalent to
107+
``PyErr_WriteUnraisable(obj)`` is roughly equivalent to
108108
``PyErr_FormatUnraisable("Exception ignored in: %R", obj)``.
109109
If *format* is ``NULL``, only the traceback is printed.
110110

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
13811381
Py_VISIT(Py_TYPE(self));
13821382

13831383
It is only needed since Python 3.9. To support Python 3.8 and older, this
1384-
line must be conditionnal::
1384+
line must be conditional::
13851385

13861386
#if PY_VERSION_HEX >= 0x03090000
13871387
Py_VISIT(Py_TYPE(self));

Doc/howto/timerfd.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ descriptors to wait until the file descriptor is ready for reading:
108108
# In 1.5 seconds, 1st timer, 2nd timer and 3rd timer fires at once.
109109
#
110110
# If a timer file descriptor is signaled more than once since
111-
# the last os.read() call, os.read() returns the nubmer of signaled
111+
# the last os.read() call, os.read() returns the number of signaled
112112
# as host order of class bytes.
113113
print(f"Signaled events={events}")
114114
for fd, event in events:

Doc/library/bdb.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ The :mod:`bdb` module also defines two classes:
240240
Called from :meth:`dispatch_call` if a break might stop inside the
241241
called function.
242242

243+
*argument_list* is not used anymore and will always be ``None``.
244+
The argument is kept for backwards compatibility.
245+
243246
.. method:: user_line(frame)
244247

245248
Called from :meth:`dispatch_line` when either :meth:`stop_here` or

Doc/library/datetime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ day, and subject to adjustment via a :class:`tzinfo` object.
17351735
* ``fold in [0, 1]``.
17361736

17371737
If an argument outside those ranges is given, :exc:`ValueError` is raised. All
1738-
default to 0 except *tzinfo*, which defaults to :const:`None`.
1738+
default to 0 except *tzinfo*, which defaults to ``None``.
17391739

17401740
Class attributes:
17411741

Doc/library/faulthandler.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010

1111
This module contains functions to dump Python tracebacks explicitly, on a fault,
1212
after a timeout, or on a user signal. Call :func:`faulthandler.enable` to
13-
install fault handlers for the :const:`SIGSEGV`, :const:`SIGFPE`,
14-
:const:`SIGABRT`, :const:`SIGBUS`, and :const:`SIGILL` signals. You can also
13+
install fault handlers for the :const:`~signal.SIGSEGV`,
14+
:const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`, and
15+
:const:`~signal.SIGILL` signals. You can also
1516
enable them at startup by setting the :envvar:`PYTHONFAULTHANDLER` environment
1617
variable or by using the :option:`-X` ``faulthandler`` command line option.
1718

1819
The fault handler is compatible with system fault handlers like Apport or the
1920
Windows fault handler. The module uses an alternative stack for signal handlers
20-
if the :c:func:`sigaltstack` function is available. This allows it to dump the
21+
if the :c:func:`!sigaltstack` function is available. This allows it to dump the
2122
traceback even on a stack overflow.
2223

2324
The fault handler is called on catastrophic cases and therefore can only use
@@ -70,8 +71,9 @@ Fault handler state
7071

7172
.. function:: enable(file=sys.stderr, all_threads=True)
7273

73-
Enable the fault handler: install handlers for the :const:`SIGSEGV`,
74-
:const:`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS` and :const:`SIGILL`
74+
Enable the fault handler: install handlers for the :const:`~signal.SIGSEGV`,
75+
:const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`
76+
and :const:`~signal.SIGILL`
7577
signals to dump the Python traceback. If *all_threads* is ``True``,
7678
produce tracebacks for every running thread. Otherwise, dump only the current
7779
thread.
@@ -106,8 +108,8 @@ Dumping the tracebacks after a timeout
106108

107109
Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or
108110
every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, call
109-
:c:func:`_exit` with status=1 after dumping the tracebacks. (Note
110-
:c:func:`_exit` exits the process immediately, which means it doesn't do any
111+
:c:func:`!_exit` with status=1 after dumping the tracebacks. (Note
112+
:c:func:`!_exit` exits the process immediately, which means it doesn't do any
111113
cleanup like flushing file buffers.) If the function is called twice, the new
112114
call replaces previous parameters and resets the timeout. The timer has a
113115
sub-second resolution.

Doc/library/random.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ from sources provided by the operating system.
5959
random number generator with a long period and comparatively simple update
6060
operations.
6161

62+
.. note::
63+
The global random number generator and instances of :class:`Random` are thread-safe.
64+
However, in the free-threaded build, concurrent calls to the global generator or
65+
to the same instance of :class:`Random` may encounter contention and poor performance.
66+
Consider using separate instances of :class:`Random` per thread instead.
67+
6268

6369
Bookkeeping functions
6470
---------------------

Doc/library/subprocess.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,22 @@ The :mod:`subprocess` module exposes the following constants.
10661066
Specifies that the :attr:`STARTUPINFO.wShowWindow` attribute contains
10671067
additional information.
10681068

1069+
.. data:: STARTF_FORCEONFEEDBACK
1070+
1071+
A :attr:`STARTUPINFO.dwFlags` parameter to specify that the
1072+
*Working in Background* mouse cursor will be displayed while a
1073+
process is launching. This is the default behavior for GUI
1074+
processes.
1075+
1076+
.. versionadded:: 3.13
1077+
1078+
.. data:: STARTF_FORCEOFFFEEDBACK
1079+
1080+
A :attr:`STARTUPINFO.dwFlags` parameter to specify that the mouse
1081+
cursor will not be changed when launching a process.
1082+
1083+
.. versionadded:: 3.13
1084+
10691085
.. data:: CREATE_NEW_CONSOLE
10701086

10711087
The new process has a new console, instead of inheriting its parent's

Doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Sphinx version is pinned so that new versions that introduce new warnings
77
# won't suddenly cause build failures. Updating the version is fine as long
88
# as no warnings are raised by doing so.
9-
sphinx~=7.2.0
9+
sphinx~=7.3.0
1010

1111
blurb
1212

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Doc/library/email.errors.rst
2828
Doc/library/email.parser.rst
2929
Doc/library/email.policy.rst
3030
Doc/library/exceptions.rst
31-
Doc/library/faulthandler.rst
3231
Doc/library/functools.rst
3332
Doc/library/http.cookiejar.rst
3433
Doc/library/http.server.rst

Doc/using/configure.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,17 @@ Options for third-party dependencies
389389
C compiler and linker flags for ``libffi``, used by :mod:`ctypes` module,
390390
overriding ``pkg-config``.
391391

392+
.. option:: LIBMPDEC_CFLAGS
393+
.. option:: LIBMPDEC_LIBS
394+
395+
C compiler and linker flags for ``libmpdec``, used by :mod:`decimal` module,
396+
overriding ``pkg-config``.
397+
398+
.. note::
399+
400+
These environment variables have no effect unless
401+
:option:`--with-system-libmpdec` is specified.
402+
392403
.. option:: LIBLZMA_CFLAGS
393404
.. option:: LIBLZMA_LIBS
394405

@@ -798,6 +809,8 @@ Libraries options
798809

799810
.. versionadded:: 3.3
800811

812+
.. seealso:: :option:`LIBMPDEC_CFLAGS` and :option:`LIBMPDEC_LIBS`.
813+
801814
.. option:: --with-readline=readline|editline
802815

803816
Designate a backend library for the :mod:`readline` module.

0 commit comments

Comments
 (0)
0