← Back to Pull requests

gh-1815: Clarify when to open issues and pull requests #1957

Open
picnixz opened this pull request with 125 lines diff across 4 files
View on GitHub
picnixz picnixz commented on Oct 31, 2026 17:59 UTC
Author

First draft of issue/PR choregraphy while staying a bit vague. I used Opus 5.5 for the text and reading the existing parts of the devguide and to polish the tone in a more... diplomatic way I would have said.

Once reviews start, I'm going to make the changes manually (likely).

Diff: 125 lines (+116 / -9) across 4 files Reviewer: willingc Review duration: 46066m
All Vouch review confidence checks passed
Residual risk 0.05 = Change Risk (0.43) × (1 − Review Confidence (0.88)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 125 lines diff across 4 files
0.43
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.88 · 5 substantive comment(s)
0.88
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
88%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.289
Real PR Conversation Timeline
15 items
willingc willingc approved these changes on Oct 31, 2026 22:57 UTC
Approved Reviewer

@picnixz I think you have done a nice job adding more clarity for contributors. Thanks!

picnixz picnixz commented on Nov 01, 2026 11:45 UTC
Author

Thanks for the feedback. I find the rythme of some parts of the text a bit to LLM-isque but if native speakers think it's fine, I'm going to keep it as is.

hugovk hugovk commented on code on Nov 01, 2026 13:44 UTC
Code Review
getting-started/pull-request-lifecycle.rst:1
@@ -20,6 +20,41 @@ For a cheat-sheet reference, see the
 :ref:`quick reference on creating pull requests <pullrequest-quickguide>`.
 
 
+.. _pullrequest-prerequisites:
+
+Before writing code
+===================
+
+Most changes start with an issue, and the pull request usually comes once
+the issue has been acknowledged (see :ref:`fixing-issues-readiness`),
+although an issue does not always need one (see
+:ref:`fixing-issues-no-pullrequest`). Small features can be proposed
+directly in an issue, but features that break existing APIs and larger
+changes, such as changes to protocols or built-ins, usually need a
+discussion in the `Ideas category on Discourse`_ first (see
+:ref:`langchanges` and :ref:`stdlibchanges`).
+
+Performance improvements should always be proposed in an issue first,
+ideally without a pull request, since they need to be discussed unless the
+gain is clear. Keep any proof of concept on a branch of your fork instead
+of opening a pull request for it. We strongly recommend including the
+benchmark results in the issue, together with the benchmark script and the
+configuration used. Run the benchmarks with :pypi:`pyperf` rather than
+with plain :mod:`timeit`. Optimizing a cold path, or a rare case at the

Is there room for nuance here?

Are there any cases where timeit is suitable and a full, time-consuming, pyperf run is not needed?

Likewise, can -X importtime be enough for improving import time?

hugovk hugovk commented on code on Nov 01, 2026 13:45 UTC
Code Review
getting-started/pull-request-lifecycle.rst:1
@@ -20,6 +20,41 @@ For a cheat-sheet reference, see the
 :ref:`quick reference on creating pull requests <pullrequest-quickguide>`.
 
 
+.. _pullrequest-prerequisites:
+
+Before writing code
+===================
+
+Most changes start with an issue, and the pull request usually comes once
+the issue has been acknowledged (see :ref:`fixing-issues-readiness`),
+although an issue does not always need one (see
+:ref:`fixing-issues-no-pullrequest`). Small features can be proposed
+directly in an issue, but features that break existing APIs and larger
+changes, such as changes to protocols or built-ins, usually need a
+discussion in the `Ideas category on Discourse`_ first (see
+:ref:`langchanges` and :ref:`stdlibchanges`).
+
+Performance improvements should always be proposed in an issue first,
+ideally without a pull request, since they need to be discussed unless the
+gain is clear. Keep any proof of concept on a branch of your fork instead
+of opening a pull request for it. We strongly recommend including the
+benchmark results in the issue, together with the benchmark script and the
+configuration used. Run the benchmarks with :pypi:`pyperf` rather than
+with plain :mod:`timeit`. Optimizing a cold path, or a rare case at the
+cost of increased complexity, is usually not worth it, so base the case for
+the change on realistic usage.
+
+Trivial documentation changes, such as typo fixes, and pull requests that
+only increase test coverage usually need neither an issue nor a NEWS
+entry. When fixing typos, fix all of them in the page or in the

I think this is duplicating existing instructions on this page?

hugovk hugovk commented on code on Nov 01, 2026 13:47 UTC
Code Review
getting-started/pull-request-lifecycle.rst:1
@@ -20,6 +20,41 @@ For a cheat-sheet reference, see the
 :ref:`quick reference on creating pull requests <pullrequest-quickguide>`.
 
 
+.. _pullrequest-prerequisites:
+
+Before writing code
+===================
+
+Most changes start with an issue, and the pull request usually comes once
+the issue has been acknowledged (see :ref:`fixing-issues-readiness`),
+although an issue does not always need one (see
+:ref:`fixing-issues-no-pullrequest`). Small features can be proposed
+directly in an issue, but features that break existing APIs and larger
+changes, such as changes to protocols or built-ins, usually need a
+discussion in the `Ideas category on Discourse`_ first (see
+:ref:`langchanges` and :ref:`stdlibchanges`).
+
+Performance improvements should always be proposed in an issue first,
+ideally without a pull request, since they need to be discussed unless the
+gain is clear. Keep any proof of concept on a branch of your fork instead
+of opening a pull request for it. We strongly recommend including the
+benchmark results in the issue, together with the benchmark script and the
+configuration used. Run the benchmarks with :pypi:`pyperf` rather than
+with plain :mod:`timeit`. Optimizing a cold path, or a rare case at the
+cost of increased complexity, is usually not worth it, so base the case for
+the change on realistic usage.
+
+Trivial documentation changes, such as typo fixes, and pull requests that
+only increase test coverage usually need neither an issue nor a NEWS
+entry. When fixing typos, fix all of them in the page or in the
+documentation of the same topic, including the corresponding docstrings in
+Python and C code, in a single pull request. If the bot asks for an issue
+or a NEWS entry, a triager will add the :gh-label:`skip issue` and
+:gh-label:`skip news` labels instead.

Also duplicate?

picnixz picnixz commented on code on Nov 01, 2026 14:40 UTC
Code Review
getting-started/pull-request-lifecycle.rst:1
@@ -20,6 +20,41 @@ For a cheat-sheet reference, see the
 :ref:`quick reference on creating pull requests <pullrequest-quickguide>`.
 
 
+.. _pullrequest-prerequisites:
+
+Before writing code
+===================
+
+Most changes start with an issue, and the pull request usually comes once
+the issue has been acknowledged (see :ref:`fixing-issues-readiness`),
+although an issue does not always need one (see
+:ref:`fixing-issues-no-pullrequest`). Small features can be proposed
+directly in an issue, but features that break existing APIs and larger
+changes, such as changes to protocols or built-ins, usually need a
+discussion in the `Ideas category on Discourse`_ first (see
+:ref:`langchanges` and :ref:`stdlibchanges`).
+
+Performance improvements should always be proposed in an issue first,
+ideally without a pull request, since they need to be discussed unless the
+gain is clear. Keep any proof of concept on a branch of your fork instead
+of opening a pull request for it. We strongly recommend including the
+benchmark results in the issue, together with the benchmark script and the
+configuration used. Run the benchmarks with :pypi:`pyperf` rather than
+with plain :mod:`timeit`. Optimizing a cold path, or a rare case at the

pyperf timeit is enough and -X importtime is enough. I wanted to write a benchmarking guide as well. I can write it first and link it afterwards.

picnixz picnixz commented on code on Nov 01, 2026 14:40 UTC
Code Review
getting-started/pull-request-lifecycle.rst:1
@@ -20,6 +20,41 @@ For a cheat-sheet reference, see the
 :ref:`quick reference on creating pull requests <pullrequest-quickguide>`.
 
 
+.. _pullrequest-prerequisites:
+
+Before writing code
+===================
+
+Most changes start with an issue, and the pull request usually comes once
+the issue has been acknowledged (see :ref:`fixing-issues-readiness`),
+although an issue does not always need one (see
+:ref:`fixing-issues-no-pullrequest`). Small features can be proposed
+directly in an issue, but features that break existing APIs and larger
+changes, such as changes to protocols or built-ins, usually need a
+discussion in the `Ideas category on Discourse`_ first (see
+:ref:`langchanges` and :ref:`stdlibchanges`).
+
+Performance improvements should always be proposed in an issue first,
+ideally without a pull request, since they need to be discussed unless the
+gain is clear. Keep any proof of concept on a branch of your fork instead
+of opening a pull request for it. We strongly recommend including the
+benchmark results in the issue, together with the benchmark script and the
+configuration used. Run the benchmarks with :pypi:`pyperf` rather than
+with plain :mod:`timeit`. Optimizing a cold path, or a rare case at the

What I mean: please don't just use timeit because it only reports the fastest paths in general. It's a good indication of whether something CAN be faster, but it's preferrable to know how flaky it is for instance.

picnixz picnixz commented on code on Nov 01, 2026 14:45 UTC
Code Review
getting-started/pull-request-lifecycle.rst:1
@@ -20,6 +20,41 @@ For a cheat-sheet reference, see the
 :ref:`quick reference on creating pull requests <pullrequest-quickguide>`.
 
 
+.. _pullrequest-prerequisites:
+
+Before writing code
+===================
+
+Most changes start with an issue, and the pull request usually comes once
+the issue has been acknowledged (see :ref:`fixing-issues-readiness`),
+although an issue does not always need one (see
+:ref:`fixing-issues-no-pullrequest`). Small features can be proposed
+directly in an issue, but features that break existing APIs and larger
+changes, such as changes to protocols or built-ins, usually need a
+discussion in the `Ideas category on Discourse`_ first (see
+:ref:`langchanges` and :ref:`stdlibchanges`).
+
+Performance improvements should always be proposed in an issue first,
+ideally without a pull request, since they need to be discussed unless the
+gain is clear. Keep any proof of concept on a branch of your fork instead
+of opening a pull request for it. We strongly recommend including the
+benchmark results in the issue, together with the benchmark script and the
+configuration used. Run the benchmarks with :pypi:`pyperf` rather than
+with plain :mod:`timeit`. Optimizing a cold path, or a rare case at the
+cost of increased complexity, is usually not worth it, so base the case for
+the change on realistic usage.
+
+Trivial documentation changes, such as typo fixes, and pull requests that
+only increase test coverage usually need neither an issue nor a NEWS
+entry. When fixing typos, fix all of them in the page or in the
+documentation of the same topic, including the corresponding docstrings in
+Python and C code, in a single pull request. If the bot asks for an issue
+or a NEWS entry, a triager will add the :gh-label:`skip issue` and
+:gh-label:`skip news` labels instead.

Can you pinpoint the location? I think we say something similar though but I wanted to highlight what I usually see. Like:

  • someone opens a PR for fixing a typo

  • it touches a non-rst file

  • bot doesn't apply SKIP NEWS

  • user pings everyone (after the fact)
  • I can add a ref to the "When is a NEWS needed" though.

    picnixz picnixz commented on code on Nov 01, 2026 14:45 UTC
    Code Review
    getting-started/pull-request-lifecycle.rst:1
    @@ -20,6 +20,41 @@ For a cheat-sheet reference, see the
     :ref:`quick reference on creating pull requests <pullrequest-quickguide>`.
     
     
    +.. _pullrequest-prerequisites:
    +
    +Before writing code
    +===================
    +
    +Most changes start with an issue, and the pull request usually comes once
    +the issue has been acknowledged (see :ref:`fixing-issues-readiness`),
    +although an issue does not always need one (see
    +:ref:`fixing-issues-no-pullrequest`). Small features can be proposed
    +directly in an issue, but features that break existing APIs and larger
    +changes, such as changes to protocols or built-ins, usually need a
    +discussion in the `Ideas category on Discourse`_ first (see
    +:ref:`langchanges` and :ref:`stdlibchanges`).
    +
    +Performance improvements should always be proposed in an issue first,
    +ideally without a pull request, since they need to be discussed unless the
    +gain is clear. Keep any proof of concept on a branch of your fork instead
    +of opening a pull request for it. We strongly recommend including the
    +benchmark results in the issue, together with the benchmark script and the
    +configuration used. Run the benchmarks with :pypi:`pyperf` rather than
    +with plain :mod:`timeit`. Optimizing a cold path, or a rare case at the
    +cost of increased complexity, is usually not worth it, so base the case for
    +the change on realistic usage.
    +
    +Trivial documentation changes, such as typo fixes, and pull requests that
    +only increase test coverage usually need neither an issue nor a NEWS
    +entry. When fixing typos, fix all of them in the page or in the

    I wasn't able to find the sentence about "make more than one fix please for the entire .rst doc" and sync it with the docstrings as well. I'll ask an agent to check that.

    picnixz picnixz commented on code on Nov 02, 2026 13:23 UTC
    Code Review
    getting-started/pull-request-lifecycle.rst:1
    @@ -20,6 +20,41 @@ For a cheat-sheet reference, see the
     :ref:`quick reference on creating pull requests <pullrequest-quickguide>`.
     
     
    +.. _pullrequest-prerequisites:
    +
    +Before writing code
    +===================
    +
    +Most changes start with an issue, and the pull request usually comes once
    +the issue has been acknowledged (see :ref:`fixing-issues-readiness`),
    +although an issue does not always need one (see
    +:ref:`fixing-issues-no-pullrequest`). Small features can be proposed
    +directly in an issue, but features that break existing APIs and larger
    +changes, such as changes to protocols or built-ins, usually need a
    +discussion in the `Ideas category on Discourse`_ first (see
    +:ref:`langchanges` and :ref:`stdlibchanges`).
    +
    +Performance improvements should always be proposed in an issue first,
    +ideally without a pull request, since they need to be discussed unless the
    +gain is clear. Keep any proof of concept on a branch of your fork instead
    +of opening a pull request for it. We strongly recommend including the
    +benchmark results in the issue, together with the benchmark script and the
    +configuration used. Run the benchmarks with :pypi:`pyperf` rather than
    +with plain :mod:`timeit`. Optimizing a cold path, or a rare case at the

    Another reason why I also prefer pyperf (whether it's pyperf+bench script or pyperf/timeit over timeit: It reports the mean and stdvariance and answers "how much faster is it?" (that is with the comparison).

    I think I will also write a benchmarking guide later where I can expand what is needed in general.

    picnixz picnixz commented on Nov 02, 2026 13:58 UTC
    Author

    As said before, the text is principally suggested by an AI and later edited:

  • I mentioned pyperf timeit instead of timeit as well as -X importtime. I still want to write a benchmarking guide which will later be linked to that section.

  • I moved some guidelines about typos and NEWS entries where they belong (we didn't really have duplicates but we just had different places saying more or less related things so I merged them)

  • I also moved the "what is a bug" in the issue-tracker page and linked it. It felt wrong to have it in the PR page about "fixing-issues.rst" (which assumes issues to already exist). In the first place, I wanted to avoid the issues being submitted hence the issue-tracker page is a better fit.
  • picnixz picnixz commented on code on Nov 02, 2026 14:00 UTC
    Code Review
    getting-started/fixing-issues.rst:1
    @@ -16,10 +16,59 @@ For the truly adventurous looking for a challenge, you can look for issues that
     are not considered easy and try to fix those. It must be warned, though, that
     it is quite possible that a bug that has been left open has been left into that
     state because of the difficulty compared to the benefit of the fix. It could
    -also still be open because no consensus has been reached on how to fix the
    -issue, although having a pull request that proposes a fix can turn the tides of the
    -discussion to help bring it to a close. Regardless of why the issue is open,
    +also still be open because nobody agreed on how to fix it (see
    +:ref:`fixing-issues-readiness`). Regardless of why the issue is open,
     you can also always provide useful comments if you do attempt a fix, successful
     or not.
     
    +
    +.. _fixing-issues-readiness:
    +
    +Check that the issue is ready to be worked on
    +=============================================
    +
    +An obvious bug that nobody is working on can be fixed directly, but most
    +other issues have to be confirmed as worth fixing first, as they may be
    +duplicates, feature requests filed as bugs, already rejected features, etc.
    +A genuine bug is not always fixed either, since the fix may break existing
    +code and its impact has to be weighed. In that case, wait until a triager
    +or a core team member has acknowledged the issue.
    +
    +If you are unsure, ask in the issue, but avoid superfluous comments, since
    +every comment notifies everyone following the issue. Issues are not
    +assigned to contributors who ask for it, but once an issue has been
    +acknowledged and is still relevant, you can start working on it and
    +mention it in the issue.
    +
    +Before opening a pull request, read the whole discussion and check that the
    +issue still applies to the latest state of the branch you are targeting,
    +usually ``main``: an acknowledged issue may have been fixed since, or the
    +code it describes may have changed. For old issues, reporting that the
    +behaviour can no longer be reproduced on a supported Python version (see
    +:ref:`branchstatus`) is helpful on its own.
    +
    +In general, avoid opening a pull request if:
    +
    +* the issue has the :gh-label:`pending` label;
    +* the issue is old and its discussion never reached consensus;
    +* someone, such as the issue's author, already said they would open one;
    +* a pull request for the issue already exists.
    +
    +In the last two cases, if there has been no activity for a while, ask the

    I want to say "avoid asking in the issue 'any updates?'" if you're not interested by the feature at all... But I don't know how to say it (which is why I limited myself to the last 2 cases).

    For very old issues I think it's better we find them once again if someone submits a newer report or if someone raises the issue again because they encountered the same problem rather than someone wanting to contriubute and randomly picking a very old issue.

    picnixz picnixz commented on code on Nov 02, 2026 14:02 UTC
    Code Review
    getting-started/fixing-issues.rst:1
    @@ -16,10 +16,59 @@ For the truly adventurous looking for a challenge, you can look for issues that
     are not considered easy and try to fix those. It must be warned, though, that
     it is quite possible that a bug that has been left open has been left into that
     state because of the difficulty compared to the benefit of the fix. It could
    -also still be open because no consensus has been reached on how to fix the
    -issue, although having a pull request that proposes a fix can turn the tides of the
    -discussion to help bring it to a close. Regardless of why the issue is open,
    +also still be open because nobody agreed on how to fix it (see
    +:ref:`fixing-issues-readiness`). Regardless of why the issue is open,
     you can also always provide useful comments if you do attempt a fix, successful
     or not.
     
    +
    +.. _fixing-issues-readiness:
    +
    +Check that the issue is ready to be worked on
    +=============================================
    +
    +An obvious bug that nobody is working on can be fixed directly, but most
    +other issues have to be confirmed as worth fixing first, as they may be
    +duplicates, feature requests filed as bugs, already rejected features, etc.
    +A genuine bug is not always fixed either, since the fix may break existing
    +code and its impact has to be weighed. In that case, wait until a triager
    +or a core team member has acknowledged the issue.
    +
    +If you are unsure, ask in the issue, but avoid superfluous comments, since
    +every comment notifies everyone following the issue. Issues are not
    +assigned to contributors who ask for it, but once an issue has been
    +acknowledged and is still relevant, you can start working on it and
    +mention it in the issue.
    +
    +Before opening a pull request, read the whole discussion and check that the
    +issue still applies to the latest state of the branch you are targeting,
    +usually ``main``: an acknowledged issue may have been fixed since, or the
    +code it describes may have changed. For old issues, reporting that the
    +behaviour can no longer be reproduced on a supported Python version (see
    +:ref:`branchstatus`) is helpful on its own.
    +
    +In general, avoid opening a pull request if:
    +
    +* the issue has the :gh-label:`pending` label;
    +* the issue is old and its discussion never reached consensus;
    +* someone, such as the issue's author, already said they would open one;
    +* a pull request for the issue already exists.
    +
    +In the last two cases, if there has been no activity for a while, ask the
    +contributor whether they still want to work on it.
    +
    +Do not use automated tools to open pull requests on new issues either: a
    +pull request on an untriaged issue costs triagers more time than the issue
    +alone (see :ref:`ai-tools`).
    +
    +
    +.. _fixing-issues-no-pullrequest:
    +
    +Consider whether a pull request is needed

    The "what is an issue" is in the issue-tracker, but that tracker is in the triage page.

    I think it makes more sense to have it with the rest of the issues templates but I (and Claude) wasn't able to find a place in getting-started. So I added this section here.

    Reviewers
    Assignees
    picnixz picnixz
    Labels
    risk: low confidence: 88.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 43.3% (MEDIUM) · Higher = larger blast radius
    43.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 88.1% · Lower = rushed or shallow review
    88.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 5.1% · Safe to merge
    5.1%