Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit47f3d81

Browse files
authored
Merge branch 'main' into fix-issue-129069
2 parents0f96d58 +71009cb commit47f3d81

File tree

241 files changed

+11983
-1372
lines changed

Some content is hidden

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

241 files changed

+11983
-1372
lines changed

‎.github/workflows/tail-call.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
-aarch64-unknown-linux-gnu/gcc
4646
-free-threading
4747
llvm:
48-
-19
48+
-20
4949
include:
5050
# - target: i686-pc-windows-msvc/msvc
5151
# architecture: Win32
@@ -83,9 +83,9 @@ jobs:
8383
if:runner.os == 'Windows' && matrix.architecture != 'ARM64'
8484
shell:cmd
8585
run:|
86-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.5
86+
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
8787
set PlatformToolset=clangcl
88-
set LLVMToolsVersion=${{ matrix.llvm }}.1.5
88+
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
8989
set LLVMInstallDir=C:\Program Files\LLVM
9090
call ./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }}
9191
call ./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
@@ -95,26 +95,28 @@ jobs:
9595
if:runner.os == 'Windows' && matrix.architecture == 'ARM64'
9696
shell:cmd
9797
run:|
98-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.5
98+
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
9999
set PlatformToolset=clangcl
100-
set LLVMToolsVersion=${{ matrix.llvm }}.1.5
100+
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
101101
set LLVMInstallDir=C:\Program Files\LLVM
102102
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
103103
104104
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
105105
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
106106
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
107107
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
108+
# Note: when a new LLVM is released, the homebrew installation directory changes, so the builds will fail.
109+
# We either need to upgrade LLVM or change the directory being pointed to.
108110
-name:Native macOS (release)
109111
if:runner.os == 'macOS'
110112
run:|
111113
brew update
112114
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
113115
brew install llvm@${{ matrix.llvm }}
114116
export SDKROOT="$(xcrun --show-sdk-path)"
115-
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
116-
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
117-
CC=clang-19 ./configure --with-tail-call-interp
117+
export PATH="/usr/local/opt/llvm/bin:$PATH"
118+
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
119+
CC=clang-20 ./configure --with-tail-call-interp
118120
make all --jobs 4
119121
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
120122
@@ -123,7 +125,7 @@ jobs:
123125
run:|
124126
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
125127
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
126-
CC=clang-19 ./configure --with-tail-call-interp --with-pydebug
128+
CC=clang-20 ./configure --with-tail-call-interp --with-pydebug
127129
make all --jobs 4
128130
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
129131
@@ -132,7 +134,7 @@ jobs:
132134
run:|
133135
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
134136
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
135-
CC=clang-19 ./configure --with-tail-call-interp --disable-gil
137+
CC=clang-20 ./configure --with-tail-call-interp --disable-gil
136138
make all --jobs 4
137139
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
138140

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ tags
3838
TAGS
3939
.vs/
4040
.vscode/
41+
.cache/
4142
gmon.out
4243
.coverage
4344
.mypy_cache/

‎Doc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ dist-html:
204204
find dist -name'python-$(DISTVERSION)-docs-html*' -exec rm -rf {}\;
205205
$(MAKE) html
206206
cp -pPR build/html dist/python-$(DISTVERSION)-docs-html
207+
rm -rf dist/python-$(DISTVERSION)-docs-html/_images/social_previews/
207208
tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar python-$(DISTVERSION)-docs-html
208209
bzip2 -9 -k dist/python-$(DISTVERSION)-docs-html.tar
209210
(cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-html.zip python-$(DISTVERSION)-docs-html)

‎Doc/c-api/arg.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,26 @@ Other objects
357357

358358
..versionadded::3.3
359359

360-
``(items)`` (:class:`tuple`) [*matching-items*]
361-
The object must be a Python sequence whose length is the number of format units
360+
``(items)`` (sequence) [*matching-items*]
361+
The object must be a Python sequence (except:class:`str`,:class:`bytes`
362+
or:class:`bytearray`) whose length is the number of format units
362363
in *items*. The C arguments must correspond to the individual format units in
363364
*items*. Format units for sequences may be nested.
364365

