Author Nathan.Goldbaum
Recipients Nathan.Goldbaum, pitrou
Date 2020-02-19.15:50:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582127439.15.0.990157199509.issue39681@roundup.psfhosted.org>
In-reply-to
Content
In this case the tests are explicitly testing that a file-like object that does not implement readinto works with torch.load (which is using pickles under the hood). See https://github.com/pytorch/pytorch/blob/master/test/test_serialization.py#L416-L429, in particular the usage of FilelikeMock with has_readinto set to False.

This goes back to https://github.com/pytorch/pytorch/pull/5466, however I'm not sure offhand why it was decided to explicitly test file-like objects that don't implement readinto. I don't know how many consumers there are for this API in pytorch, but there is at least one user who has reported an error traceback caused by this change. I'm hoping to hear more to see whether there are any libraries that depend on pytorch and are implicitly depending on this functionality.

Googling the error message that Python3.8 emits in this situation also leads me to this bug report in a different library: https://github.com/web2py/py4web/issues/77
History
Date User Action Args
2020-02-19 15:50:39Nathan.Goldbaumsetrecipients: + Nathan.Goldbaum, pitrou
2020-02-19 15:50:39Nathan.Goldbaumsetmessageid: <1582127439.15.0.990157199509.issue39681@roundup.psfhosted.org>
2020-02-19 15:50:39Nathan.Goldbaumlinkissue39681 messages
2020-02-19 15:50:38Nathan.Goldbaumcreate