Skip to content

Commit

Permalink
Merge pull request #1641 from PyCQA/entry-points-not-pickleable
Browse files Browse the repository at this point in the history
work around un-pickleabiliy of EntryPoint in 3.8.0
  • Loading branch information
asottile committed Aug 1, 2022
2 parents 91a7fa9 + b70d7a2 commit 446b18d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/flake8/_compat.py
Expand Up @@ -6,4 +6,11 @@
else: # pragma: no cover (<PY38)
import importlib_metadata

if sys.version_info[:3] == (3, 8, 0):
# backported from importlib.metadata in 3.8.1
importlib_metadata.EntryPoint.__reduce__ = lambda self: ( # type: ignore
type(self),
(self.name, self.value, self.group), # type: ignore
)

__all__ = ("importlib_metadata",)

0 comments on commit 446b18d

Please sign in to comment.