Skip to content

Commit d995001

Browse files
remove deprecated function
1 parent 57878fe commit d995001

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

yakut/__init__.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010

1111

1212
def _read_package_file(name: str) -> str:
13-
try:
14-
from importlib.resources import files # type: ignore
13+
from importlib.resources import files # type: ignore
1514

16-
return (files(__name__) / name).read_text(encoding="utf8") # type: ignore
17-
except ImportError: # This is for the old Pythons; read_text is deprecated in 3.11
18-
from importlib.resources import read_text # type: ignore
19-
20-
return read_text(__name__, name, encoding="utf8") # type: ignore
15+
return (files(__name__) / name).read_text(encoding="utf8") # type: ignore
2116

2217

2318
__version__: str = _read_package_file("VERSION").strip()

0 commit comments

Comments
 (0)