Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloudpickle/cloudpickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def save_function_tuple(self, func):
'name': func.__name__,
'doc': func.__doc__,
}
if hasattr(func, '__annotations__') and sys.version_info >= (3, 7):
if hasattr(func, '__annotations__') and sys.version_info >= (3, 4):
state['annotations'] = func.__annotations__
if hasattr(func, '__qualname__'):
state['qualname'] = func.__qualname__
Expand Down
4 changes: 2 additions & 2 deletions tests/cloudpickle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,9 +1588,9 @@ def g():

self.assertEqual(f2.__doc__, f.__doc__)

@unittest.skipIf(sys.version_info < (3, 7),
@unittest.skipIf(sys.version_info < (3, 4),
"""This syntax won't work on py2 and pickling annotations
isn't supported for py36 and below.""")
isn't supported for py34 and below.""")
def test_wraps_preserves_function_annotations(self):
from functools import wraps

Expand Down