DEV Community

TobiasHT
TobiasHT

Posted on

Starting my Journey to contributing to Python

Hey Devs.
So I've been using Python for quite a long time now. I have used it in a variety of projects, some open source while other proprietary, all ranging from graphics, to web, to data science and many other sectors in IT.
I'm mainly a freelancer at this point, so that's why I get to work on a wide range of projects.

However, this month I decided to take a big step and try to contribute to CPython. CPython is the most common implementation of python for those that don't know it, other implementations include PyPy, IronPyton and Jython, you can look them up if you wanna know more about them. We're here to talk about CPython mainly and how to get started.

Rest assured, other than using the language itself, I generally have no idea how CPython is implemented, and I'm also not 100% good at Python itself, I'd give myself 85%. So I'm gonna start documenting my journey through a series of blog posts that I'm gonna be making here. I hope by the end of this journey, I'd have achieved my goal of contributing to CPython, and I hope we move together in this awesome Journey.

So now where I'm starting from you wonder? Well, I started where everyone who wishes to contribute to python starts from, the python devguide https://devguide.python.org/ and I read through it quite carefully.
Second, I needed to learn how python works on the inside, and for that I purchased my copy of CPython Internals by Anthony Shaw, this is quite a great book I might say.
Thirdly, I had to get myself a copy of the CPython source code from GitHub, which I downloaded as a zip from here https://github.com/python/cpython .I downloaded the recent Python 3.10 source. I did not want to clone the python 3.11 project because it is continuously changing and I wouldn't be able to keep up with the changes.
Fourthly, I needed to find a community of developers where I can ask questions when I face a challenge. Thankfully, I landed on the Python discussions site https://discuss.python.org/ . This is the place where core developers and New users sit back and talk python all day (that's if they got time to talk).

Well, I think my ingredients are set. Since the year is coming to a close, I guess there's not much I can do this year. However, before this year ends, I realized that It's important to learn how to embed and extend python and also learning the Python-C API. This is very useful to learn as it gives you a glimpse into the internals of CPython and also has a wide range of applications in cases where you wanna add extra functionality to your python interpreter.

Alright, that's it for me for now. Next up, learning the Python-C API and how to extend python with some C code. If you wanna follow along, you can find the Python-C API documented in the python docs. Happy learning, and let's start off with the journey.

Discussion (0)