Skip to content

Commit

Permalink
Replace pkg_resources with importlib.resources
Browse files Browse the repository at this point in the history
pkg_resources is deprecated as an API, so let's replace it with importlib.resources. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  • Loading branch information
moi15moi authored and georgkrause committed Nov 19, 2024
1 parent 7e70f79 commit 677ad3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions langcodes/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pkg_resources import resource_filename
from importlib.resources import files

DATA_ROOT = resource_filename('langcodes', 'data')
DATA_ROOT = files('langcodes').joinpath('data')
import os


Expand Down

0 comments on commit 677ad3f

Please sign in to comment.