[Python-checkins] bpo-39493: Fix definition of IO.closed in typing.py (#18265)

Shantanu webhook-mailer at python.org
Wed Jan 29 21:52:41 EST 2020


https://github.com/python/cpython/commit/2e6569b6692298fcc9aae0df3eb3181adb2a5099
commit: 2e6569b6692298fcc9aae0df3eb3181adb2a5099
branch: master
author: Shantanu <hauntsaninja at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-01-29T18:52:36-08:00
summary:

bpo-39493: Fix definition of IO.closed in typing.py (#18265)

files:
A Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst
M Lib/typing.py

diff --git a/Lib/typing.py b/Lib/typing.py
index 7de3e346eaa79..28c887ed35e0b 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -1831,6 +1831,7 @@ def name(self) -> str:
     def close(self) -> None:
         pass
 
+    @property
     @abstractmethod
     def closed(self) -> bool:
         pass
diff --git a/Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst b/Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst
new file mode 100644
index 0000000000000..b676629a4414a
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst
@@ -0,0 +1 @@
+Mark ``typing.IO.closed`` as a property
\ No newline at end of file



More information about the Python-checkins mailing list