From 94641f5a842dab52118038c8d4c4a4d68dabfa7d Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 1 Jan 2017 16:35:50 -0800 Subject: [PATCH] Revert "Make all single-constraint TypeVars to use bounds" (#806) Reverts python/typeshed#804. Reason: until python/mypy#1551 is fixed this gives an error whenever @skip() is used. Specifically see https://github.com/python/typeshed/pull/804#issuecomment-269926655. --- stdlib/2and3/plistlib.pyi | 2 +- stdlib/3/unittest/__init__.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2and3/plistlib.pyi b/stdlib/2and3/plistlib.pyi index 40a3f97e6..279019959 100644 --- a/stdlib/2and3/plistlib.pyi +++ b/stdlib/2and3/plistlib.pyi @@ -9,7 +9,7 @@ from enum import Enum import sys mm = MutableMapping[str, Any] -_D = TypeVar('_D', bound=mm) +_D = TypeVar('_D', mm) if sys.version_info >= (3,): _Path = str else: diff --git a/stdlib/3/unittest/__init__.pyi b/stdlib/3/unittest/__init__.pyi index 0d06e258b..0e074099f 100644 --- a/stdlib/3/unittest/__init__.pyi +++ b/stdlib/3/unittest/__init__.pyi @@ -12,7 +12,7 @@ from contextlib import ContextManager _T = TypeVar('_T') -_FT = TypeVar('_FT', bound=Callable[[Any], Any]) +_FT = TypeVar('_FT', Callable[[Any], Any]) def skip(reason: str) -> Callable[[_FT], _FT]: ...