]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39493: Fix definition of IO.closed in typing.py (#18265)
authorShantanu <hauntsaninja@users.noreply.github.com>
Thu, 30 Jan 2020 02:52:36 +0000 (18:52 -0800)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2020 02:52:36 +0000 (18:52 -0800)
Lib/typing.py
Misc/NEWS.d/next/Library/2020-01-30-01-13-19.bpo-39493.CbFRi7.rst [new file with mode: 0644]

index 7de3e346eaa79a4c069d6ea7443d24a8df7ca366..28c887ed35e0bbe4a35e99c7669fa4996707976e 100644 (file)
@@ -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 (file)
index 0000000..b676629
--- /dev/null
@@ -0,0 +1 @@
+Mark ``typing.IO.closed`` as a property
\ No newline at end of file