GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Split backporting policy from the practical guide by aryanbarde80 · Pull Request #1930 · python/devguide

Split backporting policy from the practical guide #1930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
aryanbarde80 wants to merge 5 commits into python:main
base: main
Loading
Loading
from aryanbarde80:docs/1831-backport-policy-guide

Uh oh!

There was an error while loading. Please reload this page.

Draft

Split backporting policy from the practical guide #1930

Changes from 1 commit
Commits
Show all changes
5 commits
Select commit Hold shift + click to select a range
57108f0
Clarify CPython backport policy
aryanbarde80 Oct 22, 2026
6339c9b
Add dedicated backporting guide
aryanbarde80 Oct 22, 2026
dff1e45
List backporting guide in contents
aryanbarde80 Oct 22, 2026
336b75e
Move backport procedure to dedicated guide
aryanbarde80 Oct 22, 2026
c232a2d
Remove unrelated whitespace in getting started index
aryanbarde80 Oct 22, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
Add dedicated backporting guide
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@aryanbarde80
aryanbarde80 authored Oct 22, 2026
commit 6339c9bfc98c2d09dc92f37ddac8ddcdbac4d471

There are no files selected for viewing

89 changes: 89 additions & 0 deletions 89 getting-started/backporting.rst
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
.. _backporting:
.. _branch-merge:

Backporting merged changes
Comment thread

@StanFromIreland StanFromIreland Oct 22, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a new file?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@aryanbarde80 aryanbarde80 Oct 22, 2026

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue asks for the backport policy and the practical guide to be separate. This page holds the moved step-by-step procedure so it can be found independently in Getting Started; the Git boot camp now points readers here. I also removed the incidental blank-line changes from the index.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
==========================

After a pull request has been merged into ``main``, it may need to be backported
to one or more :ref:`maintenance <maintbranch>` or :ref:`security <secbranch>`
branches. The project's backport policy is described in the
:ref:`development cycle guide <maintbranch>`.

The :samp:`needs backport to {X.Y}` labels on a pull request indicate which
versions should receive a backport. ``miss-islington`` will automatically
attempt to create backport pull requests for the versions indicated by these
labels. If it cannot create a backport pull request because of conflicts, use
the :pypi:`cherry-picker` tool to create the backport and resolve the conflicts
manually.

You need the commit hash of the squashed commit that was merged into ``main``.
``miss-islington`` should post a comment when it is unable to create the
backport automatically, including the full command and commit hash. If that
comment is not posted, look for an event on the merged pull request similar to:

.. code-block:: text

<core_developer> merged commit <commit_sha1> into python:main <sometime> ago.

By following the link to ``<commit_sha1>``, you can get the full commit hash.

Alternatively, you can obtain the commit hash with these Git commands::

$ git fetch upstream
$ git rev-parse ":/gh-<PR number>"

These commands print the hash of the commit whose message contains
``gh-<PR number>``.

Use the commit hash and the :pypi:`cherry-picker` tool to create the backport.
In the following command, ``<branch>`` is the target maintenance branch (for
example, ``3.12``):

.. code-block:: text

$ cherry_picker <commit_sha1> <branch>

Follow the instructions provided. You may need to identify files with
conflicts, fix them, and build and run applicable tests. When you are finished,
stage all modified files and run ``cherry_picker --continue`` to push the
backport.

The tool usually generates the commit message automatically. If it does not,
keep the original commit message unchanged, except for removing the backport
pull request number (``(#XXXXX)``), and append a
``(cherry picked from commit <commit_sha1>)`` line.

The format of a correct backport commit message is:

.. code-block:: text
:class: good

[<branch>] gh-XXXXX: <original commit title> (GH-XXXXX)

<original commit body>

(cherry picked from commit <commit_sha1>)

Here ``gh-XXXXX`` is the GitHub *issue* number, and ``(GH-XXXXX)`` is the
original *pull request* number.

An example of a bad backport commit message:

.. code-block:: text
:class: bad

gh-XXXXX: Custom title (GH-XXXXX) (#XXXXX)

* Custom message

When opening the backport pull request, its title must follow the same format
as the commit title, beginning with the ``[<branch>]`` prefix and referencing
the original pull request with a ``(GH-XXXXX)`` suffix. For example:

.. code-block:: text
:class: good

[3.15] gh-12345: Fix the spam module (GH-24680)

After the backport pull request is opened, ``miss-islington`` will link it to
the original pull request and remove the corresponding backport label.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.