diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 37b074ed..187dfd34 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,4 +13,7 @@ sphinx: python: version: 3.8 install: - - requirements: docs/requirements.txt + - method: pip + path: . + extra_requirements: + - docs diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index c4539be9..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -flask -python-dateutil -sphinx -sphinxcontrib-httpdomain -prometheus_client -dogpile.cache -PyYAML diff --git a/greenwave/monitor.py b/greenwave/monitor.py index 51ba6ca1..303db065 100644 --- a/greenwave/monitor.py +++ b/greenwave/monitor.py @@ -24,7 +24,7 @@ def stats_client(): @dataclass class Stat: name: str - labeldict: dict[str, str] = field(default_factory=dict) + labeldict: dict = field(default_factory=dict) def __str__(self): if not self.labeldict: diff --git a/poetry.lock b/poetry.lock index 088d42b1..b43b5b07 100644 --- a/poetry.lock +++ b/poetry.lock @@ -365,6 +365,21 @@ docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] perf = ["ipython"] testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] +[[package]] +name = "importlib-resources" +version = "5.7.1" +description = "Read resources from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] + [[package]] name = "incremental" version = "21.3.0" @@ -416,6 +431,7 @@ python-versions = ">=3.7" [package.dependencies] attrs = ">=17.4.0" +importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" [package.extras] @@ -1123,8 +1139,8 @@ test = ["flake8", "pytest", "pytest-cov", "mock"] [metadata] lock-version = "1.1" -python-versions = "^3.9" -content-hash = "2f09c7371a24623640ead2c76ef4cb60e1ee067c23ad17af3f507b159c6d9c37" +python-versions = ">=3.8,<3.10" +content-hash = "47a45f7c504b48fcee2581b950551e49f28ef4228612fea17dffb661cb6adb0c" [metadata.files] alabaster = [ @@ -1407,6 +1423,10 @@ importlib-metadata = [ {file = "importlib_metadata-4.11.3-py3-none-any.whl", hash = "sha256:1208431ca90a8cca1a6b8af391bb53c1a2db74e5d1cef6ddced95d4b2062edc6"}, {file = "importlib_metadata-4.11.3.tar.gz", hash = "sha256:ea4c597ebf37142f827b8f39299579e31685c31d3a438b59f469406afd0f2539"}, ] +importlib-resources = [ + {file = "importlib_resources-5.7.1-py3-none-any.whl", hash = "sha256:e447dc01619b1e951286f3929be820029d48c75eb25d265c28b92a16548212b8"}, + {file = "importlib_resources-5.7.1.tar.gz", hash = "sha256:b6062987dfc51f0fcb809187cffbd60f35df7acb4589091f154214af6d0d49d3"}, +] incremental = [ {file = "incremental-21.3.0-py2.py3-none-any.whl", hash = "sha256:92014aebc6a20b78a8084cdd5645eeaa7f74b8933f70fa3ada2cfbd1e3b54321"}, {file = "incremental-21.3.0.tar.gz", hash = "sha256:02f5de5aff48f6b9f665d99d48bfc7ec03b6e3943210de7cfc88856d755d6f57"}, diff --git a/pyproject.toml b/pyproject.toml index 75cf9c77..fc2c8c0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ include = [ ] [tool.poetry.dependencies] -python = "^3.9" +python = ">=3.8,<3.10" PyYAML = "^6.0" "dogpile.cache" = "^1.1.4" flask = "^2.1.2" diff --git a/tox.ini b/tox.ini index 16511276..be525ceb 100644 --- a/tox.ini +++ b/tox.ini @@ -47,6 +47,8 @@ commands = --recursive greenwave [testenv:docs] +# Same Python version as in .readthedocs.yaml +basepython = python3.8 changedir = docs extras = docs