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

Commitd920f24

Browse files
authored
Merge branch 'python:main' into main
2 parents571bbc7 +030b452 commitd920f24

File tree

211 files changed

+3236
-952
lines changed

Some content is hidden

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

211 files changed

+3236
-952
lines changed

‎.github/CODEOWNERS

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Python/bytecodes.c @markshannon
4040
Python/optimizer*.c@markshannon
4141
Python/optimizer_analysis.c@Fidget-Spinner
4242
Python/optimizer_bytecodes.c@Fidget-Spinner
43+
Python/symtable.c@JelleZijlstra@carljm
4344
Lib/_pyrepl/*@pablogsal@lysnikolaou@ambv
4445
Lib/test/test_patma.py@brandtbucher
4546
Lib/test/test_type_*.py@JelleZijlstra
@@ -153,10 +154,10 @@ Include/internal/pycore_time.h @pganssle @abalkin
153154
/Tools/cases_generator/@markshannon
154155

155156
# AST
156-
Python/ast.c@isidentical
157-
Parser/asdl.py@isidentical
158-
Parser/asdl_c.py@isidentical
159-
Lib/ast.py@isidentical
157+
Python/ast.c@isidentical@JelleZijlstra
158+
Parser/asdl.py@isidentical@JelleZijlstra
159+
Parser/asdl_c.py@isidentical@JelleZijlstra
160+
Lib/ast.py@isidentical@JelleZijlstra
160161

161162
# Mock
162163
/Lib/unittest/mock.py@cjw296
@@ -173,6 +174,10 @@ Lib/ast.py @isidentical
173174
/Lib/test/test_subprocess.py@gpshead
174175
/Modules/*subprocess*@gpshead
175176

177+
# debugger
178+
**/*pdb*@gaogaotiantian
179+
**/*bdb*@gaogaotiantian
180+
176181
# Limited C API & stable ABI
177182
Tools/build/stable_abi.py@encukou
178183
Misc/stable_abi.toml@encukou
@@ -240,7 +245,7 @@ Doc/howto/clinic.rst @erlend-aasland
240245
**/*interpreteridobject.*@ericsnowcurrently
241246
**/*crossinterp*@ericsnowcurrently
242247
Lib/test/support/interpreters/@ericsnowcurrently
243-
Modules/_xx*interp*module.c@ericsnowcurrently
248+
Modules/_interp*module.c@ericsnowcurrently
244249
Lib/test/test_interpreters/@ericsnowcurrently
245250

246251
# Android

‎.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ jobs:
199199
uses:./.github/workflows/reusable-macos.yml
200200
with:
201201
config_hash:${{ needs.check_source.outputs.config_hash }}
202-
# Cirrus is M1, macos-13 is default GHA Intel
203-
os-matrix:'["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-13"]'
202+
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
203+
# Cirrus used for upstream, macos-14 for forks.
204+
os-matrix:'["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14", "macos-13"]'
204205

205206
build_macos_free_threading:
206207
name:'macOS (free-threading)'
@@ -210,8 +211,9 @@ jobs:
210211
with:
211212
config_hash:${{ needs.check_source.outputs.config_hash }}
212213
free-threading:true
213-
# Cirrus is M1
214-
os-matrix:'["ghcr.io/cirruslabs/macos-runner:sonoma"]'
214+
# Cirrus and macos-14 are M1.
215+
# Cirrus used for upstream, macos-14 for forks.
216+
os-matrix:'["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14"]'
215217

216218
build_ubuntu:
217219
name:'Ubuntu'

‎.github/workflows/reusable-macos.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414

1515
jobs:
1616
build_macos:
17-
name:'build and test'
17+
name:build and test (${{ matrix.os }})
1818
timeout-minutes:60
1919
env:
2020
HOMEBREW_NO_ANALYTICS:1
@@ -27,6 +27,13 @@ jobs:
2727
fail-fast:false
2828
matrix:
2929
os:${{fromJson(inputs.os-matrix)}}
30+
is-fork:
31+
-${{ github.repository_owner != 'python' }}
32+
exclude:
33+
-os:"ghcr.io/cirruslabs/macos-runner:sonoma"
34+
is-fork:true
35+
-os:"macos-14"
36+
is-fork:false
3037
runs-on:${{ matrix.os }}
3138
steps:
3239
-uses:actions/checkout@v4

‎Doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@
339339
html_context= {
340340
"is_deployment_preview":os.getenv("READTHEDOCS_VERSION_TYPE")=="external",
341341
"repository_url":repository_url.removesuffix(".git")ifrepository_urlelseNone,
342-
"pr_id":os.getenv("READTHEDOCS_VERSION")
342+
"pr_id":os.getenv("READTHEDOCS_VERSION"),
343+
"enable_analytics":os.getenv("PYTHON_DOCS_ENABLE_ANALYTICS"),
343344
}
344345

345346
# This 'Last updated on:' timestamp is inserted at the bottom of every page.

‎Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ Glossary
594594
therefore it is never deallocated.
595595

596596
Built-in strings and singletons are immortal objects. For example,
597-
:const:`True` and:const:`None` singletons areimmmortal.
597+
:const:`True` and:const:`None` singletons areimmortal.
598598

599599
See `PEP 683 – Immortal Objects, Using a Fixed Refcount
600600
<https://peps.python.org/pep-0683/>`_ for more information.

‎Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ Invocation from super
787787
---------------------
788788

789789
The logic for super's dotted lookup is in the:meth:`__getattribute__` method for
790-
object returned by:class:`super()`.
790+
object returned by:func:`super`.
791791

792792
A dotted lookup such as ``super(A, obj).m`` searches ``obj.__class__.__mro__``
793793
for the base class ``B`` immediately following ``A`` and then returns

‎Doc/library/collections.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ The class can be used to simulate nested scopes and is useful in templating.
9999
:func:`super` function. A reference to ``d.parents`` is equivalent to:
100100
``ChainMap(*d.maps[1:])``.
101101

102-
Note, the iteration order of a:class:`ChainMap()` is determined by
102+
Note, the iteration order of a:class:`ChainMap` is determined by
103103
scanning the mappings last to first::
104104

105105
>>> baseline = {'music': 'bach', 'art': 'rembrandt'}

‎Doc/library/datetime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2153,7 +2153,7 @@ There is one more :class:`tzinfo` method that a subclass may wish to override:
21532153

21542154
..method::tzinfo.fromutc(dt)
21552155

2156-
This is called from the default:class:`datetime.astimezone()`
2156+
This is called from the default:meth:`datetime.astimezone`
21572157
implementation. When called from that, ``dt.tzinfo`` is *self*, and *dt*'s
21582158
date and time data are to be viewed as expressing a UTC time. The purpose
21592159
of:meth:`fromutc` is to adjust the date and time data, returning an

‎Doc/library/decimal.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,48 @@ Decimal objects
897897
:const:`Rounded`. If given, applies *rounding*; otherwise, uses the
898898
rounding method in either the supplied *context* or the current context.
899899

900+
Decimal numbers can be rounded using the:func:`.round` function:
901+
902+
..describe::round(number)
903+
..describe::round(number, ndigits)
904+
905+
If *ndigits* is not given or ``None``,
906+
returns the nearest:class:`int` to *number*,
907+
rounding ties to even, and ignoring the rounding mode of the
908+
:class:`Decimal` context. Raises:exc:`OverflowError` if *number* is an
909+
infinity or:exc:`ValueError` if it is a (quiet or signaling) NaN.
910+
911+
If *ndigits* is an:class:`int`, the context's rounding mode is respected
912+
and a:class:`Decimal` representing *number* rounded to the nearest
913+
multiple of ``Decimal('1E-ndigits')`` is returned; in this case,
914+
``round(number, ndigits)`` is equivalent to
915+
``self.quantize(Decimal('1E-ndigits'))``. Returns ``Decimal('NaN')`` if
916+
*number* is a quiet NaN. Raises:class:`InvalidOperation` if *number*
917+
is an infinity, a signaling NaN, or if the length of the coefficient after
918+
the quantize operation would be greater than the current context's
919+
precision. In other words, for the non-corner cases:
920+
921+
* if *ndigits* is positive, return *number* rounded to *ndigits* decimal
922+
places;
923+
* if *ndigits* is zero, return *number* rounded to the nearest integer;
924+
* if *ndigits* is negative, return *number* rounded to the nearest
925+
multiple of ``10**abs(ndigits)``.
926+
927+
For example::
928+
929+
>>> from decimal import Decimal, getcontext, ROUND_DOWN
930+
>>> getcontext().rounding = ROUND_DOWN
931+
>>> round(Decimal('3.75')) # context rounding ignored
932+
4
933+
>>> round(Decimal('3.5')) # round-ties-to-even
934+
4
935+
>>> round(Decimal('3.75'), 0) # uses the context rounding
936+
Decimal('3')
937+
>>> round(Decimal('3.75'), 1)
938+
Decimal('3.7')
939+
>>> round(Decimal('3.75'), -1)
940+
Decimal('0E+1')
941+
900942

901943
.. _logical_operands_label:
902944

‎Doc/library/dis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,7 @@ iterations of the loop.
16671667

16681668
A no-op. Performs internal tracing, debugging and optimization checks.
16691669

1670-
The ``context``oparand consists of two parts. The lowest two bits
1670+
The ``context``operand consists of two parts. The lowest two bits
16711671
indicate where the ``RESUME`` occurs:
16721672

16731673
* ``0`` The start of a function, which is neither a generator, coroutine

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp