Replace pkg_resources with importlib.resources for Python 3.14 compatibility
This commit is contained in:
@@ -10,7 +10,7 @@ import pickle
|
||||
import re
|
||||
import traceback
|
||||
|
||||
import pkg_resources
|
||||
from importlib.resources import files as _resource_files
|
||||
|
||||
from ebook_converter.constants_old import config_dir
|
||||
from ebook_converter.constants_old import filesystem_encoding
|
||||
@@ -591,8 +591,7 @@ def exec_tweaks(path):
|
||||
|
||||
|
||||
def default_tweaks_raw():
|
||||
return pkg_resources.resource_filename('ebook_converter',
|
||||
'data/default_tweaks.py')
|
||||
return str(_resource_files('ebook_converter').joinpath('data/default_tweaks.py'))
|
||||
|
||||
|
||||
def read_tweaks():
|
||||
|
||||
Reference in New Issue
Block a user