Skip to content

Commit 2258f75

Browse files
Merge branch 'main' into codex/link-commit-signing
2 parents 8e0235f + 1d71f45 commit 2258f75

5 files changed

Lines changed: 75 additions & 11 deletions

File tree

‎getting-started/ai-tools.rst‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,18 @@ disrespectful of the maintainers time.
6262
It is not acceptable to alter or bypass existing tests, or remove desired
6363
functionality, in order to make a failing test pass. Such changes are not
6464
a real fix.
65+
66+
How these guidelines are applied
67+
================================
68+
69+
Using AI tools is not a reason on its own for an issue or PR to be labeled
70+
or closed. When a maintainer thinks an issue or PR does not follow these
71+
guidelines, they may apply one of the following labels. A bot then posts a
72+
comment that links to this page.
73+
74+
- :gh-label:`AI-needs-explanation`: the issue or PR stays open. Reply in your
75+
own words: explain what the change does or what the issue is about, and
76+
describe how you checked that it is correct.
77+
- :gh-label:`AI-guidelines-not-met`: the issue or PR is closed. If you think
78+
we misunderstood your contribution, reply on the issue or PR. You are
79+
welcome to explain your approach or ask questions about these guidelines.

‎testing/run-write-tests.rst‎

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,29 @@ Running and writing tests
1717
Running
1818
=======
1919

20-
The shortest, simplest way of running the test suite is the following command
21-
from the root directory of your checkout (after you have
22-
:ref:`built Python <compiling>`):
20+
The shortest, simplest way of running the test suite is the following command,
21+
which runs tests in parallel, from the root directory of your checkout
22+
(after you have :ref:`built Python <compiling>`):
2323

2424
.. tab:: Unix
2525

2626
.. code-block:: shell
2727
28-
./python -m test
28+
./python -m test -j0
2929
3030
.. tab:: macOS
3131

3232
.. code-block:: shell
3333
34-
./python.exe -m test
34+
./python.exe -m test -j0
3535
3636
This works on :ref:`most <mac-python.exe>` macOS systems.
3737

3838
.. tab:: Windows
3939

4040
.. code-block:: dosbatch
4141
42-
.\python.bat -m test
42+
.\python.bat -m test -j0
4343
4444
This will run the majority of tests, but exclude a small portion of them; these
4545
excluded tests use special kinds of resources: for example, accessing the
@@ -139,26 +139,31 @@ But, there are several important notes:
139139
In other words: if some module does not have ``unittest.main()``, then
140140
most likely it does not support direct invocation.
141141

142-
If you have a multi-core or multi-CPU machine, you can enable parallel testing
143-
using several Python processes so as to speed up things:
142+
By default, ``-j0`` runs tests in parallel using a number of worker processes
143+
based on the CPU count, which is much faster but can interleave output
144+
from different tests. To run tests sequentially, for example when debugging
145+
a failure, drop the ``-j`` flag:
144146

145147
.. tab:: Unix
146148

147149
.. code-block:: shell
148150
149-
./python -m test -j0
151+
./python -m test
150152
151153
.. tab:: macOS
152154

153155
.. code-block:: shell
154156
155-
./python.exe -m test -j0
157+
./python.exe -m test
156158
157159
.. tab:: Windows
158160

159161
.. code-block:: dosbatch
160162
161-
.\python.bat -m test -j0
163+
.\python.bat -m test
164+
165+
To limit how many tests run at once, pass an explicit number of
166+
worker processes instead, such as ``-j2``.
162167

163168
.. _strenuous_testing:
164169

‎triage/labels.rst‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ for a list of active branches.
116116
Other labels
117117
============
118118

119+
* Use :gh-label:`AI-guidelines-not-met` for a clearly low-effort
120+
AI-assisted submission where you think the author is unlikely to engage with
121+
feedback. The bot links to the :ref:`guidelines for using AI tools
122+
<ai-tools>` and closes the issue or PR. See the :ref:`triage team's guidance
123+
on applying the AI policy labels <triage-ai-labels>`.
124+
* Use :gh-label:`AI-needs-explanation` when you have concerns
125+
about AI-assisted work and think the author is likely to engage with feedback.
126+
The bot posts a reminder and leaves the issue or PR open. See the
127+
:ref:`triage team's guidance on applying the AI policy labels
128+
<triage-ai-labels>`.
119129
* :gh-label:`build`/:gh-label:`performance`: for issues related
120130
to the build process or performance, respectively.
121131
* :gh-label:`easy`: for issues that are considered easy.

‎triage/triage-team.rst‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,38 @@ the Python Software Foundation, always follow the `PSF Code of Conduct`_.
5656
.. _PSF Code of Conduct: https://policies.python.org/python.org/code-of-conduct/
5757

5858

59+
.. _triage-ai-labels:
60+
61+
Applying the AI policy labels
62+
=============================
63+
64+
Use the AI policy labels for issues and PRs that don't follow the
65+
:ref:`guidelines for using AI tools <ai-tools>`. Don't apply them only because
66+
AI tools were used, or because the author disclosed using them.
67+
68+
Apply only one of these labels to an issue or PR. If you add one when the
69+
other is already there, remove the other label.
70+
71+
* Start with :gh-label:`AI-needs-explanation`. The bot asks the author to
72+
explain the work in their own words and leaves the issue or PR open.
73+
* Use :gh-label:`AI-guidelines-not-met` only for clear cases, such as a
74+
low-effort submission where the author is unlikely to engage with feedback.
75+
The bot posts a comment and closes the issue or PR. If you have any doubt,
76+
use :gh-label:`AI-needs-explanation` instead, or consult a core developer.
77+
* If the author doesn't respond to :gh-label:`AI-needs-explanation`, or the
78+
response doesn't address the concern (for example, it is more generated
79+
text), remove :gh-label:`AI-needs-explanation` and add
80+
:gh-label:`AI-guidelines-not-met`. The bot posts the closing
81+
comment and closes the issue or PR. If you have any doubt, consult a core
82+
team member first.
83+
* If the author responds and the concern is resolved, remove the label.
84+
For a closed issue or PR, reopen it as well.
85+
86+
Prefer these labels over closing manually, so the author gets the same
87+
explanation each time and the issues and PRs can be found later by filtering
88+
on the label.
89+
90+
5991
Becoming a member of the Python triage team
6092
===========================================
6193

‎triage/triaging.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Checklist for triaging
2828
* If the issue is clearly invalid (unrelated to CPython, spam, and
2929
so on), you can use GitHub's :guilabel:`Close as not planned` option
3030
and apply the :gh-label:`invalid` label.
31+
* If the issue or PR doesn't follow the :ref:`guidelines for using AI tools
32+
<ai-tools>`, apply one of the :ref:`AI policy labels <triage-ai-labels>`.
3133

3234

3335
.. _triage-fields:

0 commit comments

Comments
 (0)