Skip to content

Commit e2fe1d9

Browse files
committed
chore(python): bump python 3.12
1 parent 5f1a6ab commit e2fe1d9

5 files changed

Lines changed: 19 additions & 20 deletions

File tree

rootfs/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM registry.drycc.cc/drycc/base:${CODENAME} as build-app
44
ADD web /web
55
WORKDIR /web
66

7-
ENV NODE_VERSION="18"
7+
ENV NODE_VERSION="20"
88

99
RUN install-stack node $NODE_VERSION && . init-stack \
1010
&& npm install --global yarn \
@@ -16,7 +16,7 @@ FROM registry.drycc.cc/drycc/base:${CODENAME}
1616
ENV DRYCC_UID=1001 \
1717
DRYCC_GID=1001 \
1818
DRYCC_HOME_DIR=/workspace \
19-
PYTHON_VERSION="3.11"
19+
PYTHON_VERSION="3.12"
2020

2121
RUN groupadd drycc --gid ${DRYCC_GID} \
2222
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}

rootfs/Dockerfile.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ FROM registry.drycc.cc/drycc/base:${CODENAME}
33

44
ENV DRYCC_HOME_DIR=/workspace \
55
PGDATA="/var/lib/postgresql/data" \
6-
PYTHON_VERSION="3.11" \
7-
POSTGRES_VERSION="15.3" \
8-
GOSU_VERSION="1.16"
6+
PYTHON_VERSION="3.12" \
7+
POSTGRES_VERSION="15.5" \
8+
GOSU_VERSION="1.17"
99

1010
COPY requirements.txt ${DRYCC_HOME_DIR}/requirements.txt
1111
COPY dev_requirements.txt ${DRYCC_HOME_DIR}/dev_requirements.txt

rootfs/api/settings/production.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@
99
import os.path
1010
import ldap
1111
import dj_database_url
12-
from distutils.util import strtobool
1312
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
1413

1514
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1615
# SECURITY WARNING: don't run with debug turned on in production!
17-
DEBUG = bool(strtobool(os.environ.get('DRYCC_DEBUG', 'false')))
16+
DEBUG = os.environ.get('DRYCC_DEBUG', 'false').lower() == "true"
1817

1918
# If set to True, Django's normal exception handling of view functions
2019
# will be suppressed, and exceptions will propagate upwards
2120
# https://docs.djangoproject.com/en/2.2/ref/settings/#debug-propagate-exceptions
2221
DEBUG_PROPAGATE_EXCEPTIONS = True
2322

2423
# Enable Legal
25-
LEGAL_ENABLED = bool(strtobool(os.environ.get('LEGAL_ENABLED', 'false')))
24+
LEGAL_ENABLED = os.environ.get('LEGAL_ENABLED', 'false').lower() == "true"
2625
# Enable Django admin
27-
ADMIN_ENABLED = bool(strtobool(os.environ.get('ADMIN_ENABLED', 'false')))
26+
ADMIN_ENABLED = os.environ.get('ADMIN_ENABLED', 'false').lower() == "true"
2827
# Enable Registration
2928
# If this function is enabled, please set Django email related parameters
30-
REGISTRATION_ENABLED = bool(strtobool(os.environ.get('REGISTRATION_ENABLED', 'false')))
29+
REGISTRATION_ENABLED = os.environ.get('REGISTRATION_ENABLED', 'false').lower() == "true"
3130
# Silence two security messages around SSL as router takes care of them
3231
# https://docs.djangoproject.com/en/2.2/ref/checks/#security
3332
SILENCED_SYSTEM_CHECKS = [
@@ -162,8 +161,8 @@
162161
CSRF_COOKIE_SAMESITE = None
163162
SECURE_CONTENT_TYPE_NOSNIFF = True
164163
SECURE_BROWSER_XSS_FILTER = True
165-
CSRF_COOKIE_SECURE = bool(strtobool(os.environ.get('CSRF_COOKIE_SECURE', 'false')))
166-
SESSION_COOKIE_SECURE = bool(strtobool(os.environ.get('SESSION_COOKIE_SECURE', 'false')))
164+
CSRF_COOKIE_SECURE = os.environ.get('CSRF_COOKIE_SECURE', 'false').lower() == "true"
165+
SESSION_COOKIE_SECURE = os.environ.get('SESSION_COOKIE_SECURE', 'false').lower() == "true"
167166

168167
# Honor HTTPS from a trusted proxy
169168
# see https://docs.djangoproject.com/en/2.2/ref/settings/#secure-proxy-ssl-header
@@ -394,8 +393,8 @@
394393
DEFAULT_FROM_EMAIL = os.environ.get('DEFAULT_FROM_EMAIL', '')
395394
EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER', '')
396395
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD', '')
397-
EMAIL_USE_TLS = bool(strtobool(os.environ.get('EMAIL_USE_TLS', 'false')))
398-
EMAIL_USE_SSL = bool(strtobool(os.environ.get('EMAIL_USE_SSL', 'false')))
396+
EMAIL_USE_TLS = os.environ.get('EMAIL_USE_TLS', 'false').lower() == "true"
397+
EMAIL_USE_SSL = os.environ.get('EMAIL_USE_SSL', 'false').lower() == "true"
399398

400399
H_CAPTCHA_KEY = os.environ.get("H_CAPTCHA_KEY")
401400
H_CAPTCHA_SECRET = os.environ.get("H_CAPTCHA_SECRET")

rootfs/dev_requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# test module
22
# test
33
# Run "make test-unit" for the % of code exercised during tests
4-
coverage==7.2.5
4+
coverage==7.4.4
55

66
# Run "make test-style" to check python syntax and style
7-
flake8==3.9.2
7+
flake8==7.0.0
88

99
# code coverage report at https://codecov.io/github/drycc/passport
1010
codecov==2.1.13
1111

1212
# mock out python-requests, mostly k8s
13-
requests-mock==1.10.0
13+
requests-mock==1.11.0

rootfs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ django==4.2.11
33
pytz==2024.1
44
django-auth-ldap==4.6.0
55
django-cors-headers==4.3.1
6-
djangorestframework==3.14.0
6+
djangorestframework==3.15.0
77
gunicorn==21.2.0
8-
uvicorn==0.27.1
9-
asgiref==3.7.2
8+
uvicorn==0.29.0
9+
asgiref==3.8.0
1010
psycopg[binary]==3.1.18
1111
requests==2.31.0
1212
requests-toolbelt==1.0.0

0 commit comments

Comments
 (0)