[pypy-svn] r74744 - pypy/trunk/pypy/doc
fijal at codespeak.net
fijal at codespeak.net
Tue May 25 20:15:20 CEST 2010
Date: Tue May 25 20:15:18 2010
New Revision: 74744
--- pypy/trunk/pypy/doc/faq.txt (original)
+++ pypy/trunk/pypy/doc/faq.txt Tue May 25 20:15:18 2010
@@ -45,6 +45,11 @@
We list the differences we know about in `cpython_differences`_.
+There is also an experimental support for CPython extension modules, so
+they'll run without change (from current observation, rather with little
+change) on trunk. It has not been released yet, although it should be a major
+point of the next pypy release.
.. _`extension modules`: cpython_differences.html#extension-modules
.. _`cpython_differences`: cpython_differences.html
@@ -61,7 +66,9 @@
PyPy also basically works in a 64-bit Linux environment, but
*it requires a 32-bit Intel CPU* for the JIT right now. (It works
-fine in a 32-bit chroot of an Intel 64.)
+fine in a 32-bit chroot of an Intel 64.). There is also an ongoing
+summero of code project to provide 64bit support for JIT. It's scheduled
+to be finished by end of summer 2010.
Which Python version (2.x?) does PyPy implement?
@@ -82,20 +89,11 @@
Note that PyPy also fully supports `stackless-like
microthreads`_ (although both cannot be mixed yet).
-As for other modules: The general rule of thumb is that pure-Python modules
-work, C extension modules don't. However, many of the C extension modules
-of the standard
-library have been re-implemented in pure Python or as a mixed module (for some
-there were also older pure-Python versions available). The list of supported
-modules can be found as follows:
- * pure Python implementations: all the modules found in the `pypy/lib/`_
- * mixed module implementations: all the modules listed in
- ``essential_modules``, ``default_modules`` and ``working_modules``
- in `pypy/config/pypyoption.py`_.
+All pure-python modules should work, unless they rely on ugly
+cpython implementation details, in which case it's their fault.
+There is an increasing number of compatible CPython extensions working,
+including things like wxPython or PIL. This is an ongoing development effort
+to bring as many CPython extension modules working as possible.
.. _`stackless-like microthreads`: stackless.html
@@ -104,16 +102,13 @@
Can I use CPython extension modules?
-No and there are no short-term plans to support this. CPython extension modules
-rely heavily on CPython's C API which contains a lot of implementation details
-like reference counting, exact C-level object implementation and layout etc.
-A module based on ctypes is a different matter -- we support these nowadays.
-The long-term answer might be different. In principle, it should be possible
-for PyPy to support the CPython C API (or at least a large subset of its
-official part). It means that "in the fullness of time" you might be able to
-simply recompile existing CPython extension modules and use them with PyPy.
+Yes, but the feature is in alpha state and is available only on trunk
+(not in the 1.2 release). However, we'll only ever support well-behaving
+CPython extensions. Please consult PyPy developers on IRC or mailing list
+for explanations if your favorite module works and how you can help to make
+it happen in case it does not.
+We fully support ctypes-based extensions, however.
How do I write extension modules for PyPy?
More information about the Pypy-commit