Contributing to CPython
Let’s update this doc with new things we’ve learned, while focusing on keeping it easy to read for brand new contributors. Note that I made this doc non-editable because someone as a joke archived it. You should be able to leave comments though.
- You have to know C. (You don’t! Most of the stdlib is in Python, and we need doc help too.)
- You have to know Git and GitHub. (Not entirely true — , though there are a fair number git concept you have to wrap your head around.)
- You have to have 10+ years of Python experience. (False. You can totally begin contributing with just a few years of experience writing Python, as long as you did more than numpy and pandas.)
- You will be doing much work on the command line (in a shell window).
- That means typing UNIX or Windows shell commands. Much of the docs below assumes fluency at this level. It feels different than typing code because there’s no IDE with suggestions for what to type next.
- Lots of tutorials and instruction sets are incomplete or out of date or need modifications for some platforms; don’t despair, ask for help!
- Building instructions are quite different depending on your platform (Mac, Windows or Linux); my bias is Mac. Windows is more different than the others, because its shell syntax and commands are different (dir instead of ls, etc.).
- If you can, pair with someone else — this is fun, and you will make more progress through the initial bewildering phase quicker, to get to the stuff that feels valuable.
Docs for getting started
- Core Tutorial: https://cpython-core-tutorial.readthedocs.io/en/latest/
- Where to start: https://cpython-core-tutorial.readthedocs.io/en/latest/where_should_i_start.html “To find an easy issue, persistence is the key :-)”
- DevGuide: https://devguide.python.org/
- Learning Git: https://devguide.python.org/gitbootcamp/
- Getting help: https://devguide.python.org/help/
- Core mentorship mailing list: https://www.python.org/dev/core-mentorship/ (requires signing up)
- IRC: #python-dev on freenode.net
Choosing your first project
- Depends on your experience and confidence level
- Look for open issues in https://bugs.python.org/ (requires free account)
- Has 7000+ open issues (and 44,000+ closed)
- Easy issues: click on “Easy issues” in left side bar
- Easy C issues: click on “Search” in left side bar, select keyword “Easy (C)”, hit “Search”
- Needs review: keyword “needs review” (we need help reviewing a lot of lingering PRs!)
- Doc issues: components “Documentation”
- And so on
- Look for open issues related to a stdlib module/package you care about / know / like / etc.: type 1-2 words in the Search box (top right), select “open”, click “Search”
- Maybe you found something that’s not working, or some documentation that’s incomplete or incorrect. You can start by filing a bug report and then create a Pull Request with a proposed fix.
Git one-time stuff setup
- If you don’t yet have a GitHub username, sign up at github.com
- Fork the python/cpython repo on GitHub (once)
- Click “Fork” button (top right)
- Clone your fork locally
- git clone email@example.com:YOURUSERNAME/cpython.git
- cd cpython
- Configure upstream remote
- git remote add upstream https://github.com/python/cpython/
- Now you can push/pull your fork with git push and git pull
- You can refresh
- Create a branch to work on
- (DON’T WORK ON MASTER! You’ll just confuse yourself.)
- git checkout upstream/master -b YOURBRANCHNAME