[pypy-dev] Scrapy fails in PyPy

Armin Rigo arigo at tunes.org
Mon Dec 17 14:46:46 CET 2012


Hi Fijal,

On Fri, Dec 14, 2012 at 9:04 PM, Maciej Fijalkowski <fijall at gmail.com> wrote:
> That said, I agree that exposing a different C API is not solving
> much, while adding burden to maintainers of both Cython and PyPy and
> I'm generally against the idea.

I tend to agree with this point (so I disagree with what Leonardo said
just now, on this front :-).

(skipped explanation...)

> What we get:
>
> * Simple refcounting (can be implemented in C as macros even)
>
> * Lack of dictionaries

It sounds like a good model to me.  If I'm right, refcounting is even
simpler than in CPython, because all it needs is to increment or
decrement the refcount, but not check for zero.  This check is done
only during collection.

About "Lack of dictionaries", it's unclear: as a first approximation
to your idea, we could simply keep a dictionary going from the PyPy
object to the C object.  (We don't need the opposite direction.)


A bientôt,

Armin.


More information about the pypy-dev mailing list