Subject: [PATCH] Fixed test failures caused by Python 3.14.0a5

From: Alex Grönholm <[email-masked]>
Date: Sat, 15 Feb 2025 16:41:44 +0200

---
 docs/versionhistory.rst    |  1 +
 src/anyio/_core/_fileio.py | 15 ++++++++++-----
 tests/test_fileio.py       |  2 ++
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/anyio/_core/_fileio.py b/src/anyio/_core/_fileio.py
index 3728734c..350a873a 100644
--- a/src/anyio/_core/_fileio.py
+++ b/src/anyio/_core/_fileio.py
@@ -411,6 +412,10 @@ def match(self, path_pattern: str) -> bool:
 
     if sys.version_info >= (3, 14):
 
+        @property
+        def info(self) -> Any:  # TODO: add return type annotation when Typeshed gets it
+            return self._path.info
+
         async def copy(
             self,
             target: str | os.PathLike[str],
diff --git a/tests/test_fileio.py b/tests/test_fileio.py
index d7a769bd..28830e6e 100644
--- a/tests/test_fileio.py
+++ b/tests/test_fileio.py
@@ -106,6 +106,8 @@ async def test_properties(self) -> None:
         stdlib_properties.discard("__enter__")
         stdlib_properties.discard("__exit__")
         stdlib_properties.discard("__firstlineno__")
+        stdlib_properties.discard("__open_rb__")
+        stdlib_properties.discard("__open_wb__")
 
         async_path = Path(path)
         anyio_properties = {