From a7132b1cfcbfb4c926b65d429114488380aeca41 Mon Sep 17 00:00:00 2001 From: Constantin Hong Date: Wed, 4 Oct 2023 17:46:54 +0900 Subject: [PATCH] Dockerfile/fix: Update builder and runner to Python 3.11 (#1781) --- .github/test/Dockerfile-alpine | 4 ++-- .github/workflows/containers.yml | 4 ++-- .github/workflows/test-container-build.yml | 4 ++-- .github/workflows/test-only.yml | 6 +++--- .github/workflows/test-pip-build.yml | 4 ++-- Dockerfile | 4 ++-- runtime.txt | 2 +- setup.py | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/test/Dockerfile-alpine b/.github/test/Dockerfile-alpine index b255195d..08fc8300 100644 --- a/.github/test/Dockerfile-alpine +++ b/.github/test/Dockerfile-alpine @@ -2,7 +2,7 @@ # Test that we can still build on Alpine (musl modified libc https://musl.libc.org/) # Some packages wont install via pypi because they dont have a wheel available under this architecture. -FROM ghcr.io/linuxserver/baseimage-alpine:3.16 +FROM ghcr.io/linuxserver/baseimage-alpine:3.18 ENV PYTHONUNBUFFERED=1 COPY requirements.txt /requirements.txt @@ -26,6 +26,6 @@ RUN \ py3-pip && \ echo "**** pip3 install test of changedetection.io ****" && \ pip3 install -U pip wheel setuptools && \ - pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.16/ -r /requirements.txt && \ + pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.18/ -r /requirements.txt && \ apk del --purge \ build-dependencies diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 9a3136c0..3d8935d6 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -40,10 +40,10 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} || ${{ github.event.release.tag_name }} != '' steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 - name: Install dependencies run: | diff --git a/.github/workflows/test-container-build.yml b/.github/workflows/test-container-build.yml index 0c0ce6b2..00857a9f 100644 --- a/.github/workflows/test-container-build.yml +++ b/.github/workflows/test-container-build.yml @@ -25,10 +25,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 # Just test that the build works, some libraries won't compile on ARM/rPi etc - name: Set up QEMU diff --git a/.github/workflows/test-only.yml b/.github/workflows/test-only.yml index 003cb1d2..9229c9e2 100644 --- a/.github/workflows/test-only.yml +++ b/.github/workflows/test-only.yml @@ -10,10 +10,10 @@ jobs: - uses: actions/checkout@v4 # Mainly just for link/flake8 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Lint with flake8 run: | @@ -98,4 +98,4 @@ jobs: #export WEBDRIVER_URL=http://localhost:4444/wd/hub #pytest tests/fetchers/test_content.py -#pytest tests/test_errorhandling.py \ No newline at end of file +#pytest tests/test_errorhandling.py diff --git a/.github/workflows/test-pip-build.yml b/.github/workflows/test-pip-build.yml index 61d94e13..e5e0bd30 100644 --- a/.github/workflows/test-pip-build.yml +++ b/.github/workflows/test-pip-build.yml @@ -13,10 +13,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.9 + - name: Set up Python 3.11 uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.11 - name: Test that the basic pip built package runs without error diff --git a/Dockerfile b/Dockerfile index 7aa2c4a5..82a3c472 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # pip dependencies install stage -FROM python:3.10-slim-bullseye as builder +FROM python:3.11-slim-bullseye as builder # See `cryptography` pin comment in requirements.txt ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1 @@ -29,7 +29,7 @@ RUN pip install --target=/dependencies playwright~=1.27.1 \ || echo "WARN: Failed to install Playwright. The application can still run, but the Playwright option will be disabled." # Final image stage -FROM python:3.10-slim-bullseye +FROM python:3.11-slim-bullseye RUN apt-get update && apt-get install -y --no-install-recommends \ libssl1.1 \ diff --git a/runtime.txt b/runtime.txt index b5f092a9..d5831c54 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.9.15 \ No newline at end of file +python-3.11.5 \ No newline at end of file diff --git a/setup.py b/setup.py index e6618942..01572ccc 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ setup( include_package_data=True, install_requires=install_requires, license="Apache License 2.0", - python_requires=">= 3.6", + python_requires=">= 3.7", classifiers=['Intended Audience :: Customer Service', 'Intended Audience :: Developers', 'Intended Audience :: Education',