Skip to content

Commit 7785d04

Browse files
committed
importlib_resources for Python<3.9
1 parent 3a1bc51 commit 7785d04

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

setup.cfg

+7-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ classifiers =
2323
Operating System :: POSIX :: Linux
2424
Programming Language :: Python :: 3
2525
Programming Language :: Python :: 3 :: Only
26-
Programming Language :: Python :: 3.6
27-
Programming Language :: Python :: 3.7
26+
Programming Language :: Python :: 3.8
27+
Programming Language :: Python :: 3.9
28+
Programming Language :: Python :: 3.10
29+
Programming Language :: Python :: 3.11
30+
Programming Language :: Python :: 3.12
2831
Topic :: Education
2932
Topic :: Education :: Computer Aided Instruction (CAI)
3033
Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -39,13 +42,14 @@ install_requires =
3942
bs4
4043
fastapi
4144
# hfst # python3.8 + install using `apt-get install python3-hfst`
45+
importlib_resources
4246
nltk
4347
pandas
4448
pexpect
4549
sphinx_autodoc_typehints
4650
stanza>=1.1.1
4751
uvicorn
48-
python_requires = >2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
52+
python_requires = >2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*
4953
include_package_data = True
5054
package_dir =
5155
=src

src/udar/misc.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
from collections import namedtuple
44
from enum import Enum
5-
from importlib.resources import files
5+
try:
6+
from importlib.resources import files
7+
except ImportError:
8+
from importlib_resources import files # < Python 3.9
69
import os
710
from pathlib import Path
811
import re

0 commit comments

Comments
 (0)