Skip to content

PickleWarning thrown when pickling ArrayInstance #455

@mmckerns

Description

@mmckerns

Warnings are thrown when pickling an ArrayInstance, however it appears that the ArrayInstance does pickle.

$ pypy test_objects.py 
/Users/mmckerns/lib/pypy-2.7/site-packages/dill-0.3.5.dev0-py2.7.egg/dill/_dill.py:1658: PicklingWarning: Cannot locate reference to <type 'ArrayInstance'>.
  warnings.warn('Cannot locate reference to %r.' % (obj,), PicklingWarning)
/Users/mmckerns/lib/pypy-2.7/site-packages/dill-0.3.5.dev0-py2.7.egg/dill/_dill.py:1660: PicklingWarning: Cannot pickle <type 'ArrayInstance'>: __builtin__.ArrayInstance has recursive self-references that trigger a RecursionError.
  warnings.warn('Cannot pickle %r: %s.%s has recursive self-references that trigger a RecursionError.' % (obj, obj.__module__, obj_name), PicklingWarning)
fails: CCharType <class 'ctypes.c_char'>
fails: CWCharType <class 'ctypes.c_wchar'>
fails: CByteType <class 'ctypes.c_byte'>
...

SEEN WITH:

  • pypy-2.7-v7.3.8, dill-0.3.5.dev0, numpy-1.16.6
  • pypy-3.7-v7.3.8, dill-0.3.5.dev0, numpy-1.19.5
  • pypy-3.8-v7.3.8, dill-0.3.5.dev0, numpy-1.19.5
  • pypy-3.9-v7.3.8, dill-0.3.5.dev0, numpy-1.19.5

NOT WITH:

  • pypy-3.6-v7.3.3, dill-0.3.5.dev0, numpy-1.19.5
  • python2.7, dill-0.3.5.dev0, numpy-1.16.6
  • python3.6, dill-0.3.5.dev0, numpy-1.19.5
  • python3.7, dill-0.3.5.dev0, numpy-1.21.5
  • python3.x, dill-0.3.5.dev0, numpy-1.22.2 (x=8,9,10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions