What should I do if I'd like to get more involved with contributing to Python?

For some background, I got started at the cpython sprints at PyCon. Since I’m between semesters until fall, I’d really like to make the time worthwhile and continue to onboard myself to working on Python. Right now the most direction I have is to keep an eye on open issues and start to learn more about how the interpreter works, but I’d really like to hear from people more experienced with contributing if anyone would like to give suggestions or help guide my path. I like getting into how things work, so I would especially enjoy being able to work more closely to Python’s internals. I did see the core mentorship page on the site; not sure if that’s something that still happens (or if it just refers to broader community of contributors helping each other out), but any small or large amount of guidance would be welcome!

4 Likes

Hello, Kira! Nice to see you here!
And thank you for starting this topic, it can be useful for many folks. I’m also interested in piece of advice about making more contribution, for example.

I’d recommend to read https://devguide.python.org/, official Python documentation itself and cpython/InternalDocs at main · python/cpython · GitHub.

Useful ways of getting ideas are reading the interpreter code itself (with code comments, of course) and experimenting with code. I’ve made some first issues this way.

Other idea is git blame command.
You can just run it on interested parts of code, find some commit and see related PRs. It’s possible to learn a lot by yourself from previous discussions.

And, of course, you can follow core developers, subscribe on PRs and issues via GitHub “Subscribe” button. And participate in discussions here and on GitHub.

I wish you all the good luck!

4 Likes

Hi Kira,

Asking questions in issues and PRs when they raise doubts for you is an interesting way to contribute (helps make the issue clearer for everybody) and learn IMHO. Trying to reproduce and diagnose issues also helps development and teaches you at the same time.

Testing open PRs (by applying them, running tests, trying to come up with cases it doesn’t handle, etc.) or even just assessing them and interacting with them (do they have new tests that cover the code change? can you see a simpler way of making the proposed change? do you see code or docs that you’d like to understand better?) can also be fruitful.

I understand there are topical CPython projects that are looking for contributors and ready to mentor you, for example the JIT effort seems very open in that regard.

One interesting thing I think could help you get familiarized with the wealth of issues of the CPython repository is, for any new issue you find interesting, try to find duplicates or related issues and comment about them in the new issue. Can be a great help and some issue reporters don’t properly do this when creating a new issue. And by some issue reporters I mean me, sorry about that.

You can also pick some side or related project that impacts CPython in some way and work on that, like the GitHub bots or improving the devguide with the feedback from your experience reading it.

To get a hang on the internals of CPython, reading code, PRs and the docs Mikhail mentions is a great start, but there’s also a book about that if you’d like to do it in a more structured way (it seems you can find it cheaper on other sellers).

There are also non-CPython related projects that can teach you about specific parts of CPython, like coverage.py, memray, etc.

And last, something that doesn’t fit the way I work but may be interesting for others, is to set a somewhat difficult goal (like adding a whole new feature to CPython or fixing an involved issue) and work through learning just the parts you need to achieve that. Great way to feel lost, great way to learn a lot by doing.

Sorry for the long message, I hope it helps you! And thank you for wanting to help to improve Python!

2 Likes

Thanks, Daniel!

I’d like to add the book that helps me to dig into CPython internals:
Read Inside The Python Virtual Machine | Leanpub .
This book is free and it gives “The View From 30,000ft” and reasonable count of internal details, but may be slightly outdated (Python 3.6)

1 Like

That’s super helpful, thanks! I’m glad I asked. And thanks @efimov-mikhail for the reading recs and ideas!

1 Like