mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
bpo-41966: Fix pickling pure datetime.time subclasses (GH-22731) (GH-22747)
(cherry picked from commit c304c9a7ef
)
Co-authored-by: scaramallion <scaramallion@users.noreply.github.com>
This commit is contained in:
parent
6a2aa4994e
commit
a055ced9d4
4 changed files with 7 additions and 1 deletions
|
@ -1579,7 +1579,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue