[New-bugs-announce] [issue41966] datetime.time issue with pickling in PyPy

Dean report at bugs.python.org
Wed Oct 7 06:08:31 EDT 2020


New submission from Dean <scaram at gmail.com>:

I've run into an issue pickling a datetime.time subclass in PyPy3. I believe it arises because PyPy uses the pure Python implementation of time and time.__reduce_ex__() returns (time, ...) on this line (https://github.com/python/cpython/blob/044a1048ca93d466965afc027b91a5a9eb9ce23c/Lib/datetime.py#L1551) rather than (self.__class__, ...) as it does for datetime.datetime (and in datetime.date.__reduce__()). So when pickle creates the dump it uses the time class rather than my subclass.

----------
components: Library (Lib)
messages: 378155
nosy: belopolsky, ddddaaaa, p-ganssle
priority: normal
severity: normal
status: open
title: datetime.time issue with pickling in PyPy
type: behavior
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41966>
_______________________________________


More information about the New-bugs-announce mailing list