From 8afb89e5b7b3520833ba83e0b202d982dab01e04 Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 27 Jun 2024 11:45:52 +0300 Subject: [PATCH 1/2] backend: update all dependencies to latest --- backend/decky_loader/loader.py | 6 +- backend/poetry.lock | 155 +++++++++++++++++---------------- backend/pyproject.toml | 6 +- flake.lock | 18 ++-- 4 files changed, 93 insertions(+), 92 deletions(-) diff --git a/backend/decky_loader/loader.py b/backend/decky_loader/loader.py index 7881e4b1a..4fc032374 100644 --- a/backend/decky_loader/loader.py +++ b/backend/decky_loader/loader.py @@ -8,7 +8,7 @@ from aiohttp import web from os.path import exists -from watchdog.events import RegexMatchingEventHandler, DirCreatedEvent, DirModifiedEvent, FileCreatedEvent, FileModifiedEvent +from watchdog.events import RegexMatchingEventHandler, FileSystemEvent from watchdog.observers import Observer from typing import TYPE_CHECKING, List @@ -37,7 +37,7 @@ def maybe_reload(self, src_path: str): if exists(path.join(self.plugin_path, plugin_dir, "plugin.json")): self.queue.put_nowait((path.join(self.plugin_path, plugin_dir, "main.py"), plugin_dir, True)) - def on_created(self, event: DirCreatedEvent | FileCreatedEvent): + def on_created(self, event: FileSystemEvent): src_path = cast(str, event.src_path) #type: ignore # this is the correct type for this is in later versions of watchdog if "__pycache__" in src_path: return @@ -51,7 +51,7 @@ def on_created(self, event: DirCreatedEvent | FileCreatedEvent): self.logger.debug(f"file created: {src_path}") self.maybe_reload(src_path) - def on_modified(self, event: DirModifiedEvent | FileModifiedEvent): + def on_modified(self, event: FileSystemEvent): src_path = cast(str, event.src_path) # type: ignore if "__pycache__" in src_path: return diff --git a/backend/poetry.lock b/backend/poetry.lock index bc7b529c5..9a99d9dda 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiohttp" @@ -182,13 +182,13 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.6.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, + {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, ] [[package]] @@ -290,13 +290,13 @@ files = [ [[package]] name = "jinja2" -version = "3.1.3" +version = "3.1.4" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, ] [package.dependencies] @@ -489,27 +489,24 @@ files = [ [[package]] name = "nodeenv" -version = "1.8.0" +version = "1.9.1" description = "Node.js virtual environment builder" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ - {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, - {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, + {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, + {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, ] -[package.dependencies] -setuptools = "*" - [[package]] name = "packaging" -version = "23.2" +version = "24.1" description = "Core utilities for Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] [[package]] @@ -525,46 +522,47 @@ files = [ [[package]] name = "pyinstaller" -version = "5.13.2" +version = "6.8.0" description = "PyInstaller bundles a Python application and all its dependencies into a single package." optional = false -python-versions = "<3.13,>=3.7" +python-versions = "<3.13,>=3.8" files = [ - {file = "pyinstaller-5.13.2-py3-none-macosx_10_13_universal2.whl", hash = "sha256:16cbd66b59a37f4ee59373a003608d15df180a0d9eb1a29ff3bfbfae64b23d0f"}, - {file = "pyinstaller-5.13.2-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8f6dd0e797ae7efdd79226f78f35eb6a4981db16c13325e962a83395c0ec7420"}, - {file = "pyinstaller-5.13.2-py3-none-manylinux2014_i686.whl", hash = "sha256:65133ed89467edb2862036b35d7c5ebd381670412e1e4361215e289c786dd4e6"}, - {file = "pyinstaller-5.13.2-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:7d51734423685ab2a4324ab2981d9781b203dcae42839161a9ee98bfeaabdade"}, - {file = "pyinstaller-5.13.2-py3-none-manylinux2014_s390x.whl", hash = "sha256:2c2fe9c52cb4577a3ac39626b84cf16cf30c2792f785502661286184f162ae0d"}, - {file = "pyinstaller-5.13.2-py3-none-manylinux2014_x86_64.whl", hash = "sha256:c63ef6133eefe36c4b2f4daf4cfea3d6412ece2ca218f77aaf967e52a95ac9b8"}, - {file = "pyinstaller-5.13.2-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:aadafb6f213549a5906829bb252e586e2cf72a7fbdb5731810695e6516f0ab30"}, - {file = "pyinstaller-5.13.2-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:b2e1c7f5cceb5e9800927ddd51acf9cc78fbaa9e79e822c48b0ee52d9ce3c892"}, - {file = "pyinstaller-5.13.2-py3-none-win32.whl", hash = "sha256:421cd24f26144f19b66d3868b49ed673176765f92fa9f7914cd2158d25b6d17e"}, - {file = "pyinstaller-5.13.2-py3-none-win_amd64.whl", hash = "sha256:ddcc2b36052a70052479a9e5da1af067b4496f43686ca3cdda99f8367d0627e4"}, - {file = "pyinstaller-5.13.2-py3-none-win_arm64.whl", hash = "sha256:27cd64e7cc6b74c5b1066cbf47d75f940b71356166031deb9778a2579bb874c6"}, - {file = "pyinstaller-5.13.2.tar.gz", hash = "sha256:c8e5d3489c3a7cc5f8401c2d1f48a70e588f9967e391c3b06ddac1f685f8d5d2"}, + {file = "pyinstaller-6.8.0-py3-none-macosx_10_13_universal2.whl", hash = "sha256:5ff6bc2784c1026f8e2f04aa3760cbed41408e108a9d4cf1dd52ee8351a3f6e1"}, + {file = "pyinstaller-6.8.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:39ac424d2ee2457d2ab11a5091436e75a0cccae207d460d180aa1fcbbafdd528"}, + {file = "pyinstaller-6.8.0-py3-none-manylinux2014_i686.whl", hash = "sha256:355832a3acc7de90a255ecacd4b9f9e166a547a79c8905d49f14e3a75c1acdb9"}, + {file = "pyinstaller-6.8.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:6303c7a009f47e6a96ef65aed49f41e36ece8d079b9193ca92fe807403e5fe80"}, + {file = "pyinstaller-6.8.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2b71509468c811968c0b5decb5bbe85b6292ea52d7b1f26313d2aabb673fa9a5"}, + {file = "pyinstaller-6.8.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ff31c5b99e05a4384bbe2071df67ec8b2b347640a375eae9b40218be2f1754c6"}, + {file = "pyinstaller-6.8.0-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:000c36b13fe4cd8d0d8c2bc855b1ddcf39867b5adf389e6b5ca45b25fa3e619d"}, + {file = "pyinstaller-6.8.0-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:fe0af018d7d5077180e3144ada89a4da5df8d07716eb7e9482834a56dc57a4e8"}, + {file = "pyinstaller-6.8.0-py3-none-win32.whl", hash = "sha256:d257f6645c7334cbd66f38a4fac62c3ad614cc46302b2b5d9f8cc48c563bce0e"}, + {file = "pyinstaller-6.8.0-py3-none-win_amd64.whl", hash = "sha256:81cccfa9b16699b457f4788c5cc119b50f3cd4d0db924955f15c33f2ad27a50d"}, + {file = "pyinstaller-6.8.0-py3-none-win_arm64.whl", hash = "sha256:1c3060a263758cf7f0144ab4c016097b20451b2469d468763414665db1bb743d"}, + {file = "pyinstaller-6.8.0.tar.gz", hash = "sha256:3f4b6520f4423fe19bcc2fd63ab7238851ae2bdcbc98f25bc5d2f97cc62012e9"}, ] [package.dependencies] altgraph = "*" macholib = {version = ">=1.8", markers = "sys_platform == \"darwin\""} +packaging = ">=22.0" pefile = {version = ">=2022.5.30", markers = "sys_platform == \"win32\""} -pyinstaller-hooks-contrib = ">=2021.4" +pyinstaller-hooks-contrib = ">=2024.6" pywin32-ctypes = {version = ">=0.2.1", markers = "sys_platform == \"win32\""} setuptools = ">=42.0.0" [package.extras] -encryption = ["tinyaes (>=1.0.0)"] +completion = ["argcomplete"] hook-testing = ["execnet (>=1.5.0)", "psutil", "pytest (>=2.7.3)"] [[package]] name = "pyinstaller-hooks-contrib" -version = "2024.5" +version = "2024.7" description = "Community maintained hooks for PyInstaller" optional = false python-versions = ">=3.7" files = [ - {file = "pyinstaller_hooks_contrib-2024.5-py2.py3-none-any.whl", hash = "sha256:0852249b7fb1e9394f8f22af2c22fa5294c2c0366157969f98c96df62410c4c6"}, - {file = "pyinstaller_hooks_contrib-2024.5.tar.gz", hash = "sha256:aa5dee25ea7ca317ad46fa16b5afc8dba3b0e43f2847e498930138885efd3cab"}, + {file = "pyinstaller_hooks_contrib-2024.7-py2.py3-none-any.whl", hash = "sha256:8bf0775771fbaf96bcd2f4dfd6f7ae6c1dd1b1efe254c7e50477b3c08e7841d8"}, + {file = "pyinstaller_hooks_contrib-2024.7.tar.gz", hash = "sha256:fd5f37dcf99bece184e40642af88be16a9b89613ecb958a8bd1136634fc9fac5"}, ] [package.dependencies] @@ -573,13 +571,13 @@ setuptools = ">=42.0.0" [[package]] name = "pyright" -version = "1.1.361" +version = "1.1.369" description = "Command line wrapper for pyright" optional = false python-versions = ">=3.7" files = [ - {file = "pyright-1.1.361-py3-none-any.whl", hash = "sha256:c50fc94ce92b5c958cfccbbe34142e7411d474da43d6c14a958667e35b9df7ea"}, - {file = "pyright-1.1.361.tar.gz", hash = "sha256:1d67933315666b05d230c85ea8fb97aaa2056e4092a13df87b7765bb9e8f1a8d"}, + {file = "pyright-1.1.369-py3-none-any.whl", hash = "sha256:06d5167a8d7be62523ced0265c5d2f1e022e110caf57a25d92f50fb2d07bcda0"}, + {file = "pyright-1.1.369.tar.gz", hash = "sha256:ad290710072d021e213b98cc7a2f90ae3a48609ef5b978f749346d1a47eb9af8"}, ] [package.dependencies] @@ -602,55 +600,58 @@ files = [ [[package]] name = "setuptools" -version = "69.5.1" +version = "70.1.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, - {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, + {file = "setuptools-70.1.1-py3-none-any.whl", hash = "sha256:a58a8fde0541dab0419750bcc521fbdf8585f6e5cb41909df3a472ef7b81ca95"}, + {file = "setuptools-70.1.1.tar.gz", hash = "sha256:937a48c7cdb7a21eb53cd7f9b59e525503aa8abaf3584c730dc5f7a5bec3a650"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.10.0)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "watchdog" -version = "2.3.1" +version = "4.0.1" description = "Filesystem events monitoring" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "watchdog-2.3.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d1f1200d4ec53b88bf04ab636f9133cb703eb19768a39351cee649de21a33697"}, - {file = "watchdog-2.3.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:564e7739abd4bd348aeafbf71cc006b6c0ccda3160c7053c4a53b67d14091d42"}, - {file = "watchdog-2.3.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:95ad708a9454050a46f741ba5e2f3468655ea22da1114e4c40b8cbdaca572565"}, - {file = "watchdog-2.3.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a073c91a6ef0dda488087669586768195c3080c66866144880f03445ca23ef16"}, - {file = "watchdog-2.3.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aa8b028750b43e80eea9946d01925168eeadb488dfdef1d82be4b1e28067f375"}, - {file = "watchdog-2.3.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:964fd236cd443933268ae49b59706569c8b741073dbfd7ca705492bae9d39aab"}, - {file = "watchdog-2.3.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:91fd146d723392b3e6eb1ac21f122fcce149a194a2ba0a82c5e4d0ee29cd954c"}, - {file = "watchdog-2.3.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:efe3252137392a471a2174d721e1037a0e6a5da7beb72a021e662b7000a9903f"}, - {file = "watchdog-2.3.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:85bf2263290591b7c5fa01140601b64c831be88084de41efbcba6ea289874f44"}, - {file = "watchdog-2.3.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8f2df370cd8e4e18499dd0bfdef476431bcc396108b97195d9448d90924e3131"}, - {file = "watchdog-2.3.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ea5d86d1bcf4a9d24610aa2f6f25492f441960cf04aed2bd9a97db439b643a7b"}, - {file = "watchdog-2.3.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6f5d0f7eac86807275eba40b577c671b306f6f335ba63a5c5a348da151aba0fc"}, - {file = "watchdog-2.3.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b848c71ef2b15d0ef02f69da8cc120d335cec0ed82a3fa7779e27a5a8527225"}, - {file = "watchdog-2.3.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0d9878be36d2b9271e3abaa6f4f051b363ff54dbbe7e7df1af3c920e4311ee43"}, - {file = "watchdog-2.3.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4cd61f98cb37143206818cb1786d2438626aa78d682a8f2ecee239055a9771d5"}, - {file = "watchdog-2.3.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3d2dbcf1acd96e7a9c9aefed201c47c8e311075105d94ce5e899f118155709fd"}, - {file = "watchdog-2.3.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:03f342a9432fe08107defbe8e405a2cb922c5d00c4c6c168c68b633c64ce6190"}, - {file = "watchdog-2.3.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7a596f9415a378d0339681efc08d2249e48975daae391d58f2e22a3673b977cf"}, - {file = "watchdog-2.3.1-py3-none-manylinux2014_armv7l.whl", hash = "sha256:0e1dd6d449267cc7d6935d7fe27ee0426af6ee16578eed93bacb1be9ff824d2d"}, - {file = "watchdog-2.3.1-py3-none-manylinux2014_i686.whl", hash = "sha256:7a1876f660e32027a1a46f8a0fa5747ad4fcf86cb451860eae61a26e102c8c79"}, - {file = "watchdog-2.3.1-py3-none-manylinux2014_ppc64.whl", hash = "sha256:2caf77ae137935c1466f8cefd4a3aec7017b6969f425d086e6a528241cba7256"}, - {file = "watchdog-2.3.1-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:53f3e95081280898d9e4fc51c5c69017715929e4eea1ab45801d5e903dd518ad"}, - {file = "watchdog-2.3.1-py3-none-manylinux2014_s390x.whl", hash = "sha256:9da7acb9af7e4a272089bd2af0171d23e0d6271385c51d4d9bde91fe918c53ed"}, - {file = "watchdog-2.3.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:8a4d484e846dcd75e96b96d80d80445302621be40e293bfdf34a631cab3b33dc"}, - {file = "watchdog-2.3.1-py3-none-win32.whl", hash = "sha256:a74155398434937ac2780fd257c045954de5b11b5c52fc844e2199ce3eecf4cf"}, - {file = "watchdog-2.3.1-py3-none-win_amd64.whl", hash = "sha256:5defe4f0918a2a1a4afbe4dbb967f743ac3a93d546ea4674567806375b024adb"}, - {file = "watchdog-2.3.1-py3-none-win_ia64.whl", hash = "sha256:4109cccf214b7e3462e8403ab1e5b17b302ecce6c103eb2fc3afa534a7f27b96"}, - {file = "watchdog-2.3.1.tar.gz", hash = "sha256:d9f9ed26ed22a9d331820a8432c3680707ea8b54121ddcc9dc7d9f2ceeb36906"}, + {file = "watchdog-4.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:da2dfdaa8006eb6a71051795856bedd97e5b03e57da96f98e375682c48850645"}, + {file = "watchdog-4.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e93f451f2dfa433d97765ca2634628b789b49ba8b504fdde5837cdcf25fdb53b"}, + {file = "watchdog-4.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ef0107bbb6a55f5be727cfc2ef945d5676b97bffb8425650dadbb184be9f9a2b"}, + {file = "watchdog-4.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:17e32f147d8bf9657e0922c0940bcde863b894cd871dbb694beb6704cfbd2fb5"}, + {file = "watchdog-4.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:03e70d2df2258fb6cb0e95bbdbe06c16e608af94a3ffbd2b90c3f1e83eb10767"}, + {file = "watchdog-4.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:123587af84260c991dc5f62a6e7ef3d1c57dfddc99faacee508c71d287248459"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:093b23e6906a8b97051191a4a0c73a77ecc958121d42346274c6af6520dec175"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:611be3904f9843f0529c35a3ff3fd617449463cb4b73b1633950b3d97fa4bfb7"}, + {file = "watchdog-4.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:62c613ad689ddcb11707f030e722fa929f322ef7e4f18f5335d2b73c61a85c28"}, + {file = "watchdog-4.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:d4925e4bf7b9bddd1c3de13c9b8a2cdb89a468f640e66fbfabaf735bd85b3e35"}, + {file = "watchdog-4.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cad0bbd66cd59fc474b4a4376bc5ac3fc698723510cbb64091c2a793b18654db"}, + {file = "watchdog-4.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a3c2c317a8fb53e5b3d25790553796105501a235343f5d2bf23bb8649c2c8709"}, + {file = "watchdog-4.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c9904904b6564d4ee8a1ed820db76185a3c96e05560c776c79a6ce5ab71888ba"}, + {file = "watchdog-4.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:667f3c579e813fcbad1b784db7a1aaa96524bed53437e119f6a2f5de4db04235"}, + {file = "watchdog-4.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d10a681c9a1d5a77e75c48a3b8e1a9f2ae2928eda463e8d33660437705659682"}, + {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0144c0ea9997b92615af1d94afc0c217e07ce2c14912c7b1a5731776329fcfc7"}, + {file = "watchdog-4.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:998d2be6976a0ee3a81fb8e2777900c28641fb5bfbd0c84717d89bca0addcdc5"}, + {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e7921319fe4430b11278d924ef66d4daa469fafb1da679a2e48c935fa27af193"}, + {file = "watchdog-4.0.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:f0de0f284248ab40188f23380b03b59126d1479cd59940f2a34f8852db710625"}, + {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:bca36be5707e81b9e6ce3208d92d95540d4ca244c006b61511753583c81c70dd"}, + {file = "watchdog-4.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ab998f567ebdf6b1da7dc1e5accfaa7c6992244629c0fdaef062f43249bd8dee"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:dddba7ca1c807045323b6af4ff80f5ddc4d654c8bce8317dde1bd96b128ed253"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_armv7l.whl", hash = "sha256:4513ec234c68b14d4161440e07f995f231be21a09329051e67a2118a7a612d2d"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_i686.whl", hash = "sha256:4107ac5ab936a63952dea2a46a734a23230aa2f6f9db1291bf171dac3ebd53c6"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64.whl", hash = "sha256:6e8c70d2cd745daec2a08734d9f63092b793ad97612470a0ee4cbb8f5f705c57"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:f27279d060e2ab24c0aa98363ff906d2386aa6c4dc2f1a374655d4e02a6c5e5e"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_s390x.whl", hash = "sha256:f8affdf3c0f0466e69f5b3917cdd042f89c8c63aebdb9f7c078996f607cdb0f5"}, + {file = "watchdog-4.0.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:ac7041b385f04c047fcc2951dc001671dee1b7e0615cde772e84b01fbf68ee84"}, + {file = "watchdog-4.0.1-py3-none-win32.whl", hash = "sha256:206afc3d964f9a233e6ad34618ec60b9837d0582b500b63687e34011e15bb429"}, + {file = "watchdog-4.0.1-py3-none-win_amd64.whl", hash = "sha256:7577b3c43e5909623149f76b099ac49a1a01ca4e167d1785c76eb52fa585745a"}, + {file = "watchdog-4.0.1-py3-none-win_ia64.whl", hash = "sha256:d7b9f5f3299e8dd230880b6c55504a1f69cf1e4316275d1b215ebdd8187ec88d"}, + {file = "watchdog-4.0.1.tar.gz", hash = "sha256:eebaacf674fa25511e8867028d281e602ee6500045b57f43b08778082f7f8b44"}, ] [package.extras] @@ -762,4 +763,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "b87af38959be15deb2e6af33ab7cb70e502d20ebeabaae0348f816bc4ee736c6" +content-hash = "1d379cbadab535087a57eaa9ffc3d0af01b5274dac8df54080a39949c11f2003" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 60a030a78..0d5b65b0c 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -16,13 +16,13 @@ python = ">=3.10,<3.13" aiohttp = "^3.9.5" aiohttp-jinja2 = "^1.5.1" aiohttp-cors = "^0.7.0" -watchdog = "^2.1.7" +watchdog = "^4" certifi = "*" -packaging = "^23.2" +packaging = "^24" multidict = "^6.0.5" [tool.poetry.group.dev.dependencies] -pyinstaller = "^5.13.0" +pyinstaller = "^6.8.0" pyright = "^1.1.335" [tool.poetry.scripts] diff --git a/flake.lock b/flake.lock index e4cebc16f..ac0c4a45d 100644 --- a/flake.lock +++ b/flake.lock @@ -59,11 +59,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1714763106, - "narHash": "sha256-DrDHo74uTycfpAF+/qxZAMlP/Cpe04BVioJb6fdI0YY=", + "lastModified": 1719254875, + "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e9be42459999a253a9f92559b1f5b72e1b44c13d", + "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", "type": "github" }, "original": { @@ -84,11 +84,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1714855626, - "narHash": "sha256-fqvhXqJVykGHr6OHJ2eLhmNr76vKYqrEnXErLJ5eUe8=", + "lastModified": 1719395064, + "narHash": "sha256-SsutCU+IytywS9HHGKtVZaGINcm6lpHXcyJzy7Rv0Co=", "owner": "nix-community", "repo": "poetry2nix", - "rev": "c8766d12a9efd0467998b887d6de6d838091f2b9", + "rev": "0e52508053e3dcb568bf432a144bff367978d199", "type": "github" }, "original": { @@ -156,11 +156,11 @@ ] }, "locked": { - "lastModified": 1714058656, - "narHash": "sha256-Qv4RBm4LKuO4fNOfx9wl40W2rBbv5u5m+whxRYUMiaA=", + "lastModified": 1718522839, + "narHash": "sha256-ULzoKzEaBOiLRtjeY3YoGFJMwWSKRYOic6VNw2UyTls=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "c6aaf729f34a36c445618580a9f95a48f5e4e03f", + "rev": "68eb1dc333ce82d0ab0c0357363ea17c31ea1f81", "type": "github" }, "original": { From d5074fb94f9b352307bdfbe8bbab3e33be5d21fe Mon Sep 17 00:00:00 2001 From: K900 Date: Thu, 27 Jun 2024 11:46:47 +0300 Subject: [PATCH 2/2] treewide: fix package structure The static files need to be inside the module to be installed correctly as part of the module. --- .gitignore | 2 +- backend/decky_loader/loader.py | 4 ++-- backend/{ => decky_loader}/locales/ar-AA.json | 0 backend/{ => decky_loader}/locales/bg-BG.json | 0 backend/{ => decky_loader}/locales/cs-CZ.json | 0 backend/{ => decky_loader}/locales/de-DE.json | 0 backend/{ => decky_loader}/locales/el-GR.json | 0 backend/{ => decky_loader}/locales/en-US.json | 0 backend/{ => decky_loader}/locales/es-ES.json | 0 backend/{ => decky_loader}/locales/fi-FI.json | 0 backend/{ => decky_loader}/locales/fr-FR.json | 0 backend/{ => decky_loader}/locales/it-IT.json | 0 backend/{ => decky_loader}/locales/ja-JP.json | 0 backend/{ => decky_loader}/locales/ko-KR.json | 0 backend/{ => decky_loader}/locales/nl-NL.json | 0 backend/{ => decky_loader}/locales/pl-PL.json | 0 backend/{ => decky_loader}/locales/pt-BR.json | 0 backend/{ => decky_loader}/locales/pt-PT.json | 0 backend/{ => decky_loader}/locales/ru-RU.json | 0 backend/{ => decky_loader}/locales/sq-AL.json | 0 backend/{ => decky_loader}/locales/sv-SE.json | 0 backend/{ => decky_loader}/locales/tr-TR.json | 0 backend/{ => decky_loader}/locales/uk-UA.json | 0 backend/{ => decky_loader}/locales/zh-CN.json | 0 backend/{ => decky_loader}/locales/zh-TW.json | 0 backend/decky_loader/main.py | 2 +- backend/pyinstaller.spec | 4 ++-- backend/pyproject.toml | 5 ++++- frontend/i18next-parser.config.mjs | 2 +- frontend/rollup.config.js | 4 ++-- 30 files changed, 13 insertions(+), 10 deletions(-) rename backend/{ => decky_loader}/locales/ar-AA.json (100%) rename backend/{ => decky_loader}/locales/bg-BG.json (100%) rename backend/{ => decky_loader}/locales/cs-CZ.json (100%) rename backend/{ => decky_loader}/locales/de-DE.json (100%) rename backend/{ => decky_loader}/locales/el-GR.json (100%) rename backend/{ => decky_loader}/locales/en-US.json (100%) rename backend/{ => decky_loader}/locales/es-ES.json (100%) rename backend/{ => decky_loader}/locales/fi-FI.json (100%) rename backend/{ => decky_loader}/locales/fr-FR.json (100%) rename backend/{ => decky_loader}/locales/it-IT.json (100%) rename backend/{ => decky_loader}/locales/ja-JP.json (100%) rename backend/{ => decky_loader}/locales/ko-KR.json (100%) rename backend/{ => decky_loader}/locales/nl-NL.json (100%) rename backend/{ => decky_loader}/locales/pl-PL.json (100%) rename backend/{ => decky_loader}/locales/pt-BR.json (100%) rename backend/{ => decky_loader}/locales/pt-PT.json (100%) rename backend/{ => decky_loader}/locales/ru-RU.json (100%) rename backend/{ => decky_loader}/locales/sq-AL.json (100%) rename backend/{ => decky_loader}/locales/sv-SE.json (100%) rename backend/{ => decky_loader}/locales/tr-TR.json (100%) rename backend/{ => decky_loader}/locales/uk-UA.json (100%) rename backend/{ => decky_loader}/locales/zh-CN.json (100%) rename backend/{ => decky_loader}/locales/zh-TW.json (100%) diff --git a/.gitignore b/.gitignore index 2b0cc95eb..f9a954e08 100644 --- a/.gitignore +++ b/.gitignore @@ -153,7 +153,7 @@ dmypy.json cython_debug/ # static files are built -backend/static +backend/decky_loader/static # ignore settings.json # prevents leaking login details diff --git a/backend/decky_loader/loader.py b/backend/decky_loader/loader.py index 4fc032374..e8a073a9c 100644 --- a/backend/decky_loader/loader.py +++ b/backend/decky_loader/loader.py @@ -106,12 +106,12 @@ async def enable_reload_wait(self): self.watcher.disabled = False async def handle_frontend_assets(self, request: web.Request): - file = Path(__file__).parents[1].joinpath("static").joinpath(request.match_info["path"]) + file = Path(__file__).parent.joinpath("static").joinpath(request.match_info["path"]) return web.FileResponse(file, headers={"Cache-Control": "no-cache"}) async def handle_frontend_locales(self, request: web.Request): req_lang = request.match_info["path"] - file = Path(__file__).parents[1].joinpath("locales").joinpath(req_lang) + file = Path(__file__).parent.joinpath("locales").joinpath(req_lang) if exists(file): return web.FileResponse(file, headers={"Cache-Control": "no-cache", "Content-Type": "application/json"}) else: diff --git a/backend/locales/ar-AA.json b/backend/decky_loader/locales/ar-AA.json similarity index 100% rename from backend/locales/ar-AA.json rename to backend/decky_loader/locales/ar-AA.json diff --git a/backend/locales/bg-BG.json b/backend/decky_loader/locales/bg-BG.json similarity index 100% rename from backend/locales/bg-BG.json rename to backend/decky_loader/locales/bg-BG.json diff --git a/backend/locales/cs-CZ.json b/backend/decky_loader/locales/cs-CZ.json similarity index 100% rename from backend/locales/cs-CZ.json rename to backend/decky_loader/locales/cs-CZ.json diff --git a/backend/locales/de-DE.json b/backend/decky_loader/locales/de-DE.json similarity index 100% rename from backend/locales/de-DE.json rename to backend/decky_loader/locales/de-DE.json diff --git a/backend/locales/el-GR.json b/backend/decky_loader/locales/el-GR.json similarity index 100% rename from backend/locales/el-GR.json rename to backend/decky_loader/locales/el-GR.json diff --git a/backend/locales/en-US.json b/backend/decky_loader/locales/en-US.json similarity index 100% rename from backend/locales/en-US.json rename to backend/decky_loader/locales/en-US.json diff --git a/backend/locales/es-ES.json b/backend/decky_loader/locales/es-ES.json similarity index 100% rename from backend/locales/es-ES.json rename to backend/decky_loader/locales/es-ES.json diff --git a/backend/locales/fi-FI.json b/backend/decky_loader/locales/fi-FI.json similarity index 100% rename from backend/locales/fi-FI.json rename to backend/decky_loader/locales/fi-FI.json diff --git a/backend/locales/fr-FR.json b/backend/decky_loader/locales/fr-FR.json similarity index 100% rename from backend/locales/fr-FR.json rename to backend/decky_loader/locales/fr-FR.json diff --git a/backend/locales/it-IT.json b/backend/decky_loader/locales/it-IT.json similarity index 100% rename from backend/locales/it-IT.json rename to backend/decky_loader/locales/it-IT.json diff --git a/backend/locales/ja-JP.json b/backend/decky_loader/locales/ja-JP.json similarity index 100% rename from backend/locales/ja-JP.json rename to backend/decky_loader/locales/ja-JP.json diff --git a/backend/locales/ko-KR.json b/backend/decky_loader/locales/ko-KR.json similarity index 100% rename from backend/locales/ko-KR.json rename to backend/decky_loader/locales/ko-KR.json diff --git a/backend/locales/nl-NL.json b/backend/decky_loader/locales/nl-NL.json similarity index 100% rename from backend/locales/nl-NL.json rename to backend/decky_loader/locales/nl-NL.json diff --git a/backend/locales/pl-PL.json b/backend/decky_loader/locales/pl-PL.json similarity index 100% rename from backend/locales/pl-PL.json rename to backend/decky_loader/locales/pl-PL.json diff --git a/backend/locales/pt-BR.json b/backend/decky_loader/locales/pt-BR.json similarity index 100% rename from backend/locales/pt-BR.json rename to backend/decky_loader/locales/pt-BR.json diff --git a/backend/locales/pt-PT.json b/backend/decky_loader/locales/pt-PT.json similarity index 100% rename from backend/locales/pt-PT.json rename to backend/decky_loader/locales/pt-PT.json diff --git a/backend/locales/ru-RU.json b/backend/decky_loader/locales/ru-RU.json similarity index 100% rename from backend/locales/ru-RU.json rename to backend/decky_loader/locales/ru-RU.json diff --git a/backend/locales/sq-AL.json b/backend/decky_loader/locales/sq-AL.json similarity index 100% rename from backend/locales/sq-AL.json rename to backend/decky_loader/locales/sq-AL.json diff --git a/backend/locales/sv-SE.json b/backend/decky_loader/locales/sv-SE.json similarity index 100% rename from backend/locales/sv-SE.json rename to backend/decky_loader/locales/sv-SE.json diff --git a/backend/locales/tr-TR.json b/backend/decky_loader/locales/tr-TR.json similarity index 100% rename from backend/locales/tr-TR.json rename to backend/decky_loader/locales/tr-TR.json diff --git a/backend/locales/uk-UA.json b/backend/decky_loader/locales/uk-UA.json similarity index 100% rename from backend/locales/uk-UA.json rename to backend/decky_loader/locales/uk-UA.json diff --git a/backend/locales/zh-CN.json b/backend/decky_loader/locales/zh-CN.json similarity index 100% rename from backend/locales/zh-CN.json rename to backend/decky_loader/locales/zh-CN.json diff --git a/backend/locales/zh-TW.json b/backend/decky_loader/locales/zh-TW.json similarity index 100% rename from backend/locales/zh-TW.json rename to backend/decky_loader/locales/zh-TW.json diff --git a/backend/decky_loader/main.py b/backend/decky_loader/main.py index a1e683dac..fe93c11bd 100644 --- a/backend/decky_loader/main.py +++ b/backend/decky_loader/main.py @@ -88,7 +88,7 @@ async def startup(_: Application): for route in list(self.web_app.router.routes()): self.cors.add(route) # pyright: ignore [reportUnknownMemberType] - self.web_app.add_routes([static("/static", path.join(path.dirname(__file__), '..', 'static'))]) + self.web_app.add_routes([static("/static", path.join(path.dirname(__file__), 'static'))]) def exception_handler(self, loop: AbstractEventLoop, context: Dict[str, str]): if context["message"] == "Unclosed connection": diff --git a/backend/pyinstaller.spec b/backend/pyinstaller.spec index a9eba6a4f..91ff4e5b3 100644 --- a/backend/pyinstaller.spec +++ b/backend/pyinstaller.spec @@ -6,8 +6,8 @@ from PyInstaller.utils.hooks import copy_metadata a = Analysis( ['main.py'], datas=[ - ('locales', 'locales'), - ('static', 'static'), + ('decky_loader/locales', 'decky_loader/locales'), + ('decky_loader/static', 'decky_loader/static'), ] + copy_metadata('decky_loader'), hiddenimports=['logging.handlers', 'sqlite3', 'decky_plugin', 'decky'], ) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 0d5b65b0c..a5474e6ac 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -8,7 +8,10 @@ packages = [ {include = "decky_loader"}, {include = "decky_loader/main.py"} ] -include = ["decky_loader/static/*"] +include = [ + "decky_loader/locales/*", + "decky_loader/static/*" +] [tool.poetry.dependencies] python = ">=3.10,<3.13" diff --git a/frontend/i18next-parser.config.mjs b/frontend/i18next-parser.config.mjs index 8de58cfcd..0e36964dd 100644 --- a/frontend/i18next-parser.config.mjs +++ b/frontend/i18next-parser.config.mjs @@ -43,7 +43,7 @@ export default { // Namespace separator used in your translation keys // If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance. - output: '../backend/locales/$LOCALE.json', + output: '../backend/decky_loader/locales/$LOCALE.json', // Supports $LOCALE and $NAMESPACE injection // Supports JSON (.json) and YAML (.yml) file formats // Where to write the locale files relative to process.cwd() diff --git a/frontend/rollup.config.js b/frontend/rollup.config.js index e86fbf07c..911cf06d3 100644 --- a/frontend/rollup.config.js +++ b/frontend/rollup.config.js @@ -14,7 +14,7 @@ const hiddenWarnings = ['THIS_IS_UNDEFINED', 'EVAL']; export default defineConfig({ input: 'src/index.ts', plugins: [ - del({ targets: '../backend/static/*', force: true }), + del({ targets: '../backend/decky_loader/static/*', force: true }), commonjs(), nodeResolve({ browser: true, @@ -38,7 +38,7 @@ export default defineConfig({ ], preserveEntrySignatures: false, output: { - dir: '../backend/static', + dir: '../backend/decky_loader/static', format: 'esm', chunkFileNames: (chunkInfo) => { return 'chunk-[hash].js';