FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix compatibility of linecache with Python 3.13.12 and Python 3.14.3 · bpython/bpython@870e81c · GitHub

Commit 870e81c

Browse files
committed
Fix compatibility of linecache with Python 3.13.12 and Python 3.14.3
1 parent 4697efb commit 870e81c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎bpython/patch_linecache.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ def remember_bpython_input(self, source: str) -> str:
3636
)
3737
return filename
3838

39+
def get(self, key: Any, default: Any | None = None) -> Any:
40+
if self.is_bpython_filename(key):
41+
return self.get_bpython_history(key)
42+
return super().get(key, default)
43+
3944
def __getitem__(self, key: Any) -> Any:
4045
if self.is_bpython_filename(key):
4146
return self.get_bpython_history(key)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL