Skip to content

Commit f0ca027

Browse files
authored
Merge branch 'main' into dataclasses-inline-unwrap
2 parents 436ffbc + e66bec0 commit f0ca027

423 files changed

Lines changed: 13187 additions & 3736 deletions

File tree

Some content is hidden

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

.claude/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../AGENTS.md

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ Lib/test/test_unittest/testmock/ @cjw296
630630
Doc/library/zlib.rst @StanFromIreland
631631
Lib/compression/zlib.py @StanFromIreland
632632
Lib/test/test_zlib.py @StanFromIreland
633-
Modules/_zlibmodule.c @StanFromIreland
633+
Modules/zlibmodule.c @StanFromIreland
634634

635635
# Zipfile.Path
636636
Lib/test/test_zipfile/_path/ @jaraco

.github/workflows/reusable-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ jobs:
8686
--fail-if-regression \
8787
--fail-if-improved \
8888
--fail-if-new-news-nit
89+
- name: 'Build list of changes'
90+
run: |
91+
make -C Doc/ PYTHON=../python changes
8992
- name: 'Collect HTML IDs'
9093
if: github.event_name == 'pull_request'
9194
run: python Doc/tools/check-html-ids.py collect Doc/build/html -o Doc/build/html-ids-head.json.gz

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,12 @@ Python/frozen_modules/MANIFEST
178178
/python
179179
!/Python/
180180

181-
# People's custom https://docs.anthropic.com/en/docs/claude-code/memory configs.
182-
/.claude/
181+
# Local AI agent scratch state (per-PR and per-branch notebooks, sandbox
182+
# experiments) and personal agent overrides, none of which are committed.
183+
/.claude/pr-*
184+
/.claude/branch-*
185+
/.claude/sandbox/
186+
AGENTS.local.md
183187
CLAUDE.local.md
184188

185189
#### main branch only stuff below this line, things to backport go above. ####

AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# AI agent guidance
2+
3+
CPython has a [policy on the use of AI tools](https://devguide.python.org/getting-started/ai-tools/).
4+
All use of AI tools and agents when working on or interacting with CPython
5+
must follow it.
6+
7+
> [!important]
8+
> **Primary directive**: Read the policy before making or proposing any changes.
9+
10+
When acting on this repository, apply the policy's core principles:
11+
12+
- Consider whether the change is necessary.
13+
- Make minimal, focused changes.
14+
- Follow existing coding style and patterns.
15+
- Write tests that exercise the change.
16+
- Keep backwards compatibility with prior releases in mind.
File renamed without changes.
File renamed without changes.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ are always available. They are listed here in alphabetical order.
129129
anext(async_iterator, default, /)
130130

131131
When awaited, return the next item from the given :term:`asynchronous
132-
iterator`, or *default* if given and the iterator is exhausted.
132+
iterator`, or *default* if given and the iterator is :term:`exhausted`.
133133

134134
This is the async variant of the :func:`next` builtin, and behaves
135135
similarly.
@@ -1223,7 +1223,7 @@ are always available. They are listed here in alphabetical order.
12231223
process_block(block)
12241224

12251225
*stop_exception* is useful for callables
1226-
which report exhaustion by raising an exception
1226+
which report :term:`exhaustion <exhausted>` by raising an exception
12271227
instead of returning a special value.
12281228
For example, draining a queue::
12291229

@@ -1315,7 +1315,7 @@ are always available. They are listed here in alphabetical order.
13151315
yielding the results. If additional *iterables* arguments are passed,
13161316
*function* must take that many arguments and is applied to the items from all
13171317
iterables in parallel. With multiple iterables, the iterator stops when the
1318-
shortest iterable is exhausted. If *strict* is ``True`` and one of the
1318+
shortest iterable is :term:`exhausted`. If *strict* is ``True`` and one of the
13191319
iterables is exhausted before the others, a :exc:`ValueError` is raised. For
13201320
cases where the function inputs are already arranged into argument tuples,
13211321
see :func:`itertools.starmap`.
@@ -1397,7 +1397,7 @@ are always available. They are listed here in alphabetical order.
13971397

13981398
Retrieve the next item from the :term:`iterator` by calling its
13991399
:meth:`~iterator.__next__` method. If *default* is given, it is returned
1400-
if the iterator is exhausted, otherwise :exc:`StopIteration` is raised.
1400+
if the iterator is :term:`exhausted`, otherwise :exc:`StopIteration` is raised.
14011401

14021402

14031403
.. class:: object()
@@ -2312,7 +2312,7 @@ are always available. They are listed here in alphabetical order.
23122312
the code that prepared these iterables. Python offers three different
23132313
approaches to dealing with this issue:
23142314

2315-
* By default, :func:`zip` stops when the shortest iterable is exhausted.
2315+
* By default, :func:`zip` stops when the shortest iterable is :term:`exhausted`.
23162316
It will ignore the remaining items in the longer iterables, cutting off
23172317
the result to the length of the shortest iterable::
23182318

@@ -2327,7 +2327,7 @@ are always available. They are listed here in alphabetical order.
23272327
[('a', 1), ('b', 2), ('c', 3)]
23282328

23292329
Unlike the default behavior, it raises a :exc:`ValueError` if one iterable
2330-
is exhausted before the others:
2330+
is :term:`exhausted` before the others:
23312331

23322332
>>> for item in zip(range(3), ['fee', 'fi', 'fo', 'fum'], strict=True): # doctest: +SKIP
23332333
... print(item)

Doc/builtins/index.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. _builtins-index:
2+
3+
##############################
4+
Python built-ins reference
5+
##############################
6+
7+
Python comes with a number of built-in functions and classes.
8+
9+
The built-in classes include data types that would normally be considered part
10+
of the "core" of a language, such as numbers and lists. For these types, the
11+
Python language core defines the form of literals and places some constraints
12+
on their semantics, but does not fully define the semantics.
13+
14+
The built-ins also include functions and exceptions --- objects that can
15+
be used by all Python code without the need of an :keyword:`import` statement.
16+
Some of these are defined by the core language, but many are not essential for
17+
the core semantics and are only described here.
18+
19+
.. seealso::
20+
21+
In addition to the built-ins, Python provides an extensive importable
22+
standard library, see :ref:`library-index`.
23+
24+
.. We don't use :numbered: option for the TOC below as it enforces
25+
numbered sections for the entire builtin docs. If desired,
26+
:numbered: can be enabled on a per-page basis.
27+
.. toctree::
28+
:maxdepth: 2
29+
30+
stdtypes.rst
31+
constants.rst
32+
functions.rst
33+
exceptions.rst
34+
threadsafety.rst
35+
time-complexity.rst
File renamed without changes.

0 commit comments

Comments
 (0)