You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
typing.Generic-based type annotations cannot be loaded #196
Cloud pickle 0.5.5 now supports pickling of type annotations, but some of them cannot be pickled and loaded. Especially generic types that are based on base class Generic, like Sequence, Tuple, List, ...
importtypingimportcloudpicklecloudpickle.loads(cloudpickle.dumps(typing.Sequence)) # Sequence, not Sequence[int]
It looks like the arguments of __getitem__ get lost, and only the generic class is pickled -- here: Sequence, and not Sequence[int].
This leads to loading a class that inherits from typing.Generic, not typing.Generic[int] which raises the error (see typing.py line 948 where the error above is raised).
Activity
marcbllv commentedon Sep 6, 2018
Issue #193 may be related (pickling typing class with brackets)
SDK - Components - Hiding signature attribute from CloudPickle
Added comments
SDK - Components - Hiding signature attribute from CloudPickle (#2045)
py-cloudpickle: updated to 2.0.0