[3.8] bpo-25872: Fix KeyError in linecache when multithreaded (GH-18007) (GH-20092)



Backporting to 3.8 and adding a NEWS item (I should have added one to the master branch -- oh well).
2 files changed