From 723a23abfc100f93aaf8feb0a29461b7021d2401 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sun, 4 Oct 2020 14:49:49 -0700 Subject: [PATCH] contextlib: get rid of a TODO (#4610) This dates back three years to https://github.com/python/typeshed/pull/1249 It seems pretty unused in practice, so I think this is fine: https://grep.app/search?q=from%20contextlib%20import%20ContextManager&case=true https://grep.app/search?q=contextlib.ContextManager&case=true Co-authored-by: hauntsaninja <> --- stdlib/2and3/contextlib.pyi | 15 +-------------- tests/stubtest_whitelists/py3_common.txt | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/stdlib/2and3/contextlib.pyi b/stdlib/2and3/contextlib.pyi index c747ab547..083563b6b 100644 --- a/stdlib/2and3/contextlib.pyi +++ b/stdlib/2and3/contextlib.pyi @@ -1,19 +1,6 @@ -# ContextManager aliased here for backwards compatibility; TODO eventually remove this import sys from types import TracebackType -from typing import ( - IO, - Any, - Callable, - ContextManager as ContextManager, - Generic, - Iterable, - Iterator, - Optional, - Type, - TypeVar, - overload, -) +from typing import IO, Any, Callable, ContextManager, Generic, Iterable, Iterator, Optional, Type, TypeVar, overload if sys.version_info >= (3, 5): from typing import AsyncContextManager, AsyncIterator diff --git a/tests/stubtest_whitelists/py3_common.txt b/tests/stubtest_whitelists/py3_common.txt index 6ade2f693..c0691f5ea 100644 --- a/tests/stubtest_whitelists/py3_common.txt +++ b/tests/stubtest_whitelists/py3_common.txt @@ -102,7 +102,6 @@ configparser.SectionProxy.__getattr__ configparser.SectionProxy.getboolean configparser.SectionProxy.getfloat configparser.SectionProxy.getint -contextlib.ContextManager csv.Dialect.delimiter csv.Dialect.doublequote csv.Dialect.lineterminator