Skip to content

EntryPoint objects are not pickleable #96

Description

@jaraco

In GitLab by @asottile on Nov 29, 2019, 01:08

importlib-metadata==0.23, python3.6

>>> import pickle
>>> import importlib_metadata
>>> ep = importlib_metadata.EntryPoint('foo', 'bar', 'baz')
>>> pickle.dumps(ep)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 41, in __getnewargs__
  File "/home/asottile/workspace/flake8/venv/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 125, in __iter__
    return iter((self.name, self))
RecursionError: maximum recursion depth exceeded while calling a Python object

I'll need to do something else for flake8 it seems 🤔

Same happens in python3.8 -- should I report this to bpo instead for future issues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions