From 01354a0a8320d0d6a5fd1378e6891bdc4e42687e Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 9 Jul 2024 21:49:05 +0200 Subject: [PATCH] Make it 3.9+, but get rid of deprecation warnings --- service/jargon/resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/jargon/resources.py b/service/jargon/resources.py index 0d3ecf871..5bdf4f798 100644 --- a/service/jargon/resources.py +++ b/service/jargon/resources.py @@ -17,8 +17,8 @@ # along with pyfa. If not, see . # ============================================================================= -import importlib.resources +from importlib.resources import files -DEFAULT_DATA = importlib.resources.open_text(__name__, 'defaults.yaml').read() -DEFAULT_HEADER = importlib.resources.open_text(__name__, 'header.yaml').read() +DEFAULT_DATA = files(__name__).joinpath('defaults.yaml').open('r', encoding='utf8').read() +DEFAULT_HEADER = files(__name__).joinpath('header.yaml').open('r', encoding='utf8').read()