Source / py3donate.html

<!DOCTYPE html>
	<title>PyPy :: Call for donations - PyPy to support Python3!</title>
	<meta http-equiv="content-language" content="en" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="author" content="PyPy Team" />
	<meta name="description" content="PyPy" />
	<meta name="copyright" content="MIT" />
	<meta name="document-rating" content="general" />
	<link rel="stylesheet" type="text/css" media="screen" title="default" href="css/site.css" />
	<link rel="alternate" type="application/rss+xml" title="RSS Feed for PyPy" href="" />
  <link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.14.custom.css" />
	<script type="text/javascript" src=""></script>
	<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
	<script type="text/javascript" src=""></script>
  <script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>
  <script type="text/javascript" src="js/detect.js"></script>
  <script type="text/javascript" src="js/script2.js?bust=1"></script>
<script type="text/javascript">
	var _gaq = [['_setAccount', 'UA-7778406-3'], ['_trackPageview']];
	if (document.location.protocol !== 'file:') {
		(function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
			(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
<div id="body-outer"><div id="body-inner"><div id="body" class="clearfix">
<div id="header">
	<div id="menu-follow">
		<div><a href="" title="Follow the conversation on Twitter"><img src="" alt="Follow the conversation on Twitter" width="14px" height="14px" /></a></div>
    <div><a href=""><img src="" width="14px" height="14px" /></a></div>
		<div><a href="" title="Subscribe to the RSS Feed"><img src="" alt="Subscribe to the RSS Feed" width="14px" height="14px" /></a></div>
	<div id="logo"><a href=""><img src="image/pypy-logo.png" alt="PyPy" height="110px" /></a></div>
	<hr class="clear-left" />
	<div id="menu-sub"><a href="index.html">Home</a><span class="menu-sub-sep"> | </span><a href="features.html">Features</a><span class="menu-sub-sep"> | </span><a href="download.html">Download</a><span class="menu-sub-sep"> | </span><a href="compat.html">Compatibility</a><span class="menu-sub-sep"> | </span><a href="performance.html">Performance</a><span class="menu-sub-sep"> | </span><a href="">Dev Documentation</a><span class="menu-sub-sep"> | </span><a href="">Blog</a><span class="menu-sub-sep"> | </span><a href="people.html">People</a><span class="menu-sub-sep"> | </span><a href="contact.html">Contact</a><span class="menu-sub-sep"> | </span><a href="py3donate.html">Py3k donations</a><span class="menu-sub-sep"> | </span><a href="numpydonate.html">NumPy donations</a><span class="menu-sub-sep"> | </span><a href="tmdonate.html">STM/AME donations</a></div>
	<hr class="clear" />
<div id="content">
<div id="main">
<h1 class="title">Call for donations - PyPy to support Python3!</h1>
<p>The release of Python 3 has been a major undertaking for the Python
community, both technically and socially.  So far the PyPy interpreter
implements only version 2 of the Python language and is increasingly
used in production systems.  It thus contributes to the general risk
of a long lasting Python community split where a lot of people
continue using Python 2 while others work with Python 3, making it
harder for everyone.</p>
<p>The PyPy project is in a unique position in that it could support
Python 3 without having to discontinue supporting Python 2, with the possibility of reusing a large part of of code base and fully
reusing its unique translation and JIT-Compiler technologies.
However, it requires a lot of work, and it will take a long time
before we can complete a Python 3 port if we only wait for volunteer
work.  Thus, we are asking the community to help with funding the
necessary work, to make it happen faster.  <a class="reference internal" href="#here">Here</a> is a more detailed view on how our proposed work benefits the Python community and the general public.</p>
<p>Below you'll find the <a class="reference internal" href="#planned-stages-of-work">planned stages of work</a> and the associated
fundraising targets we need to make things happen.  Once we reach the
necessary target for each stage, we will start contracting
developers.  Contracts and money are managed by the non-profit
<a class="reference external" href="">Software Freedom Conservancy</a> of which the PyPy project is a member.
The current elected representatives are Carl Friedrich Bolz, Holger
Krekel and Jacob Hallen and they will - in close collaboration with
Conservancy and the core developers - select the best developers for
the Python 3 porting job among well known PyPy contributors.</p>
<p>If you want to see PyPy support Python 3 and Python 2, donate using buttons
on the side.</p>
<p>Should we not receive enough donations to complete all stages by 1st March 2012
at the latest, we will try our best to make PyPy support Python 3 anyway.  We
however reserve the right to shift any unused funds to other PyPy activities
when that date is reached.  Of course, since the Conservancy is a
501&copy;(3) charitable organization incorporated in NY, USA, all funds will,
regardless of their use, be spent in a way that benefits the general
public, the advancement of Open Source and Free Software,
and in particular the PyPy community and the PyPy codebase.</p>
<p><strong>Note</strong> For donations higher than $1,000, we can arrange for an invoice
and a different payment method to avoid the high Paypal fees.  Please
contact pypy at if you want to know details on how
to donate via other means.</p>
<div class="section" id="id1">
<span id="planned-stages-of-work"></span><h1>Planned stages of work</h1>
<p>The goal of this project is to write an interpreter that interprets
version 3 of the Python language. To be precise we would aim at having
a Python 3.2 interpreter together in the same codebase as the python 2.7
<p>At the end of the project, it will be possible to decide at
translation time whether to build an interpreter which supports Python
2.7 or Python 3.2 and both versions will be nightly tested and
available from nightly builds.</p>
<p>The focus of this project is on compatibility, not performance.  In
particular, it might be possible that the resulting Python 3
interpreter will be slower than the Python 2 one.  If needed,
optimizing and making it more JIT friendly will be the scope of a
separate project. Our existing JIT generation technology should apply
out of the box; this disclaimer is only about the extra performance we
could obtain by tweaking the Python 3 interpreter or writing specific
interpreter-guided optimizations in the JIT.</p>
<div class="section" id="about-estimates-and-costs">
<h2>About estimates and costs</h2>
<p>For each step, we estimated the time that it would take to complete for an
experienced developer who is already familiar with the PyPy codebase.  From
this number, the money is calculated considering a hourly rate of $60, and a
5% general donation which goes to the <a class="reference external" href="">Software Freedom Conservancy</a> itself, the non-profit
association of which the PyPy project is a member and which manages all the
issues related to donations, taxes and payments.</p>
<p>The estimated time to complete the whole project is about 10.5 person-months.</p>
<p>For comparison, the python-3000 mailing list was created in March 2006; Python
3.0 was released in December 2008 and Python 3.1, the first release genuinely
suitable for production use (due to the abysmal I/O performance of 3.0) was
released in June 2009.  During these 3.5 years, a lot of people contributed to
the development of Python 3, and while it is hard to turn these numbers into
precise person-years, it sounds reasonable to think that in total it took
several person-years.</p>
<p>We have the advantage of targeting something that already exists without
having to define the destination as they go along, and also the internal
architecture of PyPy makes it easier to do the porting.</p>
<div class="section" id="step-1-core-language">
<h2>Step 1: core language</h2>
<p>In this step, we implement all the changes to the core language,
i.e. everything which is not in the extension modules.  This includes, but it
is not necessarily limited to the following items, which are split into two
big areas:</p>
<li><p class="first"><strong>Sub-step 1.1</strong>: string vs unicode and I/O:</p>
<ul class="simple">
<li>adapt the existing testing infrastructure to support running Python 3 code</li>
<li>string vs bytes: the interpreter uses unicode strings everywhere.</li>
<li>the <tt class="docutils literal">print</tt> function</li>
<li><tt class="docutils literal">open</tt> is now an alias for <tt class="docutils literal"></tt>, removal of the old file type.</li>
<li>string formatting (for the part which is not already implemented in Python
<li>the _io module (for the part which is not already implemented in Python
<li>syntactic changes to make <tt class="docutils literal"></tt> importable (in particular:
<tt class="docutils literal"><span class="pre">metaclass=...</span></tt> in class declarations)</li>
<li><strong>Estimate cost</strong>: $35,000</li>
<li><p class="first"><strong>Sub-step 1.2</strong>: other syntactic changes, builtin types and functions,
<ul class="simple">
<li>views and iterators instead of lists (e.g., <tt class="docutils literal">dict.items()</tt>, <tt class="docutils literal">map</tt>,
<tt class="docutils literal">range</tt> &amp; co.)</li>
<li>new rules for ordering comparisons</li>
<li>removal of old-style classes</li>
<li>int/long unification</li>
<li>function annotations</li>
<li>smaller syntax changes, such as keyword-only arguments, <tt class="docutils literal">nonlocal</tt>,
extended iterable unpacking, set literals, dict and set comprehension, etc.</li>
<li>changes to exceptions: <tt class="docutils literal">__traceback__</tt> attribute, chained exceptions,
<tt class="docutils literal">del e</tt> at the end of the except block, etc.</li>
<li>changes to builtins: <tt class="docutils literal">super</tt>, <tt class="docutils literal">input</tt>, <tt class="docutils literal">next()</tt>, etc.</li>
<li>improved <tt class="docutils literal">with</tt> statement</li>
<li><strong>Estimate cost</strong>: $28,000</li>
<p>Note that the distinction between sub-steps 1.1 and 1.2 is blurry, and it might be
possible that during the development we will decide to move items between the
two sub-steps, as needed.</p>
<p>For more information, look at the various &ldquo;What's new&rdquo; documents:</p>
<ul class="simple">
<li><a class="reference external" href=""></a></li>
<li><a class="reference external" href=""></a></li>
<li><a class="reference external" href=""></a></li>
<p><strong>Total estimate cost</strong>: $63,000</p></div>
<div class="section" id="step-2-extension-modules">
<h2>Step 2: extension modules</h2>
<p>In this step, we implement all the changes to the extension modules which are
written in C in CPython.  This includes, but it is not necessarily limited to:</p>
<ul class="simple">
<li><tt class="docutils literal">collections</tt>, <tt class="docutils literal">gzip</tt>, <tt class="docutils literal">bz2</tt>, <tt class="docutils literal">decimal</tt>, <tt class="docutils literal">itertools</tt>, <tt class="docutils literal">re</tt>,
<tt class="docutils literal">functools</tt>, <tt class="docutils literal">pickle</tt>, <tt class="docutils literal">_elementtree</tt>, <tt class="docutils literal">math</tt>, etc.</li>
<p><strong>Estimate cost</strong>: this is hard to do at this point, we will be able to give a
more precise estimate as soon as Step 1 is completed.  As a reference, it
should be possible to complete it with $37,000</p></div>
<div class="section" id="step-3-cpyext">
<h2>Step 3: cpyext</h2>
<p>The <tt class="docutils literal">cpyext</tt> module allows to load CPython C extensions in PyPy.  Since the
C API changed a lot between Python 2.7 and Python 3.2, <tt class="docutils literal">cpyext</tt> will not
work out of the box in the Python 3 PyPy interpreter.  In this step, we will
adapt it to work with Python 3 as well.</p>
<p>Note that, even for Python 2, <tt class="docutils literal">cpyext</tt> is still in a beta state.  In
particular, not all extension modules compile and load correctly.  As a
consequence, the same will be true for Python 3 as well.  As a general rule,
we expect that if a Python 2 module works with <tt class="docutils literal">cpyext</tt>, the corresponding
Python 3 version will also work when this step is completed, although the
details might vary depending on the exact C extension module.</p>
<p><strong>Estimate cost</strong>: $5,000</p></div>
<div class="section" id="benefits-of-this-work-to-the-python-community-and-the-general-public">
<span id="here"></span><h1>Benefits of This Work to the Python Community and the General Public</h1>
<p>Python has become one of the most popular dynamic programming languages in
the world.  Web developers, educators, and scientific programmers alike
all value Python because Python code is often more readable and because
Python often increases programmer productivity.</p>
<p>Traditionally, languages like Python ran more slowly than static, compiled
languages; Python developers chose to sacrifice execution speed for ease
of programming.  The PyPy project created a substantially improved Python
language implementation, including a fast Just-in-time (JIT) compiler.
The increased execution speed that PyPy provides has attracted many users,
who now find their Python code runs up to four times faster under PyPy
than under the reference implementation written in C. Some programs that
are particularly JIT-friendly see even greater speedups. See our <a class="reference external" href="">speed</a>
<p>Meanwhile, the Python community is undergoing significant change, with the
introduction of a new &lsquo;version 3&rsquo; of the Python language (Python 3).
Python 3 breaks some backwards compatibility with 2.x series, so
programmers who seek to use Python 3 must port old code.  For example,
programmers who needed old libraries might want to use Python 2 only and
programmers wanting to use new language features would like to use Python
3, but would not be able to use libraries that written for Python 2.x
without substantial rewrites.  This issue could lead to a dangerous
community split: programmers who needed old libraries might only use
Python 2 and programmers seeking new language features would use Python 3,
but would not be able to use libraries written for Python 2.x.</p>
<p>PyPy currently supports only Python 2.7.  While PyPy supports only version
2 of the Python language, PyPy users have an incentive to avoid Python 3.
Python programmers must chose between the language features in Python 3,
and the substantial performance benefits offered by PyPy.</p>
<p>To address this issue, the PyPy team proposes to implement Python 3 on
PyPy.  With such improvements to PyPy, PyPy can support the entire
Python-using community and hopefully help to prevent any community split.
PyPy support of Python 3 would also bring the excellent code execution
performance of PyPy to those who wish to migrate to Python 3.</p>
<p>Moreover, by ensuring the latest version of the Python language
specification (Py3k) works properly and fully on PyPy, the maximal benefit
of collaboration, learning, and software improvement can happen in the
entire Python language community.</p>
<p>A broad community of developers support and develop the PyPy project,
many of whom work as volunteers. The Py3k grant should help with turning
some attention towards implementing Python 3. This will not hinder other
directions in which PyPy is going like improving performance. The goal
of the PyPy community is to support both Python 2 and Python 3 for the
forseeable future.</p>
<p>PyPy's developers make all PyPy software available to the public without
charge, under PyPy's Open Source copyright license, the permissive MIT
License.  PyPy's license assures that PyPy is equally available to
everyone freely on terms that allow both non-commercial and commercial
activity.  This license allows for academics, for-profit software
developers, volunteers and enthusiasts alike to collaborate together to
make a better Python implementation for everyone.</p>
<p>Finally, tracing JITs and other programming language execution technology
used in PyPy are of current and particular interest in computer science
research.  PyPy helps cross-pollinate knowledge between academic computer
science and industrial use of Python, since PyPy can function well both as
a research tool and real-world Python programming language implementation.
Continued support and evolution of PyPy in any direction, such as support
for Py3k, increases the features available from PyPy and such improvements
are expected to spark even more general interest in PyPy itself and the
Python programming language generally.</p>
<dl class="docutils">
<dt>References on Educational Uses of Python:</dt>
<dd><ul class="first last simple">
<li><a class="reference external" href=""></a></li>
<li><a class="reference external" href=""></a></li>
<dt>References for PyPy and its benefits:</dt>
<dd><ul class="first last simple">
<li><a class="reference external" href=""></a></li>
<li><a class="reference external" href=""></a></li>
<li><a class="reference external" href=""></a></li>
<div id="sidebar">