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.21:44:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
So I *think* I've pieced together what caused the user crash that originated in the flair library. It turns out that pickle.load, via torch.load, is getting passed an mmap.mmap.

Since mmap doesn't implement readinto, pickle.load objects as of Python 3.8. This is new behavior in Python3.8, it used to be possible to load a memory-mapped pickle file.

Short repro script:

import pickle
import mmap
data = "some data"

with open('my_data.pkl', 'wb') as f:
    pickle.dump(data, f)

with open("my_data.pkl", "r+b") as f_in:
    mm = mmap.mmap(f_in.fileno(), 0)


On Python3.8, this script prints an error, on Python3.7 it prints "some data".
Date User Action Args
2020-02-19 21:44:28Nathan.Goldbaumsetrecipients: + Nathan.Goldbaum, pitrou
2020-02-19 21:44:28Nathan.Goldbaumsetmessageid: <>
2020-02-19 21:44:28Nathan.Goldbaumlinkissue39681 messages
2020-02-19 21:44:28Nathan.Goldbaumcreate