Skip to content

Commit a4f81a6

Browse files
authored
1 parent edf41ae commit a4f81a6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

stdlib/sys/__init__.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ hexversion: int
4242
last_type: type[BaseException] | None
4343
last_value: BaseException | None
4444
last_traceback: TracebackType | None
45+
if sys.version_info >= (3, 12):
46+
last_exc: BaseException # or undefined.
4547
maxsize: int
4648
maxunicode: int
4749
meta_path: list[_MetaPathFinder]

tests/stubtest_allowlists/py312.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ types.GenericAlias.__mro_entries__
7676
sys._monitoring # Doesn't really exist. See comments in the stub.
7777
weakref.ProxyType.__reversed__ # Doesn't really exist
7878

79+
# sys attributes that are not always defined
80+
sys.last_exc
81+
7982
# C signature is broader than what is actually accepted
8083
ast.ExtSlice.__new__
8184
ast.Index.__new__

0 commit comments

Comments
 (0)