]> granicus.if.org Git - python/commitdiff
cleanup ababstractproperty in typing.py (GH-16432)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 27 Sep 2019 08:13:38 +0000 (01:13 -0700)
committerGitHub <noreply@github.com>
Fri, 27 Sep 2019 08:13:38 +0000 (01:13 -0700)
(cherry picked from commit 6ce03ec627680ce0829a5b3067fab7faed21b533)

Co-authored-by: HongWeipeng <961365124@qq.com>
Lib/typing.py

index 048db3175e61d4871bda3e0d06da8260d134dcdc..825be10812deef992bad97687e65900ab7ca1007 100644 (file)
@@ -17,7 +17,7 @@ At large scale, the structure of the module is following:
 * Wrapper submodules for re and io related types.
 """
 
-from abc import abstractmethod, abstractproperty, ABCMeta
+from abc import abstractmethod, ABCMeta
 import collections
 import collections.abc
 import contextlib
@@ -1823,11 +1823,13 @@ class IO(Generic[AnyStr]):
 
     __slots__ = ()
 
-    @abstractproperty
+    @property
+    @abstractmethod
     def mode(self) -> str:
         pass
 
-    @abstractproperty
+    @property
+    @abstractmethod
     def name(self) -> str:
         pass
 
@@ -1923,23 +1925,28 @@ class TextIO(IO[str]):
 
     __slots__ = ()
 
-    @abstractproperty
+    @property
+    @abstractmethod
     def buffer(self) -> BinaryIO:
         pass
 
-    @abstractproperty
+    @property
+    @abstractmethod
     def encoding(self) -> str:
         pass
 
-    @abstractproperty
+    @property
+    @abstractmethod
     def errors(self) -> Optional[str]:
         pass
 
-    @abstractproperty
+    @property
+    @abstractmethod
     def line_buffering(self) -> bool:
         pass
 
-    @abstractproperty
+    @property
+    @abstractmethod
     def newlines(self) -> Any:
         pass