From e2784d40f8c90c056e87bc614a264ab6a537cd98 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Thu, 27 Jun 2024 16:34:04 +0100 Subject: [PATCH] Use importlib_resources on Python 3.7 and 3.8 --- domdf_python_tools/compat/importlib_resources.py | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/domdf_python_tools/compat/importlib_resources.py b/domdf_python_tools/compat/importlib_resources.py index bc5b5451..f7b66d4d 100644 --- a/domdf_python_tools/compat/importlib_resources.py +++ b/domdf_python_tools/compat/importlib_resources.py @@ -5,7 +5,7 @@ import sys from typing import Any, BinaryIO, TextIO -if sys.version_info[:2] < (3, 7): # pragma: no cover (py37+) +if sys.version_info[:2] < (3, 9): # pragma: no cover (py37+) # 3rd party import importlib_resources @@ -16,7 +16,7 @@ import importlib.resources globals().update(importlib.resources.__dict__) -if not ((3, 7) <= sys.version_info < (3, 11)): # pragma: no cover (py37 OR py38 OR py39 OR py310): +if not ((3, 9) <= sys.version_info < (3, 11)): # pragma: no cover (py39 OR py310): def _normalize_path(path: Any) -> str: """ diff --git a/requirements.txt b/requirements.txt index f228c8da..d38fb0b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ importlib-metadata>=3.6.0; python_version < "3.9" -importlib-resources>=3.0.0; python_version < "3.7" +importlib-resources>=3.0.0; python_version < "3.9" natsort>=7.0.1 typing-extensions>=3.7.4.1