How to build stable 3.9 branch from fork and clone of cpython

Chris Angelico rosuav at gmail.com
Wed May 19 02:58:34 EDT 2021


On Wed, May 19, 2021 at 1:37 PM <pjfarley3 at earthlink.net> wrote:
>
> > -----Original Message-----
> > From: Chris Angelico <rosuav at gmail.com>
> > Sent: Tuesday, May 18, 2021 3:01 AM
> > To: Python <python-list at python.org>
> > Subject: Re: How to build stable 3.9 branch from fork and clone of cpython
> >
> > On Tue, May 18, 2021 at 4:33 PM <pjfarley3 at earthlink.net> wrote:
> > >
> > > I am following the "Getting Started" section of the Python Developers
> > > Guide, but when I build the first version to verify everything builds,
> > > it builds branch 3.11.
> > >
> > > If I want to build and contribute to branch 3.9, how do I set that up
> > > please?
> > >
> >
> > git checkout 3.9
> >
> > That should switch you to the branch, replacing all the (tracked) files in the build
> > directory with the corresponding files from 3.9.
> >
> > Be aware that most development is going to happen on the master branch (or
> > the main branch, whichever one you have), and branches like 3.9 are going to
> > get backported patches; so any change you're planning to contribute to 3.9 is
> > going to need to work correctly on both branches.
> >
> > ChrisA
>
> Thanks Chris, that did work.  Thinking over what you said though, perhaps I should change it back.
>
> Would "git checkout main" reverse the branch 3.9 checkout?

Yes, it would!

> As you can probably tell, I am very new to git, so please pardon my ignorance.
>

Fortunately, git may be complex and immensely detailed, but it is also
logical. Also, git works *very* hard to make sure that you don't lose
anything, so it's usually safe to try things out (for instance, if
that "git checkout" command would overwrite changes without being able
to bring them back, it'll let you know).

ChrisA


More information about the Python-list mailing list