[pypy-issue] Issue #2061: ctypes.py_object use weakref.ref which is rejecting dict (pypy/pypy)

Catstyle Lee issues-reply at bitbucket.org
Mon Jun 8 09:08:12 CEST 2015

New issue 2061: ctypes.py_object use weakref.ref which is rejecting dict

Catstyle Lee:

this is not the same as under CPython2.7.9

i am writing a script that mainly using multiprocessing to do huge calculation
for speed reason i have precalculated some factors as dict
i want to share the dict(~900MB) within processes, manager.dict() use too much mem(i have no idea why)
so i decide to use ctypes; but it complain `TypeError: cannot create weak reference to 'dict' object`, at https://bitbucket.org/pypy/pypy/src/76611312113ea3ba08c89bc40dca460949743d1b/lib_pypy/_ctypes/primitive.py?at=default#cl-56

it runs well under CPython2.7.9, should it have the same behavior?

More information about the pypy-issue mailing list