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 to Python 3.12 and Django 5 #477

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

smartspot2
Copy link
Member

@smartspot2 smartspot2 commented Jul 13, 2024

Closes #453

With the release of Django 5.0, Python 3.9 is no longer supported. Python 3.9 is also incredibly old at this point, so updating to a more recent version can be beneficial for the extra features and fixes.

This PR upgrades dependencies to support Django 5 and Python 3.12.

The most notable changes are:

  • All GitHub CI, Docker containers, and Heroku files have been updated to use Python 3.12 instead of 3.9.
  • Django 4.2 deprecated the DEFAULT_FILE_STORAGE and STATICFILES_STORAGE options, adding a new STORAGES option instead. The existing settings have been updated to use this new setting.
  • All existing dependencies have been updated to the most recent versions listed on PyPI.
  • Django 4.1 deprecated logging out with a GET request, and the ability to do so is removed in Django 5.0; this means that several places need to be adjusted to use POST requests instead. In particular:
    • The logout button now calls a utility method to send a POST request (following redirects)
    • A new Cypress command for logging out a user has been added, and existing Cypress tests that have a step logging users out were also updated. (New tests have been added to ensure that no regressions occur in the future.)

@smartspot2 smartspot2 added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jul 13, 2024
@smartspot2 smartspot2 requested review from edwardneo and jacovkim July 13, 2024 09:58
@smartspot2 smartspot2 self-assigned this Jul 13, 2024
Copy link

cypress bot commented Jul 13, 2024

csm_web    Run #387

Run Properties:  status check passed Passed #387  •  git commit 04e4db4b37: Upgrade to Python 3.12 and Django 5
Project csm_web
Branch Review deps/python-django-upgrade
Run status status check passed Passed #387
Run duration 02m 19s
Commit git commit 04e4db4b37: Upgrade to Python 3.12 and Django 5
Committer Alec Li
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 84
View all changes introduced in this branch ↗︎

@smartspot2 smartspot2 force-pushed the deps/python-django-upgrade branch from af03dca to 04e4db4 Compare December 6, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Python version
1 participant