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 #1833

Merged
merged 14 commits into from
Aug 21, 2023
Merged

Upgrade Django to 3.2 #1833

merged 14 commits into from
Aug 21, 2023

Conversation

replaceafill
Copy link
Member

@replaceafill replaceafill commented Aug 20, 2023

This sets django-upgrade in pre-commit to upgrade Django to 3.2. Python requirements have been upgraded to compatible versions too.

Two changes are worth highlighting:

  • The custom main.models.BlobTextField used to represent some paths has been replaced with Django's BinaryField. Combining Django 3.2 TextField with the MySQL's longblob type like the custom field does is not possible anymore since Django writes (and overwrites) Python's binary representation to the database. Switching to BinaryField allow us to keep using the same MySQL type without requiring data migrations, and makes the binary-type nature of those fields explicit in the Python code.
  • In Django 1.11 the compilemessages command didn't fail when it was not able to write *.mo files due to permissions. In Django 3.2 the command fails interrupting the Docker build. That's why this sets ownership of the locale/**/LC_MESSAGES directories to the archivematica user explicitly.

Depends on artefactual-labs/archivematica-acceptance-tests#185
Connected to archivematica/Issues#1279

@replaceafill replaceafill added AMAUAT Issues relating to the improvement of the AM Automated Acceptance tests and removed AMAUAT Issues relating to the improvement of the AM Automated Acceptance tests labels Aug 20, 2023
@replaceafill replaceafill merged commit 05c0bc7 into qa/1.x Aug 21, 2023
10 checks passed
@replaceafill replaceafill deleted the dev/issue-1279-django32 branch August 21, 2023 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants