|Version 6 (modified by 4 years ago) (diff),|
Google Summer of Code 2013
Getting in Touch
Thanks for your interest in working on Twisted this summer through Google Summer of Code! Here's an overview of the application process:
- Get in touch and let us know that you're interested, by sending an e-mail to
- Get familiar with the Twisted development process (see below).
- Submit at least 1 patch to Twisted (don't worry, we're here to help if you need it!)
- Create a project proposal with a Twisted mentor
- Apply on the Google Summer of Code web page for the Python Software Foundation group, with the project proposal we created.
Switching to Formal Parsers
Twisted has lots of code for parsing protocols: turning a stream of bytes (e.g. an HTTP request) into Python structures and function calls. Unfortunately all of this parsing is ad-hoc, and manually written. This project would involve using the Parsley parsing framework (https://pypi.python.org/pypi/Parsley) to parse network protocols, replacing Twisted's code. Because Parsley is a work in progress, this would involve some amount of experimentation, and building proof-of-concepts.
What you would learn: Network protocols' structure, text parsing.
Coding Standard Enforcement
Every patch submitted to Twisted must go through code review. Part of this is test coverage, correctness and API design, but part is just mechanical: are lines formatted correctly, methods named correctly, etc.. Last summer one of the GSoC projects implemented a checker for Twisted's coding standard (http://launchpad.net/twistedchecker), which is now being run as part of Twisted's continuous integration (https://buildbot.twistedmatrix.com/builders/twistedchecker). There are still improvements and bug fixes to be made however.
What you'll learn: Text parsing, Python parsing and language edge cases, software development infrastructure.
Deferreds are Twisted's abstraction for an eventual result of a task. They are thus a good place to have a hook for cancelling the task, and they provide a cancellation API. However, many Twisted APIs that return Deferreds don't provide cancellation support. The project would involve adding cancellation support to as many APIs as possible (e.g. various protocol clients like HTTP, POP3, SMTP, etc. that are missing it), starting with easy cases and moving on to more difficult ones. You can read more about Deferred cancellation here and here.
What you'll learn: a good knowledge of event-driven programming, and a little bit about lots of different parts of Twisted.
Rewrite twisted.web.client.getPage using Agent
Twisted has two HTTP client APIs; the new one is Agent, the old one getPage based on a much less featureful HTTP implementation. Rewriting getPage to use Agent would allow old code to benefit from the features added in Agent (e.g. chunked encoding), while preserving backwards compatibility.
What you'll learn: how HTTP works, and the high-level APIs users expect.
Getting Started with Twisted Development
Before contributing to Twisted, please spend some time practicing the tools of open source development.
Here are some of the tools we use:
- the Trac issue tracker
- the svn revision control system
- the diff and patch utilities
If you have not used IRC before, please go through this short tutorial on installing and using an IRC client:
Please familiarize yourself with how Twisted uses Trac by exploring the reports from this link: http://twistedmatrix.com/trac/report
With sufficient exploration you should be able to answer the following questions (you don't have to tell me the answers, just make sure you know how to find them):
- What is the oldest open Twisted ticket?
- How many tickets are currently waiting on review? How do we denote tickets waiting on a review (hint: look at the keyword)
- Using the custom query page at http://twistedmatrix.com/trac/query, find out how many open tickets we have that have the "documentation" keyword.
If you have not used svn before, please go through the svn training mission at: http://openhatch.org/missions/svn
If you have not used diff and patch before, please go through the diff and patch training mission at: http://openhatch.org/missions/diffpatch
If you have any questions while going through this material, don't hesitate to ask for help in #twisted on IRC or on the twisted-python mailing list.
Once you've gone through this material, the next steps will be to:
- Meet up on IRC (stop by the
#twistedchannel on Freenode)
- Check out and explore the Twisted source code
- Read a few parts of the Twisted core documentation and run some example Twisted scripts
- Run the Twisted test suite - cd into the checkout folder and run "bin/trial twisted".
And then you'll be in great shape to start working on your first Twisted ticket. We'll suggest a first ticket when you get in touch over email; you'd want to fix it in your Twisted svn checkout, run
svn diff, upload the resulting patch to the ticket and then add the "review" keyword to the ticket. This process is described in detail here: http://twistedmatrix.com/trac/wiki/TwistedDevelopment#SubmittingaPatch