Author: Philip Jenvey <pjen...@underboss.org> Branch: py3k Changeset: r62432:c2a09b94050d Date: 2013-03-18 17:27 -0700 http://bitbucket.org/pypy/pypy/changeset/c2a09b94050d/
Log: merge default diff --git a/pypy/doc/architecture.rst b/pypy/doc/architecture.rst --- a/pypy/doc/architecture.rst +++ b/pypy/doc/architecture.rst @@ -20,7 +20,7 @@ * a compliant, flexible and fast implementation of the Python_ Language which uses the above toolchain to enable new advanced high-level features - without having to encode the low-level details. + without having to encode the low-level details. We call this PyPy. By separating concerns in this way, our implementation of Python - and other dynamic languages - is able to automatically @@ -34,7 +34,7 @@ High Level Goals ============================= -PyPy - the Translation Framework +RPython - the Translation Toolchain ----------------------------------------------- Traditionally, language interpreters are written in a target platform language @@ -83,7 +83,7 @@ very challenging because of the involved complexity. -PyPy - the Python Interpreter +PyPy - the Python Interpreter -------------------------------------------- Our main motivation for developing the translation framework is to @@ -113,11 +113,11 @@ of `Extreme Programming`_, the architecture of PyPy has evolved over time and continues to evolve. Nevertheless, the high level architecture is stable. As described above, there are two rather independent basic -subsystems: the `Python Interpreter`_ and the `Translation Framework`_. +subsystems: the `PyPy Python Interpreter`_ and the `RPython Translation Toolchain`_. .. _`translation framework`: -The Translation Framework +RPython Translation Toolchain ------------------------- The job of the RPython toolchain is to translate RPython_ programs @@ -153,7 +153,7 @@ * Optionally, `various transformations`_ can then be applied which, for example, perform optimizations such as inlining, add capabilities - such as stackless-style concurrency (deprecated), or insert code for the + such as stackless-style concurrency, or insert code for the `garbage collector`_. * Then, the graphs are converted to source code for the target platform @@ -174,7 +174,7 @@ .. _`standard interpreter`: .. _`python interpreter`: -The Python Interpreter +PyPy Python Interpreter ------------------------------------- PyPy's *Python Interpreter* is written in RPython and implements the diff --git a/pypy/doc/faq.rst b/pypy/doc/faq.rst --- a/pypy/doc/faq.rst +++ b/pypy/doc/faq.rst @@ -57,7 +57,8 @@ CPython extension and replace it with a pure python version that the JIT can see. -We fully support ctypes-based extensions. +We fully support ctypes-based extensions. But for best performance, we +recommend that you use the cffi_ module to interface with C code. For information on which third party extensions work (or do not work) with PyPy see the `compatibility wiki`_. @@ -65,7 +66,9 @@ .. _`extension modules`: cpython_differences.html#extension-modules .. _`cpython differences`: cpython_differences.html -.. _`compatibility wiki`: https://bitbucket.org/pypy/compatibility/wiki/Home +.. _`compatibility wiki`: +.. https://bitbucket.org/pypy/compatibility/wiki/Home +.. _cffi: http://cffi.readthedocs.org/ --------------------------------- On which platforms does PyPy run? @@ -77,6 +80,7 @@ bootstrap, as cross compilation is not really meant to work yet. At the moment you need CPython 2.5 - 2.7 for the translation process. PyPy's JIT requires an x86 or x86_64 CPU. +(There has also been good progress on getting the JIT working for ARMv7.) ------------------------------------------------ Which Python version (2.x?) does PyPy implement? @@ -389,8 +393,7 @@ * Second, and perhaps most important: do you have a really good reason for writing the module in RPython in the first place? Nowadays you should really look at alternatives, like writing it in pure Python, - using ctypes if it needs to call C code. Other alternatives are being - developed too (as of summer 2011), like a Cython binding. + using cffi_ if it needs to call C code. In this context it is not that important to be able to translate RPython modules independently of translating the complete interpreter. diff --git a/pypy/doc/getting-started-dev.rst b/pypy/doc/getting-started-dev.rst --- a/pypy/doc/getting-started-dev.rst +++ b/pypy/doc/getting-started-dev.rst @@ -12,11 +12,10 @@ The translator is a tool based on the PyPy interpreter which can translate sufficiently static RPython programs into low-level code (in particular it can be used to translate the `full Python interpreter`_). To be able to experiment with it -you need to: +you need to download and install the usual (CPython) version of: - * Download and install Pygame_. - - * Download and install `Dot Graphviz`_ + * Pygame_ + * `Dot Graphviz`_ To start the interactive translator shell do:: diff --git a/pypy/doc/whatsnew-head.rst b/pypy/doc/whatsnew-head.rst --- a/pypy/doc/whatsnew-head.rst +++ b/pypy/doc/whatsnew-head.rst @@ -94,3 +94,6 @@ Moves optimized JIT frames from stack to heap. As a side effect it enables stackless to work well with the JIT on PyPy. Also removes a bunch of code from the GC which fixes cannot find gc roots. + +.. branch: pycon2013-doc-fixes +Documentation fixes after going through the docs at PyCon 2013 sprint. diff --git a/pypy/objspace/std/dictmultiobject.py b/pypy/objspace/std/dictmultiobject.py --- a/pypy/objspace/std/dictmultiobject.py +++ b/pypy/objspace/std/dictmultiobject.py @@ -107,8 +107,15 @@ for w_k, w_v in list_pairs_w: w_self.setitem(w_k, w_v) + def setitem(self, w_key, w_value): + self.strategy.setitem(self, w_key, w_value) + + def setitem_str(self, key, w_value): + self.strategy.setitem_str(self, key, w_value) + + def _add_indirections(): - dict_methods = "setitem setitem_str getitem \ + dict_methods = "getitem \ getitem_str delitem length \ clear w_keys values \ items iterkeys itervalues iteritems setdefault \ diff --git a/pypy/objspace/std/kwargsdict.py b/pypy/objspace/std/kwargsdict.py --- a/pypy/objspace/std/kwargsdict.py +++ b/pypy/objspace/std/kwargsdict.py @@ -43,7 +43,6 @@ return self.space.newlist([self.space.wrap(key) for key in self.unerase(w_dict.dstorage)[0]]) def setitem(self, w_dict, w_key, w_value): - space = self.space if self.is_correct_type(w_key): self.setitem_str(w_dict, self.unwrap(w_key), w_value) return _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit