[pypy-dev] Potential PyPy incompatibility

Amaury Forgeot d'Arc amauryfa at gmail.com
Fri May 13 20:28:50 CEST 2011


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


More information about the pypy-dev mailing list