This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Nathan.Goldbaum
Recipients Nathan.Goldbaum, pitrou
Date 2020-02-19.15:50:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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, in particular the usage of FilelikeMock with has_readinto set to False.

This goes back to, 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:
Date User Action Args
2020-02-19 15:50:39Nathan.Goldbaumsetrecipients: + Nathan.Goldbaum, pitrou
2020-02-19 15:50:39Nathan.Goldbaumsetmessageid: <>
2020-02-19 15:50:39Nathan.Goldbaumlinkissue39681 messages
2020-02-19 15:50:38Nathan.Goldbaumcreate