Revert "Replace deprecated importlib.resources.path()"

importlib.resources.path() was undeprecated.

https://docs.python.org/3.13/whatsnew/3.13.html#importlib

This reverts commit f390b7da33.
This commit is contained in:
Chris Mayo 2024-08-21 19:34:37 +01:00
parent ecfd35b9e9
commit e095258856

View file

@ -386,8 +386,8 @@ def get_user_config():
)
if not os.path.exists(userconf):
# initial config (with all options explained)
with importlib.resources.as_file(importlib.resources.files(
f"{PACKAGE_NAME}.data").joinpath("linkcheckerrc")) as initialconf:
with importlib.resources.path(
f"{PACKAGE_NAME}.data", "linkcheckerrc") as initialconf:
# copy the initial configuration to the user configuration
try:
make_userdir(userconf)