# Global build arguments. Stages using UID/GID must redeclare them
# (bare `ARG UID`) to bring them into scope; the defaults are set here.
-ARG PYTHON_IMAGE=python:3.9-trixie
+ARG PYTHON_IMAGE=python:3.10-trixie
ARG UID=8100
ARG GID=8100
COPY requirements/requirements.txt requirements.txt
-RUN pip install --no-cache-dir -r requirements.txt
-RUN pip install --no-cache-dir \
+RUN --mount=type=cache,target=/root/.cache/pip \
+ pip install -r requirements.txt
+RUN --mount=type=cache,target=/root/.cache/pip \
+ pip install \
psycopg2-binary \
django-debug-toolbar==3.2.2
USER root
-RUN pip install --no-cache-dir gunicorn
+RUN --mount=type=cache,target=/root/.cache/pip \
+ pip install gunicorn
USER app
USER root
COPY requirements/requirements-test.txt /tmp/
-RUN pip install --no-cache-dir -r /tmp/requirements-test.txt
+RUN --mount=type=cache,target=/root/.cache/pip \
+ pip install -r /tmp/requirements-test.txt
USER app
RUN mkdir -p /app/var/counters
COPY --from=static-builder /app/var/static/staticfiles.json /app/var/static/staticfiles.json
# django
Django==4.0.8
fnpdjango==0.6
-docutils==0.20
+docutils==0.23
-python-memcached==1.59
+pymemcache==4.0.0
django-pipeline==3.1.0
-libsasscompiler==0.2.0
+libsasscompiler==0.2.1
jsmin==3.0.1
-fnp-django-pagination==2.2.5
+fnp-django-pagination==2.2.12
django-modeltranslation==0.18.12
-django-allauth==0.51
+django-allauth==0.54
django-extensions==3.2.3
djangorestframework==3.15.1
django-filter==23.5
django-admin-ordering==0.18
django-countries==7.6.1
--e git+https://github.com/rczajka/django-forms-builder@6533f9442f004d44ed362202b6bdab82b73dd5e9#egg=django-forms-builder
+django-forms-builder @ git+https://github.com/rczajka/django-forms-builder@6533f9442f004d44ed362202b6bdab82b73dd5e9
-
-oauthlib>=3.0.1,<3.1
+oauthlib==4.0.1
# contact
pyyaml==6.0.3
django-honeypot==1.2.1
-python-fb==0.2
-
-Feedparser==6.0.11
+Feedparser==6.0.14
-Pillow==9.5.0
-mutagen==1.47
+Pillow==12.3.0
+mutagen==1.48.1
sorl-thumbnail==12.10.0
-zipstream-ng==1.9.2
+zipstream-ng==1.9.3
# home-brewed & dependencies
-librarian==26.5.1
+
+librarian==26.11
# celery tasks
-celery[redis]==5.4.0
+celery[redis]==5.6.2
-# OAI-PMH
-#pyoai==2.5.1
--e git+https://github.com/infrae/pyoai@5ff2f15e869869e70d8139e4c37b7832854d7049#egg=pyoai
+oaipmh==3.2.1
-sentry-sdk==2.19.2
+sentry-sdk==2.74.0
-requests==2.32.3
+requests==2.34.2
paypalrestsdk
-python-slugify==8.0.4
+python-slugify==9.1.3
-firebase-admin==6.6.0
+firebase-admin==7.7.0
Wikidata==0.9.0
ipython
min(THUMB_HEIGHT,
round(simg.size[1] * THUMB_WIDTH / simg.size[0]))
)
- simg = simg.resize(size, Image.ANTIALIAS)
+ simg = simg.resize(size, Image.Resampling.LANCZOS)
sprite.paste(simg, (
round((THUMB_WIDTH - simg.size[0]) / 2),
round(i * THUMB_HEIGHT + (THUMB_HEIGHT - simg.size[1]) / 2),
CACHES = {
'default': {
- 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
+ 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'TIMEOUT': 180,
'LOCATION': [
'memcached:11211',
],
+ 'OPTIONS': {
+ "no_delay": True,
+ "ignore_exc": True, # treat memcached errors as cache misses
+ "max_pool_size": 4,
+ "use_pooling": True,
+ },
},
'template_fragments': {
- 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
+ 'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'TIMEOUT': 86400,
'LOCATION': [
'memcached:11211',
],
+ 'OPTIONS': {
+ "no_delay": True,
+ "ignore_exc": True, # treat memcached errors as cache misses
+ "max_pool_size": 4,
+ "use_pooling": True,
+ },
},
}
CATALOGUE_GET_MP3_LENGTH = 'catalogue.test_utils.get_mp3_length'
MEDIA_URL = '/media/'
-SEARCH_CONFIG = 'english'
-SEARCH_CONFIG_SIMPLE = 'simple'
-SEARCH_USE_UNACCENT = False
-
-# Infrastructure: tests don't need Redis or Memcached.
-CELERY_BROKER_URL = 'memory://'
-CELERY_TASK_ALWAYS_EAGER = True
CACHES = {
'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},
'template_fragments': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},