summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongWeipeng <961365124@qq.com>2019-09-27 07:54:26 (GMT)
committerIvan Levkivskyi <levkivskyi@gmail.com>2019-09-27 07:54:26 (GMT)
commit6ce03ec627680ce0829a5b3067fab7faed21b533 (patch)
tree21f76d7d66b4c8a7971c27a4a619e2acc26d0e5d
parent0bcbfa43d55d9558cdcb256d8998366281322080 (diff)
downloadcpython-6ce03ec627680ce0829a5b3067fab7faed21b533.zip
cpython-6ce03ec627680ce0829a5b3067fab7faed21b533.tar.gz
cpython-6ce03ec627680ce0829a5b3067fab7faed21b533.tar.bz2
cleanup ababstractproperty in typing.py (GH-16432)
-rw-r--r--Lib/typing.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index b1ac33e..2c75a76 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -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
@@ -1794,11 +1794,13 @@ class IO(Generic[AnyStr]):
__slots__ = ()
- @abstractproperty
+ @property
+ @abstractmethod
def mode(self) -> str:
pass
- @abstractproperty
+ @property
+ @abstractmethod
def name(self) -> str:
pass
@@ -1894,23 +1896,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