summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShantanu <hauntsaninja@users.noreply.github.com>2020-01-30 02:52:36 (GMT)
committerGitHub <noreply@github.com>2020-01-30 02:52:36 (GMT)
commit2e6569b6692298fcc9aae0df3eb3181adb2a5099 (patch)
tree153784e011329092e5e5bd2d7b358890df8addca
parentd47d0c8e9f2ca0f9f5d1bf0b35006a9a4d5ca684 (diff)
downloadcpython-2e6569b6692298fcc9aae0df3eb3181adb2a5099.zip
cpython-2e6569b6692298fcc9aae0df3eb3181adb2a5099.tar.gz
cpython-2e6569b6692298fcc9aae0df3eb3181adb2a5099.tar.bz2
bpo-39493: Fix definition of IO.closed in typing.py (#18265)
-rw-r--r--Lib/typing.py1
-rw-r--r--Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst1
2 files changed, 2 insertions, 0 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index 7de3e34..28c887e 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -1831,6 +1831,7 @@ class IO(Generic[AnyStr]):
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 0000000..b676629
--- /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