Skip to content
Snippets Groups Projects
Commit f1ac82c2 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Switch to Python 3.12

parent 78ebea95
Branches release-1.7.2
Tags 1.7.2
1 merge request!2520Switch to Python 3.12
...@@ -11,7 +11,7 @@ include: ...@@ -11,7 +11,7 @@ include:
# For jobs that run backend scripts directly # For jobs that run backend scripts directly
.backend-setup: .backend-setup:
image: registry.gitlab.teklia.com/arkindex/backend/base:psycopg3 image: registry.gitlab.teklia.com/arkindex/backend/base:python3.12
cache: cache:
paths: paths:
...@@ -61,7 +61,7 @@ backend-tests: ...@@ -61,7 +61,7 @@ backend-tests:
- arkindex test - arkindex test
backend-lint: backend-lint:
image: python:3.10 image: python:3.12
stage: test stage: test
except: except:
...@@ -159,7 +159,7 @@ backend-build: ...@@ -159,7 +159,7 @@ backend-build:
backend-build-binary: backend-build-binary:
stage: build stage: build
image: python:3.10 image: python:3.12
before_script: before_script:
- pip install nuitka - pip install nuitka
......
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM registry.gitlab.teklia.com/arkindex/backend/base:psycopg3 AS build FROM registry.gitlab.teklia.com/arkindex/backend/base:python3.12 AS build
RUN mkdir build RUN mkdir build
ADD . build ADD . build
RUN cd build && python3 setup.py sdist RUN cd build && python3 setup.py sdist
FROM registry.gitlab.teklia.com/arkindex/backend/base:psycopg3 FROM registry.gitlab.teklia.com/arkindex/backend/base:python3.12
# Install arkindex and its deps # Install arkindex and its deps
# Uses a source archive instead of full local copy to speedup docker build # Uses a source archive instead of full local copy to speedup docker build
......
...@@ -86,7 +86,7 @@ def save_sqlite(rows, table, cursor): ...@@ -86,7 +86,7 @@ def save_sqlite(rows, table, cursor):
return float(value) return float(value)
# Show very explicit error messages if we stumble upon an unexpected type # Show very explicit error messages if we stumble upon an unexpected type
# https://docs.python.org/3.10/library/sqlite3.html#sqlite-and-python-types # https://docs.python.org/3.12/library/sqlite3.html#sqlite-and-python-types
assert value is None or isinstance(value, (int, float, str, bytes)), f"Type {type(value)} is not supported by sqlite3" assert value is None or isinstance(value, (int, float, str, bytes)), f"Type {type(value)} is not supported by sqlite3"
return value return value
......
FROM python:3.10-slim-bookworm FROM python:3.12-slim-bookworm
# Install some runtime deps and python dependencies that are slow to install or require specific build deps # Install some runtime deps and python dependencies that are slow to install or require specific build deps
ADD requirements.txt bootstrap.sh / ADD requirements.txt bootstrap.sh /
......
boto3==1.18.13 boto3==1.36.16
cryptography==3.4.7 cryptography==44.0.1
Django==5.0.8 Django==5.0.8
ed25519==1.5
lxml==4.9.2
# -r ./base/requirements.txt # -r ./base/requirements.txt
bleach==6.0.0 bleach==6.0.0
django-admin-hstore-widget==1.2.1 django-admin-hstore-widget==1.2.1
django-cors-headers==3.14.0 django-cors-headers==3.14.0
...@@ -8,13 +7,12 @@ django-enumfields2==3.0.2 ...@@ -8,13 +7,12 @@ django-enumfields2==3.0.2
django-pgtrigger==4.7.0 django-pgtrigger==4.7.0
django-rq==2.10.1 django-rq==2.10.1
djangorestframework==3.15.2 djangorestframework==3.15.2
djangorestframework-simplejwt==5.2.2 djangorestframework-simplejwt==5.4.0
docker==7.0.0 docker==7.0.0
drf-spectacular==0.27.2 drf-spectacular==0.27.2
psycopg[binary]==3.2.4 psycopg[binary]==3.2.4
python-magic==0.4.27 python-magic==0.4.27
python-memcached==1.59 python-memcached==1.59
PyYAML==6.0
requests==2.28.2 requests==2.28.2
rq==1.16.0 rq==1.16.0
sentry-sdk==2.7.1 sentry-sdk==2.7.1
...@@ -23,4 +21,4 @@ SolrClient==0.3.1 ...@@ -23,4 +21,4 @@ SolrClient==0.3.1
teklia-toolbox==0.1.3 teklia-toolbox==0.1.3
tenacity==8.2.2 tenacity==8.2.2
uritemplate==4.1.1 uritemplate==4.1.1
zstandard==0.20.0 zstandard==0.23.0
...@@ -30,7 +30,7 @@ setup( ...@@ -30,7 +30,7 @@ setup(
license_files=("LICENSE",), license_files=("LICENSE",),
description="Manuscripts indexation framework", description="Manuscripts indexation framework",
author="Teklia", author="Teklia",
author_email="abadie@teklia.com", author_email="contact@teklia.com",
url="https://arkindex.teklia.com", url="https://arkindex.teklia.com",
python_requires=">=3.10", python_requires=">=3.10",
install_requires=install_requires, install_requires=install_requires,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment