fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e1e0bdc
)
Upgrades part 1
author
Radek Czajka
<radekczajka@wolnelektury.pl>
Mon, 9 Nov 2026 00:11:58 +0000
(
01:11
+0100)
committer
Radek Czajka
<radekczajka@wolnelektury.pl>
Mon, 9 Nov 2026 00:11:58 +0000
(
01:11
+0100)
Dockerfile
patch
|
blob
|
history
requirements/requirements.txt
patch
|
blob
|
history
src/sponsors/models.py
patch
|
blob
|
history
src/wolnelektury/settings/basic.py
patch
|
blob
|
history
src/wolnelektury/settings/test.py
patch
|
blob
|
history
diff --git
a/Dockerfile
b/Dockerfile
index
7d4c875
..
08ec723
100644
(file)
--- a/
Dockerfile
+++ b/
Dockerfile
@@
-12,7
+12,7
@@
# Global build arguments. Stages using UID/GID must redeclare them
# (bare `ARG UID`) to bring them into scope; the defaults are set here.
# 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
ARG UID=8100
ARG GID=8100
@@
-43,8
+43,10
@@
RUN apt-get update && apt-get install -y \
COPY requirements/requirements.txt requirements.txt
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
psycopg2-binary \
django-debug-toolbar==3.2.2
@@
-73,7
+75,8
@@
FROM deps AS app
USER root
USER root
-RUN pip install --no-cache-dir gunicorn
+RUN --mount=type=cache,target=/root/.cache/pip \
+ pip install gunicorn
USER app
USER app
@@
-156,7
+159,8
@@
FROM app AS test
USER root
COPY requirements/requirements-test.txt /tmp/
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
USER app
RUN mkdir -p /app/var/counters
COPY --from=static-builder /app/var/static/staticfiles.json /app/var/static/staticfiles.json
diff --git
a/requirements/requirements.txt
b/requirements/requirements.txt
index
853c411
..
0ec9083
100644
(file)
--- a/
requirements/requirements.txt
+++ b/
requirements/requirements.txt
@@
-3,17
+3,17
@@
# django
Django==4.0.8
fnpdjango==0.6
# django
Django==4.0.8
fnpdjango==0.6
-docutils==0.2
0
+docutils==0.2
3
-py
thon-memcached==1.59
+py
memcache==4.0.0
django-pipeline==3.1.0
django-pipeline==3.1.0
-libsasscompiler==0.2.
0
+libsasscompiler==0.2.
1
jsmin==3.0.1
jsmin==3.0.1
-fnp-django-pagination==2.2.
5
+fnp-django-pagination==2.2.
12
django-modeltranslation==0.18.12
django-modeltranslation==0.18.12
-django-allauth==0.5
1
+django-allauth==0.5
4
django-extensions==3.2.3
djangorestframework==3.15.1
django-filter==23.5
django-extensions==3.2.3
djangorestframework==3.15.1
django-filter==23.5
@@
-21,10
+21,9
@@
djangorestframework-xml==2.0.0
django-admin-ordering==0.18
django-countries==7.6.1
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
# contact
pyyaml==6.0.3
@@
-33,35
+32,32
@@
polib==1.2
django-honeypot==1.2.1
django-honeypot==1.2.1
-python-fb==0.2
-
-Feedparser==6.0.11
+Feedparser==6.0.14
-Pillow==
9.5
.0
-mutagen==1.4
7
+Pillow==
12.3
.0
+mutagen==1.4
8.1
sorl-thumbnail==12.10.0
sorl-thumbnail==12.10.0
-zipstream-ng==1.9.
2
+zipstream-ng==1.9.
3
# home-brewed & dependencies
# home-brewed & dependencies
-librarian==26.5.1
+
+librarian==26.11
# celery tasks
# 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.3
2.3
+requests==2.3
4.2
paypalrestsdk
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
Wikidata==0.9.0
ipython
diff --git
a/src/sponsors/models.py
b/src/sponsors/models.py
index
80412fc
..
552fb07
100644
(file)
--- a/
src/sponsors/models.py
+++ b/
src/sponsors/models.py
@@
-76,7
+76,7
@@
class SponsorPage(models.Model):
min(THUMB_HEIGHT,
round(simg.size[1] * THUMB_WIDTH / simg.size[0]))
)
min(THUMB_HEIGHT,
round(simg.size[1] * THUMB_WIDTH / simg.size[0]))
)
- simg = simg.resize(size, Image.
ANTIALIA
S)
+ simg = simg.resize(size, Image.
Resampling.LANCZO
S)
sprite.paste(simg, (
round((THUMB_WIDTH - simg.size[0]) / 2),
round(i * THUMB_HEIGHT + (THUMB_HEIGHT - simg.size[1]) / 2),
sprite.paste(simg, (
round((THUMB_WIDTH - simg.size[0]) / 2),
round(i * THUMB_HEIGHT + (THUMB_HEIGHT - simg.size[1]) / 2),
diff --git
a/src/wolnelektury/settings/basic.py
b/src/wolnelektury/settings/basic.py
index
50e0edd
..
fe048e4
100644
(file)
--- a/
src/wolnelektury/settings/basic.py
+++ b/
src/wolnelektury/settings/basic.py
@@
-38,18
+38,30
@@
CACHE_MIDDLEWARE_SECONDS = 3 * 60
CACHES = {
'default': {
CACHES = {
'default': {
- 'BACKEND': 'django.core.cache.backends.memcached.
Memcached
Cache',
+ 'BACKEND': 'django.core.cache.backends.memcached.
PyMemcache
Cache',
'TIMEOUT': 180,
'LOCATION': [
'memcached:11211',
],
'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': {
},
'template_fragments': {
- 'BACKEND': 'django.core.cache.backends.memcached.
Memcached
Cache',
+ 'BACKEND': 'django.core.cache.backends.memcached.
PyMemcache
Cache',
'TIMEOUT': 86400,
'LOCATION': [
'memcached:11211',
],
'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,
+ },
},
}
},
}
diff --git
a/src/wolnelektury/settings/test.py
b/src/wolnelektury/settings/test.py
index
42a453e
..
21a1ba5
100644
(file)
--- a/
src/wolnelektury/settings/test.py
+++ b/
src/wolnelektury/settings/test.py
@@
-7,13
+7,6
@@
THUMBNAIL_BACKEND = 'wolnelektury.test_utils.DummyThumbnailBackend'
CATALOGUE_GET_MP3_LENGTH = 'catalogue.test_utils.get_mp3_length'
MEDIA_URL = '/media/'
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'},
CACHES = {
'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},
'template_fragments': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},