366+
If *items* contains format units which store a:ref:`borrowed buffer
367+
<c-arg-borrowed-buffer>` (``s``, ``s#``, ``z``, ``z#``, ``y``, or ``y#``)
368+
or a:term:`borrowed reference` (``S``, ``Y``, ``U``, ``O``, or ``O!``),
369+
the object must be a Python tuple.
370+
The *converter* for the ``O&`` format unit in *items* must not store
371+
a borrowed buffer or a borrowed reference.
372+
373+
..versionchanged::next
374+
:class:`str` and:class:`bytearray` objects no longer accepted as a sequence.
375+
376+
..deprecated::next
377+
Non-tuple sequences are deprecated if *items* contains format units
378+
which store a borrowed buffer or a borrowed reference.
379+
365380
A few other characters have a meaning in a format string. These may not occur
366381
inside nested parentheses. They are:
367382

‎Doc/c-api/monitoring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,6 @@ would typically correspond to a python function.
205205
206206
.. versionadded:: 3.13
207207
208-
.. deprecated::next
208+
.. deprecated::3.14
209209
210210
This function is :term:`soft deprecated`.

‎Doc/conf.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,19 @@
624624
# Options for sphinxext-opengraph
625625
# -------------------------------
626626

627-
ogp_site_url='https://docs.python.org/3/'
627+
ogp_canonical_url='https://docs.python.org/3/'
628628
ogp_site_name='Python documentation'
629-
ogp_image='_static/og-image.png'
629+
ogp_social_cards= {# Used when matplotlib is installed
630+
'image':'_static/og-image.png',
631+
'line_color':'#3776ab',
632+
}
630633
ogp_custom_meta_tags= [
631-
'<meta property="og:image:width" content="200" />',
632-
'<meta property="og:image:height" content="200" />',
633-
'<meta name="theme-color" content="#3776ab" />',
634+
'<meta name="theme-color" content="#3776ab">',
634635
]
636+
if'create-social-cards'notintags:# noqa: F821
637+
# Define a static preview image when not creating social cards
638+
ogp_image='_static/og-image.png'
639+
ogp_custom_meta_tags+= [
640+
'<meta property="og:image:width" content="200">',
641+
'<meta property="og:image:height" content="200">',
642+
]

‎Doc/faq/programming.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,15 +1868,15 @@ object identity is assured. Generally, there are three circumstances where
18681868
identity is guaranteed:
18691869

18701870
1) Assignments create new names but do not change object identity. After the
1871-
assignment ``new = old``, it is guaranteed that ``new is old``.
1871+
assignment ``new = old``, it is guaranteed that ``new is old``.
18721872

18731873
2) Putting an object in a container that stores object references does not
1874-
change object identity. After the list assignment ``s[0] = x``, it is
1875-
guaranteed that ``s[0] is x``.
1874+
change object identity. After the list assignment ``s[0] = x``, it is
1875+
guaranteed that ``s[0] is x``.
18761876

18771877
3) If an object is a singleton, it means that only one instance of that object
1878-
can exist. After the assignments ``a = None`` and ``b = None``, it is
1879-
guaranteed that ``a is b`` because ``None`` is a singleton.
1878+
can exist. After the assignments ``a = None`` and ``b = None``, it is
1879+
guaranteed that ``a is b`` because ``None`` is a singleton.
18801880

18811881
In most other circumstances, identity tests are inadvisable and equality tests
18821882
are preferred. In particular, identity tests should not be used to check

