From 556582264aee1fcb8b80f2db77300dcac76b2e33 Mon Sep 17 00:00:00 2001 From: Aviv Palivoda Date: Sat, 26 Oct 2019 20:19:49 +0300 Subject: [PATCH] Temporary fix for linecache --- Lib/linecache.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/linecache.py b/Lib/linecache.py index 3afcce1f0..47885bfd5 100644 --- a/Lib/linecache.py +++ b/Lib/linecache.py @@ -133,8 +133,11 @@ def updatecache(filename, module_globals=None): else: return [] try: - with tokenize.open(fullname) as fp: - lines = fp.readlines() + # TODO: Change this back + # with tokenize.open(fullname) as fp: + # lines = fp.readlines() + with open(fullname, "r") as fp: + lines = fp.read().split("\n") except OSError: return [] if lines and not lines[-1].endswith('\n'):