Skip to content

AttributeError module 'collections' has no attribute 'Iterator': Python 3.10 compatibility #73

@jklemm

Description

@jklemm

After upgrade to python 3.10, we're getting an error:

jsonpickle/util.py in is_iterator at line 338

def is_iterator(obj):
    is_file = False
    if not PY3:
        is_file = isinstance(obj, __builtin__.file)
    return (isinstance(obj, collections.Iterator) and
            not isinstance(obj, io.IOBase) and not is_file)

AttributeError
module 'collections' has no attribute 'Iterator'

Look like the jsonpickle==0.7.1 is not compatible with python 3.10.

Python 3.10 changes the collections import, read more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions