diff --git a/requirements.txt b/requirements.txt index a5786ee..70bfe08 100644 Binary files a/requirements.txt and b/requirements.txt differ diff --git a/src/app/core/configurations.py b/src/app/core/configurations.py index 5e1e06b..7b9e5a9 100644 --- a/src/app/core/configurations.py +++ b/src/app/core/configurations.py @@ -4,12 +4,22 @@ import platform from PyQt5.QtCore import QFile, QIODevice -from pkg_resources import resource_filename +from importlib.resources import files as _resource_files from app.data.models import Device from app.helpers.tools import Singleton, json_to_dict +def resource_filename(package: str, resource: str) -> str: + """Return a filesystem path to a resource bundled inside a package. + + Standard-library replacement for ``pkg_resources.resource_filename``, + which is unavailable once setuptools 81+ drops the ``pkg_resources`` + package. Uses ``importlib.resources`` (available since Python 3.9). + """ + return str(_resource_files(package).joinpath(resource)) + + class Application(metaclass=Singleton): __version__ = '1.4.0' __author__ = 'Azat Aldeshov'