mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-31 19:26:52 +00:00
work around un-pickleabiliy of EntryPoint in 3.8.0
This commit is contained in:
parent
91a7fa9ac3
commit
b70d7a2f7d
1 changed files with 7 additions and 0 deletions
|
|
@ -6,4 +6,11 @@ if sys.version_info >= (3, 8): # pragma: no cover (PY38+)
|
|||
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",)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue