From c220a9c684b47edcab6af0004b3d029de638d4c6 Mon Sep 17 00:00:00 2001 From: Dennis Siemensma Date: Mon, 10 Jun 2024 21:41:44 +0200 Subject: [PATCH] Downgrade to Python 3.10 in favor of Django upgrades #1594 --- .github/workflows/automated-tests.yml | 2 +- provisioning/container/Containerfile-dev | 5 +-- src/poetry.lock | 42 ++++++++++++++++++++++-- src/pyproject.toml | 2 +- 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index f29c31d1..02f6b3e2 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: python-version: - - '3.11' # @TODO: Bump me to 3.12 later + - '3.10' # @TODO: Bump me to 3.12 later env: # Do not log verbosely DSMRREADER_LOGLEVEL: ERROR diff --git a/provisioning/container/Containerfile-dev b/provisioning/container/Containerfile-dev index fb8b5b59..23115794 100644 --- a/provisioning/container/Containerfile-dev +++ b/provisioning/container/Containerfile-dev @@ -3,7 +3,7 @@ ############################################################################ # Development app should run latest Python when possible. -ARG APP_PYTHON_VERSION="3.11" +ARG APP_PYTHON_VERSION="3.10" # Docs should use whatever Python version ReadTheDocs runs. ARG DOCS_PYTHON_VERSION="3.12" @@ -20,7 +20,8 @@ RUN apk add --update \ mariadb-dev \ postgresql-client ENV POETRY_VIRTUALENVS_IN_PROJECT=false -COPY ./src/pyproject.toml ./src/poetry.lock /app/ +#COPY ./src/pyproject.toml ./src/poetry.lock /app/ +COPY ./src/pyproject.toml /app/ RUN pip install poetry RUN poetry self add poetry-plugin-export RUN poetry install --no-root --with dev diff --git a/src/poetry.lock b/src/poetry.lock index 87fc9957..403233f9 100644 --- a/src/poetry.lock +++ b/src/poetry.lock @@ -22,6 +22,9 @@ files = [ {file = "asgiref-3.8.1.tar.gz", hash = "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590"}, ] +[package.dependencies] +typing-extensions = {version = ">=4", markers = "python_version < \"3.11\""} + [package.extras] tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] @@ -118,6 +121,8 @@ mypy-extensions = ">=0.4.3" packaging = ">=22.0" pathspec = ">=0.9.0" platformdirs = ">=2" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] @@ -352,6 +357,9 @@ files = [ {file = "coverage-7.5.3.tar.gz", hash = "sha256:04aefca5190d1dc7a53a4c1a5a7f8568811306d7a8ee231c42fb69215571944f"}, ] +[package.dependencies] +tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} + [package.extras] toml = ["tomli"] @@ -533,6 +541,7 @@ files = [ [package.dependencies] packaging = "*" +tomli = {version = "*", markers = "python_version < \"3.11\""} [package.extras] conda = ["pyyaml"] @@ -555,6 +564,20 @@ requests = ">=2.16.2" six = ">=1.12.0" stone = ">=2" +[[package]] +name = "exceptiongroup" +version = "1.2.1" +description = "Backport of PEP 654 (exception groups)" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "execnet" version = "2.1.1" @@ -614,6 +637,7 @@ files = [ [package.dependencies] black = ">=22.1.0" flake8 = ">=3" +tomli = {version = "*", markers = "python_version < \"3.11\""} [package.extras] develop = ["build", "twine"] @@ -909,6 +933,7 @@ files = [ [package.dependencies] mypy-extensions = ">=1.0.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = ">=4.1.0" [package.extras] @@ -1289,9 +1314,11 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" pluggy = ">=1.5,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] @@ -1882,6 +1909,17 @@ files = [ ply = ">=3.4" six = ">=1.12.0" +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "tornado" version = "6.4.1" @@ -2090,5 +2128,5 @@ files = [ [metadata] lock-version = "2.0" -python-versions = "^3.11 | ^3.12" -content-hash = "202c86166472ce867268023b94033f9799decba873cfe8893cd3680be5be87e7" +python-versions = "^3.10 | ^3.11 | ^3.12" +content-hash = "3626614c6ac4fc71431e8b113d7e5cce248f68144aeacbfd7078281ba541a737" diff --git a/src/pyproject.toml b/src/pyproject.toml index ff248754..9e3aa56c 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -13,7 +13,7 @@ authors = [ [tool.poetry.dependencies] -python = "^3.11 | ^3.12" +python = "^3.10 | ^3.11 | ^3.12" coreapi = "^2.0" crcmod = "^1.0"