diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ab2bd79..4c60f450 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11', '3.12'] services: postgres: @@ -59,5 +59,5 @@ jobs: make test - name: Lint - if: matrix.python-version == 3.11 + if: matrix.python-version == 3.12 run: make lint diff --git a/.github/workflows/migration-sql.yml b/.github/workflows/migration-sql.yml index 74a6092e..66d01807 100644 --- a/.github/workflows/migration-sql.yml +++ b/.github/workflows/migration-sql.yml @@ -14,7 +14,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v2 with: - python-version: '3.11' + python-version: '3.12' - name: Get list of created migrations id: get-changed-files @@ -32,7 +32,7 @@ jobs: if: steps.migrations-changed.outputs.changed == 'true' run: | make config - PYTHON=python3.11 make env + PYTHON=python3.12 make env pip install -q -e '.[dev]' - name: Activate virtualenv for later steps diff --git a/Dockerfile b/Dockerfile index cf325d6e..d1c10cd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # builder image -FROM python:3.11 AS builder +FROM python:3.12 AS builder ADD . /build/ WORKDIR /build @@ -11,7 +11,7 @@ RUN make build # production image -FROM python:3.11 +FROM python:3.12 # create an unprivileged user to run as RUN set -ex && \ @@ -24,7 +24,7 @@ RUN pip install uwsgi COPY --from=builder /build/dist/newdle*.whl /tmp/ RUN pip install $(echo /tmp/newdle*.whl)[exchange,cern] -RUN find /usr/local/lib/python3.11/site-packages/newdle/client/build/ -type f -exec gzip -k {} + +RUN find /usr/local/lib/python3.12/site-packages/newdle/client/build/ -type f -exec gzip -k {} + ADD docker/run.sh docker/uwsgi.ini / # install some useful tools for debugging etc. diff --git a/README.md b/README.md index e4484cf3..0e761488 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,12 @@ decided (still work in progress!). ## Development -We chose Python 3.11 as the backend language, so make sure you have it installed (3.9 or 3.10 should work as well). To prepare the development environment it is enough to run `make` which takes care of installing all required dependencies inside a new virtualenv. Typically that will be the `.venv` directory unless you override the environment variable `VENV` *e.g.* `VENV=.virtualenv make`. Activate your virtualenv using ``source .venv/bin/activate`` since this is required to run the various `flask` comments that come later. +We chose Python 3.12 as the backend language, so make sure you have it installed (3.9-3.11 should work as well). To prepare the development environment it is enough to run `make` which takes care of installing all required dependencies inside a new virtualenv. Typically that will be the `.venv` directory unless you override the environment variable `VENV` *e.g.* `VENV=.virtualenv make`. Activate your virtualenv using ``source .venv/bin/activate`` since this is required to run the various `flask` comments that come later. Make sure you have the `python` binary in your PATH. You can also use the `PYTHON` environment variable to override the location of the `python` binary. *e.g.:* ```bash -$ PYTHON=/usr/bin/python3.11 make +$ PYTHON=/usr/bin/python3.12 make ``` ## Database schema diff --git a/docker/uwsgi.ini b/docker/uwsgi.ini index 9323fe05..35696e3e 100644 --- a/docker/uwsgi.ini +++ b/docker/uwsgi.ini @@ -29,7 +29,7 @@ evil-reload-on-rss = 8192 offload-threads = 4 -set-placeholder = newdle-client-dir=/usr/local/lib/python3.11/site-packages/newdle/client/build +set-placeholder = newdle-client-dir=/usr/local/lib/python3.12/site-packages/newdle/client/build # pass urls handled by the backend to the app route-uri = ^/(api|login|logout)/ last: