Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Django to 3.2 #656

Merged
merged 8 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
name: "Test ${{ matrix.name }}"
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
include:
- name: "py36"
Expand All @@ -34,13 +35,6 @@ jobs:
sudo apt-get install --quiet --yes build-essential \
libmysqlclient-dev libsasl2-dev libldap2-dev libssl-dev \
p7zip-full unar
- name: "Downgrade libsqlite3-0 to version 3.22"
# Django 1.11 migrations break with SQLite >= 3.26
# See https://code.djangoproject.com/ticket/29182
run: |
wget http://security.ubuntu.com/ubuntu/pool/main/s/sqlite3/libsqlite3-0_3.22.0-1ubuntu0.7_amd64.deb -O /tmp/libsqlite3-0_3.22.0-1ubuntu0.7_amd64.deb
sudo dpkg -i /tmp/libsqlite3-0_3.22.0-1ubuntu0.7_amd64.deb
rm /tmp/libsqlite3-0_3.22.0-1ubuntu0.7_amd64.deb
- name: "Create directories needed by test_duracloud.py"
run: |
sudo mkdir -p /var/archivematica/storage_service
Expand Down Expand Up @@ -104,10 +98,10 @@ jobs:
steps:
- name: "Check out repository"
uses: "actions/checkout@v3"
- name: "Set up Python 3.7"
- name: "Set up Python 3.8"
uses: "actions/setup-python@v4"
with:
python-version: "3.7"
python-version: "3.8"
- name: "Install tox"
run: |
python -m pip install --upgrade pip
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ repos:
hooks:
- id: reorder-python-imports
args: [--py3-plus, --py36-plus]
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.14.0"
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
- repo: https://github.com/ambv/black
rev: 22.8.0
hooks:
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ RUN set -ex \

COPY ./ /src/

# Allow Django's compilemessages to write *.mo files to the messages subdirectories.
USER root
RUN set -ex \
&& find /src/storage_service/locale -type d -name 'LC_MESSAGES' -exec chown archivematica:archivematica '{}' \;
USER archivematica

# -----------------------------------------------------------------------------

FROM base AS archivematica-storage-service
Expand Down
18 changes: 9 additions & 9 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
bagit
boto3
brotli
Django>=1.11,<2
Django>=3.2,<4
django-csp
django-tastypie==0.14.3
django-tastypie
gevent
gunicorn
importlib_resources
jsonfield>=2.1,<3.0
jsonfield
lxml
metsrw
python-gnupg
python-keystoneclient
python-swiftclient
requests~=2.27
git+https://github.com/swordapp/python-client-sword2.git@59db54c03e4498dd6b001ac4f3a4167aa2fb8987#egg=sword2
whitenoise~=5.3
whitenoise>=5.3.0,<6.0
agentarchives
git+https://github.com/Brown-University-Library/django-shibboleth-remoteuser.git@67d270c65c201606fb86d548493d4b3fd8cc7a76#egg=django-shibboleth-remoteuser
git+https://github.com/Brown-University-Library/django-shibboleth-remoteuser.git@962f6f9818683ef5f6432f091d22945e54b82592#egg=django-shibboleth-remoteuser
prometheus_client
django-prometheus>=2.0,<2.1
django-prometheus>=2.2,<2.3

# LDAP support
python-ldap
django-auth-ldap>=2.2,<2.3
django-auth-ldap

# CAS authentication
django-cas-ng~=3.6
django-cas-ng

# Required for OpenID Connect authentication
mozilla-django-oidc~=1.2
mozilla-django-oidc~=2.0
34 changes: 19 additions & 15 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#
agentarchives==0.7.0
# via -r base.in
asgiref==3.4.1
# via django
bagit==1.8.1
# via -r base.in
boto3==1.23.10
Expand All @@ -16,7 +18,7 @@ botocore==1.26.10
# s3transfer
brotli==1.0.9
# via -r base.in
certifi==2023.5.7
certifi==2023.7.22
# via requests
cffi==1.15.1
# via cryptography
Expand All @@ -32,31 +34,31 @@ debtcollector==2.5.0
# oslo.config
# oslo.utils
# python-keystoneclient
django==1.11.29
django==3.2.20
# via
# -r base.in
# django-auth-ldap
# django-cas-ng
# django-csp
# jsonfield
# mozilla-django-oidc
django-auth-ldap==2.2.0
django-auth-ldap==4.0.0
# via -r base.in
django-cas-ng==3.6.0
django-cas-ng==4.3.0
# via -r base.in
django-csp==3.7
# via -r base.in
django-prometheus==2.0.0
django-prometheus==2.2.0
# via -r base.in
django-shibboleth-remoteuser @ git+https://github.com/Brown-University-Library/django-shibboleth-remoteuser.git@67d270c65c201606fb86d548493d4b3fd8cc7a76
django-shibboleth-remoteuser @ git+https://github.com/Brown-University-Library/django-shibboleth-remoteuser.git@962f6f9818683ef5f6432f091d22945e54b82592
# via -r base.in
django-tastypie==0.14.3
django-tastypie==0.14.5
# via -r base.in
gevent==22.10.2
# via -r base.in
greenlet==2.0.2
# via gevent
gunicorn==21.0.1
gunicorn==21.2.0
# via -r base.in
httplib2==0.22.0
# via sword2
Expand All @@ -83,7 +85,7 @@ jmespath==0.10.0
# botocore
josepy==1.13.0
# via mozilla-django-oidc
jsonfield==2.1.1
jsonfield==3.1.0
# via -r base.in
keystoneauth1==5.1.2
# via python-keystoneclient
Expand All @@ -95,7 +97,7 @@ lxml==4.9.3
# sword2
metsrw==0.4.0
# via -r base.in
mozilla-django-oidc==1.2.4
mozilla-django-oidc==2.0.0
# via -r base.in
msgpack==1.0.5
# via oslo.serialization
Expand Down Expand Up @@ -161,7 +163,7 @@ python-dateutil==2.8.2
# via
# botocore
# django-tastypie
python-gnupg==0.5.0
python-gnupg==0.5.1
# via -r base.in
python-keystoneclient==4.5.0
# via -r base.in
Expand All @@ -178,7 +180,7 @@ pytz==2023.3
# django
# oslo.serialization
# oslo.utils
pyyaml==6.0
pyyaml==6.0.1
# via oslo.config
requests==2.27.1
# via
Expand All @@ -196,12 +198,12 @@ s3transfer==0.5.2
# via boto3
six==1.16.0
# via
# jsonfield
# keystoneauth1
# mozilla-django-oidc
# python-cas
# python-dateutil
# python-keystoneclient
sqlparse==0.4.4
# via django
stevedore==3.5.2
# via
# keystoneauth1
Expand All @@ -210,7 +212,9 @@ stevedore==3.5.2
sword2 @ git+https://github.com/swordapp/python-client-sword2.git@59db54c03e4498dd6b001ac4f3a4167aa2fb8987
# via -r base.in
typing-extensions==4.1.1
# via importlib-metadata
# via
# asgiref
# importlib-metadata
urllib3==1.26.16
# via
# botocore
Expand Down
35 changes: 21 additions & 14 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#
agentarchives==0.7.0
# via -r base.txt
asgiref==3.4.1
# via
# -r base.txt
# django
bagit==1.8.1
# via -r base.txt
boto3==1.23.10
Expand All @@ -17,7 +21,7 @@ botocore==1.26.10
# s3transfer
brotli==1.0.9
# via -r base.txt
certifi==2023.5.7
certifi==2023.7.22
# via
# -r base.txt
# requests
Expand All @@ -43,33 +47,33 @@ debtcollector==2.5.0
# python-keystoneclient
dj-database-url==0.5.0
# via -r local.in
django==1.11.29
django==3.2.20
# via
# -r base.txt
# django-auth-ldap
# django-cas-ng
# django-csp
# jsonfield
# mozilla-django-oidc
django-auth-ldap==2.2.0
django-auth-ldap==4.0.0
# via -r base.txt
django-cas-ng==3.6.0
django-cas-ng==4.3.0
# via -r base.txt
django-csp==3.7
# via -r base.txt
django-prometheus==2.0.0
django-prometheus==2.2.0
# via -r base.txt
django-shibboleth-remoteuser @ git+https://github.com/Brown-University-Library/django-shibboleth-remoteuser.git@67d270c65c201606fb86d548493d4b3fd8cc7a76
django-shibboleth-remoteuser @ git+https://github.com/Brown-University-Library/django-shibboleth-remoteuser.git@962f6f9818683ef5f6432f091d22945e54b82592
# via -r base.txt
django-tastypie==0.14.3
django-tastypie==0.14.5
# via -r base.txt
gevent==22.10.2
# via -r base.txt
greenlet==2.0.2
# via
# -r base.txt
# gevent
gunicorn==21.0.1
gunicorn==21.2.0
# via -r base.txt
httplib2==0.22.0
# via
Expand Down Expand Up @@ -105,7 +109,7 @@ josepy==1.13.0
# via
# -r base.txt
# mozilla-django-oidc
jsonfield==2.1.1
jsonfield==3.1.0
# via -r base.txt
keystoneauth1==5.1.2
# via
Expand All @@ -119,7 +123,7 @@ lxml==4.9.3
# sword2
metsrw==0.4.0
# via -r base.txt
mozilla-django-oidc==1.2.4
mozilla-django-oidc==2.0.0
# via -r base.txt
msgpack==1.0.5
# via
Expand Down Expand Up @@ -213,7 +217,7 @@ python-dateutil==2.8.2
# -r base.txt
# botocore
# django-tastypie
python-gnupg==0.5.0
python-gnupg==0.5.1
# via -r base.txt
python-keystoneclient==4.5.0
# via -r base.txt
Expand All @@ -233,7 +237,7 @@ pytz==2023.3
# django
# oslo.serialization
# oslo.utils
pyyaml==6.0
pyyaml==6.0.1
# via
# -r base.txt
# oslo.config
Expand All @@ -258,12 +262,14 @@ s3transfer==0.5.2
six==1.16.0
# via
# -r base.txt
# jsonfield
# keystoneauth1
# mozilla-django-oidc
# python-cas
# python-dateutil
# python-keystoneclient
sqlparse==0.4.4
# via
# -r base.txt
# django
stevedore==3.5.2
# via
# -r base.txt
Expand All @@ -275,6 +281,7 @@ sword2 @ git+https://github.com/swordapp/python-client-sword2.git@59db54c03e4498
typing-extensions==4.1.1
# via
# -r base.txt
# asgiref
# importlib-metadata
urllib3==1.26.16
# via
Expand Down
Loading