bpo-41966: Fix pickling pure datetime.time subclasses (GH-22731)

This commit is contained in:
scaramallion 2020-10-19 01:49:48 +11:00 committed by GitHub
parent a0c603cb9d
commit c304c9a7ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 1 deletions

View file

@ -1548,7 +1548,7 @@ class time:
self._tzinfo = tzinfo
def __reduce_ex__(self, protocol):
return (time, self._getstate(protocol))
return (self.__class__, self._getstate(protocol))
def __reduce__(self):
return self.__reduce_ex__(2)