dist: Add linecache stubs for newer versions of Python

This commit is contained in:
rdb 2025-12-06 21:04:58 +01:00
parent 784f32d0b9
commit 6ada5071d5
1 changed files with 13 additions and 2 deletions

View File

@ -201,12 +201,23 @@ def getline(filename, lineno, module_globals=None):
return ''
def clearcache():
global cache
cache = {}
cache.clear()
def getlines(filename, module_globals=None):
return []
def _getline_from_code(filename, lineno):
return ''
def _make_key(code):
return (code.co_filename, code.co_qualname, code.co_firstlineno)
def _getlines_from_code(code):
return []
def _source_unavailable(filename):
return True
def checkcache(filename=None):
pass