From d79724e9264330a14ddeec13e3064f6c0f09acf4 Mon Sep 17 00:00:00 2001 From: Pierre Romera Date: Mon, 12 Feb 2024 13:20:44 +0100 Subject: [PATCH] build: switch to python 10 --- .github/workflows/main.yml | 10 ++--- .github/workflows/python_task.yml | 2 +- Dockerfile | 4 +- README.md | 2 +- poetry.lock | 64 ++----------------------------- pyproject.toml | 2 +- 6 files changed, 13 insertions(+), 71 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5fee2b1b..8691863a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,13 +11,13 @@ jobs: lint-backend: uses: ./.github/workflows/python_task.yml with: - python-version: '["3.9"]' + python-version: '["3.10"]' command: poetry run pylint prophecies test-backend: uses: ./.github/workflows/python_task.yml with: - python-version: '["3.9", "3.10"]' + python-version: '["3.10"]' command: make test-back test-frontend: @@ -32,10 +32,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.10 - name: Install Poetry uses: snok/install-poetry@v1 @@ -49,7 +49,7 @@ jobs: uses: actions/cache@v3 with: path: .venv - key: venv-${{ runner.os }}-3.9-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ runner.os }}-3.10-${{ hashFiles('**/poetry.lock') }} - name: Install Python dependencies if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' diff --git a/.github/workflows/python_task.yml b/.github/workflows/python_task.yml index 93a8f315..0f9f8058 100644 --- a/.github/workflows/python_task.yml +++ b/.github/workflows/python_task.yml @@ -5,7 +5,7 @@ on: inputs: python-version: required: true - default: '["3.9"]' + default: '["3.10"]' type: string command: required: true diff --git a/Dockerfile b/Dockerfile index c49975c0..8271f11f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9 AS poetry +FROM python:3.10 AS poetry FROM node:18 AS webpack RUN mkdir /frontend/ @@ -9,7 +9,7 @@ RUN yarn config set network-timeout 300000 RUN yarn --non-interactive --production=false RUN yarn build -FROM python:3.9 +FROM python:3.10 ENV PYTHONUNBUFFERED 1 ENV PORT 8008 diff --git a/README.md b/README.md index 7802f2e3..6335b846 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ An ICIJ app to conduct data validation and cleaning. Required: -* Python 3.9 +* Python 3.10 * Node 16.x * Poetry >= 1.2 * Yarn 1.x diff --git a/poetry.lock b/poetry.lock index d8320dc8..b442168a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -83,10 +83,7 @@ files = [ [package.dependencies] jmespath = ">=0.7.1,<2.0.0" python-dateutil = ">=2.1,<3.0.0" -urllib3 = [ - {version = ">=1.25.4,<1.27", markers = "python_version < \"3.10\""}, - {version = ">=1.25.4,<2.1", markers = "python_version >= \"3.10\""}, -] +urllib3 = {version = ">=1.25.4,<2.1", markers = "python_version >= \"3.10\""} [package.extras] crt = ["awscrt (==0.19.19)"] @@ -744,7 +741,6 @@ djangorestframework = ">=3.10.3" inflection = ">=0.3.1" jsonschema = ">=2.6.0" PyYAML = ">=5.1" -typing-extensions = {version = "*", markers = "python_version < \"3.10\""} uritemplate = ">=2.0.0" [package.extras] @@ -807,25 +803,6 @@ files = [ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] -[[package]] -name = "importlib-metadata" -version = "7.0.1" -description = "Read metadata from Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "importlib_metadata-7.0.1-py3-none-any.whl", hash = "sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e"}, - {file = "importlib_metadata-7.0.1.tar.gz", hash = "sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc"}, -] - -[package.dependencies] -zipp = ">=0.5" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] - [[package]] name = "inflection" version = "0.5.1" @@ -919,9 +896,6 @@ files = [ {file = "Markdown-3.5.2.tar.gz", hash = "sha256:e1ac7b3dc550ee80e602e71c1d168002f062e49f1b11e26a36264dafd4df2ef8"}, ] -[package.dependencies] -importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} - [package.extras] docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] testing = ["coverage", "pyyaml"] @@ -1249,7 +1223,6 @@ mccabe = ">=0.6,<0.8" platformdirs = ">=2.2.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.10.1" -typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""} [package.extras] spelling = ["pyenchant (>=3.2,<4.0)"] @@ -1855,22 +1828,6 @@ files = [ {file = "uritemplate-4.1.1.tar.gz", hash = "sha256:4346edfc5c3b79f694bccd6d6099a322bbeb628dbf2cd86eea55a456ce5124f0"}, ] -[[package]] -name = "urllib3" -version = "1.26.18" -description = "HTTP library with thread-safe connection pooling, file post, and more." -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" -files = [ - {file = "urllib3-1.26.18-py2.py3-none-any.whl", hash = "sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07"}, - {file = "urllib3-1.26.18.tar.gz", hash = "sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0"}, -] - -[package.extras] -brotli = ["brotli (==1.0.9)", "brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] - [[package]] name = "urllib3" version = "2.0.7" @@ -1915,22 +1872,7 @@ files = [ {file = "xlwt-1.3.0.tar.gz", hash = "sha256:c59912717a9b28f1a3c2a98fd60741014b06b043936dcecbc113eaaada156c88"}, ] -[[package]] -name = "zipp" -version = "3.17.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.8" -files = [ - {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, - {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] - [metadata] lock-version = "2.0" -python-versions = "^3.9" -content-hash = "68041cd7644e01fc5c97ac661d68269e4c890e17c63ae82c84feb92295c53db8" +python-versions = "^3.10" +content-hash = "45741120f912ed49348552fe23734a9ff84294148de33251facad8f8b78e518e" diff --git a/pyproject.toml b/pyproject.toml index 31db0b79..9641e173 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ description = "An ICIJ app to conduct data validation and cleaning" readme = "README.md" [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" django = "==4.2.9" djangorestframework = "^3.14.0" django-cors-headers = "^4.3.1"