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 v4 and upgrade other python dependencies #744

Merged
merged 6 commits into from
Jun 26, 2023

Conversation

dchiller
Copy link
Collaborator

@dchiller dchiller commented Jun 21, 2023

Dependency changes: Upgrade to Django 4

The main impetus behind this PR was to close #743. As such, the following dependencies were changed pursuant to upgrading to django 4:

  • Bump django from 3.2.19 to 4.2.2 (latest patch of LTS version)
    • Support for python 3.6 was dropped in django 4. django 4 requires a minimum of python 3.8. All containers where python is installed now use > 3.8.
    • django-extensions supports django 4 starting with django-extensions 3.2. This PR includes the latest patch at django-extensions 3.2.3 (also the latest version).
    • djangorestframework added support for django 4.1 with djangorestframework 3.14. djangorestframework 3.14 is also working with django 4.2.
    • Django support for psycopg2 is likely to be deprecated in the future. Django 4 documentation suggests moving to psycopg. This PR goes ahead and makes that switch by removing psycopg2 and adding psycopg 3.1.8. This upgrade required changing the ENGINE option for the database in settings.py.
  • Bump python from 3.6.9 to 3.10.12. A minimum of python 3.8 is required for django 4; however, upgrade to 3.10 is possible with no additional dependency considerations.
    • coverage became compatible with python 3.8 with coverage >= 5.
    • With the required update to python 3.8, pip raised an dependency conflict error between celery (at 5.1.2) and django-celery-results (at 2.4.0). Upgrading celery >= 5.2 (the most recent version is at 5.3.1) solved the issue.

Additional upgrades

The following additional dependency upgrades are made to take advantage of package fixes and patches:

  • celery: 5.2.0 -> 5.3.1
  • Markdown: 2.6.2 -> 3.4.3
  • requests: 2.20.0 -> 2.31.0
  • coverage: 5.0.0 -> 7.2.7
  • django-celery-results: 2.4.0 -> 2.5.1
  • Werkzeug: 2.0.3 -> 2.3.6

An upgrade to solrpy is available, but results in unexpected output. Cantus Ultimus's used of solrpy already has some issues an inconsistencies, so this PR leaves that to a later time.

@dchiller dchiller changed the title Upgrade to Django 4 Upgrade python dependencies Jun 23, 2023
Django 4.1 deprecated the default_app_config option that was used
previously to install the cantusdata app. This app is now installed using
a dotted path in the settings.py file.

Django 4.1 also added a new positional argument to post_delete signals,
which is added with this commit.
@dchiller dchiller changed the title Upgrade python dependencies Upgrade Django to v4 and upgrade other python dependencies Jun 26, 2023
@dchiller dchiller marked this pull request as ready for review June 26, 2023 19:54
@dchiller dchiller merged commit f4f9427 into DDMAL:main Jun 26, 2023
@dchiller dchiller deleted the upgrade-to-django-4 branch June 26, 2023 21:05
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 to Django 4
2 participants