Fixed #27081 -- Allowed migrations to serialize methods on pypy.

This commit is contained in:
Tim Graham 2016-08-30 21:47:34 -04:00 committed by GitHub
parent 3f16e4df49
commit 96ee486ea4
1 changed files with 1 additions and 1 deletions

View File

@ -376,7 +376,7 @@ def serializer_factory(value):
return DecimalSerializer(value)
if isinstance(value, functools.partial):
return FunctoolsPartialSerializer(value)
if isinstance(value, (types.FunctionType, types.BuiltinFunctionType)):
if isinstance(value, (types.FunctionType, types.BuiltinFunctionType, types.MethodType)):
return FunctionTypeSerializer(value)
if isinstance(value, collections.Iterable):
return IterableSerializer(value)