Irit Katriel <iritkatr...@yahoo.com> added the comment:
What is your environment - system and python version? I get this on master checkout on windows 10: Running Release|Win32 interpreter... Python 3.10.0a0 (heads/master:46e19b61d3, Aug 12 2020, 18:02:36) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> with open('functools.py', 'w') as f: ... f.write("print('This is so sad')") ... 23 >>> import linecache This is so sad Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\User\src\cpython\lib\linecache.py", line 11, in <module> import tokenize File "C:\Users\User\src\cpython\lib\tokenize.py", line 32, in <module> import re File "C:\Users\User\src\cpython\lib\re.py", line 315, in <module> @functools.lru_cache(_MAXCACHE) AttributeError: module 'functools' has no attribute 'lru_cache' >>> quit() C:\Users\User\src\cpython>del functools.py C:\Users\User\src\cpython>python Running Release|Win32 interpreter... Python 3.10.0a0 (heads/master:46e19b61d3, Aug 12 2020, 18:02:36) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> with open('tokenize.py', 'w') as f: ... f.write("print('This is so sad')") ... 23 >>> import linecache This is so sad >>> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41532> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com