Skip to content

Commit

Permalink
Use importlib_resources on Python 3.7 and 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jun 27, 2024
1 parent c313d01 commit e2784d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions domdf_python_tools/compat/importlib_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
"""
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e2784d4

Please sign in to comment.