[pypy-dev] Potential PyPy incompatibility

cool-RR cool-rr at cool-rr.com
Fri May 13 20:44:30 CEST 2011


On Fri, May 13, 2011 at 8:28 PM, Amaury Forgeot d'Arc <amauryfa at gmail.com>wrote:

> Hi,
>
> 2011/5/13 cool-RR <cool-rr at cool-rr.com>:
> > Hey,
> > Here's something I thought about that might be a compatibility problem,
> not
> > sure if it's a problem in production. When you take a method of a builtin
> in
> > Pypy, for example `str.join`, it seems to create a new object which is
> > weakreffable, where in CPython it's not. I was just looking at Django's
> > signal mechanism:
> >
> http://docs.djangoproject.com/en/1.3/topics/signals/#listening-to-signals
> > It creates a weak reference to the signal-handler function, and if it
> dies,
> > the link is destroyed.
> > Do you think this might be a problem?
>
> But why would you use an unbound method of a builtin type
> as a signal handler?
>
> Note that "sender" is passed as first argument to the function,
> whereas i.e. str.join expected a string.
>
> --
> Amaury Forgeot d'Arc
>

In the case of Django signal handlers it would probably not be a problem in
practice, but in other systems it might become a problem so if it can be
fixed early (e.g. by making `list.__add__ is list.__add__` True in Pypy as
it is in CPython) it might save us some trouble later.


Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20110513/4a340ce3/attachment-0001.html>


More information about the pypy-dev mailing list