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 (and related packages) to 4.2 #9866

Merged
merged 25 commits into from
Aug 21, 2023

Conversation

jacobtylerwalls
Copy link
Member

@jacobtylerwalls jacobtylerwalls commented Aug 3, 2023

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Django 3.2 will be end-of-life in April 2024. Since Arches 7.5 is an LTS, require the current Django LTS (4.2).

Upgrade Django-related dependencies.

Require Python 3.8 (see related docs update).

Fix some (not all) deprecation warnings to make it easier to get a clean test run with python -Werror manage.py test. Some deprecations are left for #9832 when Python 3.11 will be required.

Issues Solved

Closes #9799

Checklist

  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Ticket Background

Further comments

This is probably easier to review commit by commit.

Upgrade instructions

In addition to usual steps like reinstalling all dependencies and running migrations, consider also:

  • python manage.py makemigrations (before running migrations)
  • remove USE_L10N setting
  • change DEFAULT_FILE_STORAGE to STORAGES["default"]["BACKEND"]

@chiatt chiatt self-assigned this Aug 7, 2023
@jacobtylerwalls
Copy link
Member Author

jacobtylerwalls commented Aug 8, 2023

@chiatt A handful of changes will be needed in projects e.g. afs (similar replacements of ugettext etc.)

I already have them prepared but haven't PR'd them to afs because it looks like afs isn't targeting Arches 7.5 yet.

@chiatt chiatt requested a review from apeters August 9, 2023 23:01
@jacobtylerwalls jacobtylerwalls linked an issue Aug 14, 2023 that may be closed by this pull request
@chiatt
Copy link
Member

chiatt commented Aug 16, 2023

Thanks @jacobtylerwalls, could you document those changes in the release notes (releases/7.5.0.md) under "Upgrading an Arches Project"?

@jacobtylerwalls
Copy link
Member Author

Done!

Should I also add the elastic changes this PR added to address deprecations? I don't know to what extent users are managing that themselves. We can also handle it later when actually upgrading elastic, but we might forget.

arches/app/datatypes/datatypes.py Outdated Show resolved Hide resolved
arches/app/search/elasticsearch_dsl_builder.py Outdated Show resolved Hide resolved
Copy link
Member

@apeters apeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@jacobtylerwalls
Copy link
Member Author

Thanks for pushing this over the line!

@jacobtylerwalls jacobtylerwalls removed the request for review from chiatt August 21, 2023 14:22
@jacobtylerwalls jacobtylerwalls merged commit 3d5e4b4 into archesproject:dev/7.5.x Aug 21, 2023
1 check passed
@jacobtylerwalls jacobtylerwalls deleted the django42 branch August 21, 2023 14:46
jacobtylerwalls added a commit to archesproject/arches-for-science that referenced this pull request Aug 21, 2023
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.

Upgrade Arches 7.5 to Django 4.2
3 participants