Author Nathan.Goldbaum
Recipients Nathan.Goldbaum
Date 2020-02-19.01:04:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582074289.01.0.450273183434.issue39681@roundup.psfhosted.org>
In-reply-to
Content
As of https://github.com/python/cpython/pull/7076, it looks like at least the C implementation of pickle.load expects the file argument to implement readinto:

https://github.com/python/cpython/blob/ffd9753a944916ced659b2c77aebe66a6c9fbab5/Modules/_pickle.c#L1617-L1622

This is a change in behavior relative to previous versions of Python and I don't see it mentioned in PEP 574 or in the pull request so I'm not sure why it was changed.

This change breaks some PyTorch tests (see https://github.com/pytorch/pytorch/issues/32289) and, at least one PyTorch user, although I don't have full details there.

I can try to fix this on the PyTorch side but I first want to check that this was an intentional change on the Python side of things.
History
Date User Action Args
2020-02-19 01:04:49Nathan.Goldbaumsetrecipients: + Nathan.Goldbaum
2020-02-19 01:04:49Nathan.Goldbaumsetmessageid: <1582074289.01.0.450273183434.issue39681@roundup.psfhosted.org>
2020-02-19 01:04:48Nathan.Goldbaumlinkissue39681 messages
2020-02-19 01:04:48Nathan.Goldbaumcreate