From a055ced9d43630cadc3c1d5edab0884f2c5131ea Mon Sep 17 00:00:00 2001 From: "Miss Skeleton (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sun, 18 Oct 2020 08:32:56 -0700 Subject: bpo-41966: Fix pickling pure datetime.time subclasses (GH-22731) (GH-22747) (cherry picked from commit c304c9a7efa8751b5bc7526fa95cd5f30aac2b92) Co-authored-by: scaramallion --- Lib/datetime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/datetime.py') diff --git a/Lib/datetime.py b/Lib/datetime.py index 2294ac2b68..e508d996fb 100644 --- a/Lib/datetime.py +++ b/Lib/datetime.py @@ -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) -- cgit v1.2.1