I wondered why you asked for more detail. Here’s the detail which I
initially sent, but Discuss ate. (This time I won’t offset it with a row
When I first began contributing to CPython, the process was very
simple, simple enough that somebody with no professional programming
experience could get started:
I already had Python installed, including the .py source files.
I made a backup copy of the .py file, and edited the original.
If I messed up, I could revert to the backup.
Once I was happy with my edits, and the Python tests still passed, I
looked up how to use
diff from the command line to create a patch
file, and uploaded that to b.p.o.
The hardest part was remembering which order the files should go for
diff: is it
diff original changed or
diff changed original?
Now of course I appreciate that this was not so simple for the core
devs. They have to review the diff, apply it, confirm that the tests
still pass, etc. But as a contributor, the process was about as easy as
it is possible to get. The barrier to entry was close to zero for anyone
on a Linux system, as I was.
(I guess it may have been a little higher for Windows users, if they did
not have diff available.)
Since then, development moved to hg, then to git. Each change has lead
to a significant increase in complexity, something which full-time
programmers may not even realise since they may be so familiar with the
process that they don’t have to think twice about it.
I am not a professional programmer. I have, occasionally, been paid to
program, but not for some years now and even then only as a very small
part of my duties. Shifting from “just submit a patch” to “use hg” was a
big jump in complexity for me, but I could understand the model and get
it to work.
I wasn’t an expert, but I was able to push through changes to the master
repo without seriously breaking anything, and after PEP 450 (statistics)
was accepted, I was given core dev permissions.
Just as I was getting comfortable with hg, two major things happened:
- development moved to git;
- and I got ill with a serious auto-immune disease.
Between the two, I lost all momentum. To make things harder for me,
Github stopped supporting my OS and browser and due to financial
difficulties I wasn’t able to upgrade my system until recently, so for
three or four years I was effectively incapable of contributing even if
I had the time and inclination.
Because of my long absence from making active contributions, I have
forgotten everything I knew about the process and have to relearn from
(not quite from) scratch.
I understand that CPython is now big enough and complex enough that we
cannot realistically go back to “just upload a diff”.
Even if I could upload diffs to b.p.o. for someone else to deal with, I
don’t want to be That Guy who won’t follow the standard process. I want
to contribute, and I want to pull my weight when I do so, not make more
work for others.
I expect that most contributors to CPython are professional or full-time
programmers who know git well enough that there are no significant
barriers for them. But for the rest of us, the amount of stuff you have
to do before you can contribute your first line of Python code seems to
be a lot bigger now than when I started. I’m not sure this is an
accurate of complete list:
- install Python
- install git
- create a github account
- create a b.p.o. account
- set up a ssh key
- configure github to accept it
- fork the CPython repo
- download your fork to your PC
- fork your fork
- make your changes
- ensure the tests still pass
- write a What’s New entry
- update the docs
- push your changes to your local repo
- push them from your local repo to github
- make a PR
- make a b.p.o. issue
- link the PR and the issue
- sign a contributor agreement
- wait for review
- get the changes accepted
Have I missed anything?
Github is not as user-friendly for beginners as some git experts seem to
think. For example, I have a fork of the CPython repo dating back to the
initial change-over from hg. Last week I spent an hour trying to find
some way to update my fork to be up to date with the current version
before giving up. I’m sure that I will solve the problem, it’s a matter
of getting sufficiently motivated to put aside the time and energy
(another hour? two? five minutes? no way of knowing). But it’s another
barrier to getting productive.
Thank you for reading.