CPython sprint

Spotify, Feb 2013

http://is.gd/spotifysprint

http://is.gd/spotifyissues2

About me

Petri Lehtinen, @akhern, akheron

Coding web things at Panic Marketing, Åbo, Finland

CPython core developer since 2011

About CPython

The default Python implementation

About CPython

50% C

50% Python

+ almost the whole test suite in Python

About core development

>150 core devs

~20 active

Mostly from US & EU

About core development

Mailing lists, IRC

guido.jpg

PEPs

BDFL role

Why are we here?

Bugs!

Let's fix it!

(New features too)

Workflow

Get the code

You already did this, right? 😸

Get the code

hg clone \
  http://hg.python.org/cpython

./configure --with-pydebug
make -j2
./python

(also akheron/cpython on GitHub)

Build the documentation

make -C Doc html

open Doc/build/html/index.html

Workflow

Create a tracker account

You already did this too, right? 😼

http://bugs.python.org/

Sign the contributor agreement

The PSF is asking all past and future contributors to sign a Contributor Agreement.

Initial license ➫ The Python License

Find something to work on

http://bugs.python.org/Easy issues

Interesting modules

Workflow

Versions & branches

Newest version: Python 3.3

Bugfixes ➫ 2.7, 3.2, 3.3, default

New features ➫ default

default will eventually become 3.4

Versions & branches

Make a patch against the oldest version first!

The committer will merge it to the other branches.

Use hg up 2.7 to change to 2.7 branch

What's where?

Lib/
stdlib modules & packages implemented in Python, tests in Lib/test/
Modules/
stdlib modules implemented in C

What's where?

Objects/
Builtin types implemented in C (list, dict, tuple, str, ...)
Python/
The core of the core

What's where?

Include/
Common header files
Misc/
Ohter files, e.g. Misc/NEWS & Misc/ACKS

Sidenote: Misc/ACKS

All contributors are listed here.

You will be too! \o/

Running the tests

./python -m test [-v] \
    [test_name]

e.g.

./python -m test
./python -m test -v test_string

Running the tests

2.7 is a bit different:

./python -m test.regrtest [-v] \
    [test_name]

Working with patches

Create:
hg diff > issueXXXXX.patch
Apply:
patch -p1 < issueXXXXX.patch

Workflow

Issue tracker

http://bugs.python.org/issueXXXXX

issueXXXXX.patch (or whatever)

Workflow

Wait for a review

Ping me if you have anything to ask!