‎Doc/includes/email-alternative.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
recette
3737
</a> sera sûrement un très bon repas.
3838
</p>
39-
<img src="cid:{asparagus_cid}" />
39+
<img src="cid:{asparagus_cid}">
4040
</body>
4141
</html>
4242
""".format(asparagus_cid=asparagus_cid[1:-1]),subtype='html')

‎Doc/library/annotationlib.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,6 @@ Classes
204204
means may not have any information about their scope, so passing
205205
arguments to this method may be necessary to evaluate them successfully.
206206

207-
..important::
208-
209-
Once a:class:`~ForwardRef` instance has been evaluated, it caches
210-
the evaluated value, and future calls to:meth:`evaluate` will return
211-
the cached value, regardless of the parameters passed in.
212-
213207
..versionadded::3.14
214208

215209

‎Doc/library/cmath.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,57 @@ the function is then applied to the result of the conversion.
3838
1.4142135623730951j
3939

4040

41+
==================================================== ============================================
42+
**Conversions to and from polar coordinates**
43+
--------------------------------------------------------------------------------------------------
44+
:func:`phase(z) <phase>` Return the phase of *z*
45+
:func:`polar(z) <polar>` Return the representation of *z* in polar coordinates
46+
:func:`rect(r, phi) <rect>` Return the complex number *z* with polar coordinates *r* and *phi*
47+
48+
**Power and logarithmic functions**
49+
--------------------------------------------------------------------------------------------------
50+
:func:`exp(z) <exp>` Return *e* raised to the power *z*
51+
:func:`log(z[, base]) <log>` Return the logarithm of *z* to the given *base* (*e* by default)
52+
:func:`log10(z) <log10>` Return the base-10 logarithm of *z*
53+
:func:`sqrt(z) <sqrt>` Return the square root of *z*
54+
55+
**Trigonometric functions**
56+
--------------------------------------------------------------------------------------------------
57+
:func:`acos(z) <acos>` Return the arc cosine of *z*
58+
:func:`asin(z) <asin>` Return the arc sine of *z*
59+
:func:`atan(z) <atan>` Return the arc tangent of *z*
60+
:func:`cos(z) <cos>` Return the cosine of *z*
61+
:func:`sin(z) <sin>` Return the sine of *z*
62+
:func:`tan(z) <tan>` Return the tangent of *z*
63+
64+
**Hyperbolic functions**
65+
--------------------------------------------------------------------------------------------------
66+
:func:`acosh(z) <acosh>` Return the inverse hyperbolic cosine of *z*
67+
:func:`asinh(z) <asinh>` Return the inverse hyperbolic sine of *z*
68+
:func:`atanh(z) <atanh>` Return the inverse hyperbolic tangent of *z*
69+
:func:`cosh(z) <cosh>` Return the hyperbolic cosine of *z*
70+
:func:`sinh(z) <sinh>` Return the hyperbolic sine of *z*
71+
:func:`tanh(z) <tanh>` Return the hyperbolic tangent of *z*
72+
73+
**Classification functions**
74+
--------------------------------------------------------------------------------------------------
75+
:func:`isfinite(z) <isfinite>` Check if all components of *z* are finite
76+
:func:`isinf(z) <isinf>` Check if any component of *z* is infinite
77+
:func:`isnan(z) <isnan>` Check if any component of *z* is a NaN
78+
:func:`isclose(a, b, *, rel_tol, abs_tol) <isclose>` Check if the values *a* and *b* are close to each other
79+
80+
**Constants**
81+
--------------------------------------------------------------------------------------------------
82+
:data:`pi` *π* = 3.141592...
83+
:data:`e` *e* = 2.718281...
84+
:data:`tau` *τ* = 2\*π* = 6.283185...
85+
:data:`inf` Positive infinity
86+
:data:`infj` Pure imaginary infinity
87+
:data:`nan` "Not a number" (NaN)
88+
:data:`nanj` Pure imaginary NaN
89+
==================================================== ============================================
90+
91+
4192
Conversions to and from polar coordinates
4293
-----------------------------------------
4394

‎Doc/library/concurrent.futures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ the bytes over a shared :mod:`socket <socket>` or
298298

299299
The optional *initializer* and *initargs* arguments have the same
300300
meaning as for:class:`!ThreadPoolExecutor`: the initializer is run
301-
when each worker is created, though in this case it is run.in
301+
when each worker is created, though in this case it is runin
302302
the worker's interpreter. The executor serializes the *initializer*
303303
and *initargs* using:mod:`pickle` when sending them to the worker's
304304
interpreter.

‎Doc/library/ctypes.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,9 @@ These are the fundamental ctypes data types:
26322632
Represents the C:c:expr:`PyObject *` datatype. Calling this without an
26332633
argument creates a ``NULL``:c:expr:`PyObject *` pointer.
26342634

2635+
..versionchanged::3.14
2636+
:class:`!py_object` is now a:term:`generic type`.
2637+
26352638
The:mod:`!ctypes.wintypes` module provides quite some other Windows specific
26362639
data types, for example:c:type:`!HWND`,:c:type:`!WPARAM`, or:c:type:`!DWORD`.
26372640
Some useful structures like:c:type:`!MSG` or:c:type:`!RECT` are also defined.
@@ -2843,7 +2846,7 @@ fields, or any other data types containing pointer type fields.
28432846
:class:`!CField` objects are created via:attr:`~Structure._fields_`;
28442847
do not instantiate the class directly.
28452848

2846-
..versionadded::next
2849+
..versionadded::3.14
28472850

28482851
Previously, descriptors only had ``offset`` and ``size`` attributes
28492852
and a readable string representation; the:class:`!CField` class was not

‎Doc/library/dataclasses.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Module contents
164164

165165
- *match_args*: If true (the default is ``True``), the
166166
:attr:`~object.__match_args__` tuple will be created from the list of
167-
parameters to the generated:meth:`~object.__init__` method (even if
167+
non keyword-onlyparameters to the generated:meth:`~object.__init__` method (even if
168168
:meth:`!__init__` is not generated, see above). If false, or if
169169
:attr:`!__match_args__` is already defined in the class, then
170170
:attr:`!__match_args__` will not be generated.
@@ -175,11 +175,12 @@ Module contents
175175
fields will be marked as keyword-only. If a field is marked as
176176
keyword-only, then the only effect is that the:meth:`~object.__init__`
177177
parameter generated from a keyword-only field must be specified
178-
with a keyword when:meth:`!__init__` is called. There is no
179-
effect on any other aspect of dataclasses. See the
180-
:term:`parameter` glossary entry for details. Also see the
178+
with a keyword when:meth:`!__init__` is called. See the:term:`parameter`
179+
glossary entry for details. Also see the
181180
:const:`KW_ONLY` section.
182181

182+
Keyword-only fields are not included in:attr:`!__match_args__`.
183+
183184
..versionadded::3.10
184185

185186
- *slots*: If true (the default is ``False``),:attr:`~object.__slots__` attribute
@@ -299,6 +300,8 @@ Module contents
299300
This is used when the generated:meth:`~object.__init__` method's
300301
parameters are computed.
301302

303+
Keyword-only fields are also not included in:attr:`!__match_args__`.
304+
302305
..versionadded::3.10
303306

304307
- ``doc``: optional docstring for this field.

‎Doc/library/fnmatch.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@ functions: :func:`fnmatch`, :func:`fnmatchcase`, :func:`.filter`.
9090
but implemented more efficiently.
9191

9292

93+
..function::filterfalse(names, pat)
94+
95+
Construct a list from those elements of the:term:`iterable` of filename
96+
strings *names* that do not match the pattern string *pat*.
97+
It is the same as ``[n for n in names if not fnmatch(n, pat)]``,
98+
but implemented more efficiently.
99+
100+
..versionadded::3.14
101+
102+
93103
..function::translate(pat)
94104

95105
Return the shell-style pattern *pat* converted to a regular expression for

‎Doc/library/graphlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
A:exc:`ValueError` will be raised if the sort has been started by
110110
:meth:`~.static_order` or:meth:`~.get_ready`.
111111

112-
..versionchanged::next
112+
..versionchanged::3.14
113113

114114
``prepare()`` can now be called more than once as long as the sort has
115115
not started. Previously this raised:exc:`ValueError`.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp