As you probably know my GSoC proposal to work on PyPy interpreter, supporting the Python 2.5 features, has been accepted. This post is a short explanation of my Google Summer of Code project.
PyPy
The PyPy project aims at producing a flexible and fast Python implementation. The guiding idea is to translate a Python-level description of the Python language itself to lower level languages. Rumors have it that the secret goal is being faster-than-C which is nonsense, isn’t it?
PyPy is divided into the python interpreter and the translator framework. The interpreter is written in RPython (a subset of Python) and the main goal is to provide an easy-to-hack (for python programmers
) Python interpreter.
PyPy’s interpreter currently supports only a few features introduced in Python 2.5, like __index__ (for slicing) and some part of the ‘with’ statement. Also, the 2.5 changes to the language and to the standard library have not been ported yet (although some have been, like the ctypes).
Goal
This proposal idea is to bring Python 2.5 features and changes to PyPy interpreter, this includes porting the modules and writing code for the features it self.
Here are some of the features I’ll work on:
- PEP 308: Conditional Expressions[*]
- 328: Absolute and Relative Imports
- PEP 342: New Generator Features
- PEP 343: The with statement[*]
- PEP 352: Exceptions as New-Style Classes
[*] part of this features are already supported by PyPy
Benefits
With support to 2.5 features and changes more the PyPy interpreter will be up-to-date so people who wants to use this features can be happy using PyPy. This probably means more people using PyPy (i hope!)
Why this project?
The first reason I’ve chosen the PyPy project is that I really like their ideas and goals. I was looking for collaborating to it in some way for a long time, but it took me some time to read the docs and to really understand the project.
As I like PyPy ideas and I’m starting to plan my graduation project/bachelor’s thesis, my work on PyPy interpreter will be a big part of it. Maybe I can explain my ideas in another post
I would like to thank Google (and the SoC folks), Python Software Foundation, PyPy and specially to Carl Friedrich Bolz* who will be my GSoC mentor and Leonardo Santagada who helped me to understand PyPy and to write my application.
* morepypy is a blog where PyPy developers talk to the community, it’s not Carl’s personal blog.
Thanks to my friends from Python Brasil community too.