[Python-checkins] cleanup ababstractproperty in typing.py (GH-16432)

Ivan Levkivskyi webhook-mailer at python.org
Fri Sep 27 03:54:42 EDT 2019


https://github.com/python/cpython/commit/6ce03ec627680ce0829a5b3067fab7faed21b533
commit: 6ce03ec627680ce0829a5b3067fab7faed21b533
branch: master
author: HongWeipeng <961365124 at qq.com>
committer: Ivan Levkivskyi <levkivskyi at gmail.com>
date: 2019-09-27T08:54:26+01:00
summary:

cleanup ababstractproperty in typing.py (GH-16432)

files:
M Lib/typing.py

diff --git a/Lib/typing.py b/Lib/typing.py
index b1ac33e00e70..2c75a7696487 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -17,7 +17,7 @@
 * 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
 



More information about the Python-checkins mailing list