Skip to content

Commit 15ddccf

Browse files
kdeleebluetech
authored andcommitted
importlib.readers not valid until python 3.10
This exists https://github.com/python/cpython/blob/3.10/Lib/importlib/readers.py and FileReader is in there This is a 404 https://github.com/python/cpython/blob/3.9/Lib/importlib/readers.py This change needs to get backported to the 7.0.z branch(s) too Fixes pytest-dev#9608
1 parent bc33ba0 commit 15ddccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/assertion/rewrite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def get_data(self, pathname: Union[str, bytes]) -> bytes:
273273
with open(pathname, "rb") as f:
274274
return f.read()
275275

276-
if sys.version_info >= (3, 9):
276+
if sys.version_info >= (3, 10):
277277

278278
def get_resource_reader(self, name: str) -> importlib.abc.TraversableResources: # type: ignore
279279
from types import SimpleNamespace

0 commit comments

Comments
 (0)