diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2024-05-07 14:16:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 14:16:05 (GMT) |
commit | 71080b8a0fe5da46fb97659060db76fd95a3fb61 (patch) | |
tree | 3551c62ad58d442e3764bd5d73d3d9ad60240a7c /Lib/typing.py | |
parent | a855f824a2f5a310ffa58a973a8fe9feaa2500b3 (diff) | |
download | cpython-71080b8a0fe5da46fb97659060db76fd95a3fb61.zip cpython-71080b8a0fe5da46fb97659060db76fd95a3fb61.tar.gz cpython-71080b8a0fe5da46fb97659060db76fd95a3fb61.tar.bz2 |
gh-118660: Add second type parameter to (Async)ContextManager (#118681)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Lib/typing.py')
-rw-r--r-- | Lib/typing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/typing.py b/Lib/typing.py index e485836..8e61f50 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -3783,7 +3783,7 @@ def __getattr__(attr): obj = _alias(getattr(re, attr), 1) elif attr in {"ContextManager", "AsyncContextManager"}: import contextlib - obj = _alias(getattr(contextlib, f"Abstract{attr}"), 1, name=attr) + obj = _alias(getattr(contextlib, f"Abstract{attr}"), 2, name=attr, defaults=(bool | None,)) else: raise AttributeError(f"module {__name__!r} has no attribute {attr!r}") globals()[attr] = obj |