Upgrade Django to 3.2 and update dependencies - #546
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Upgrade the project dependencies—most notably updating Django from 2.2 to 3.2 (LTS) along with compatible package updates—and modernize configuration, routing, and CI workflow checks.
Approach
2.2.28to3.2.25and bumped related dependencies (djangorestframework,django-prometheus,sentry-sdk,django-cors-headers) to versions compatible with Django 3.2.rorapi/common/urls.pyto replace deprecatedurlcalls withre_path.DEFAULT_AUTO_FIELD,CORS_ALLOW_ALL_ORIGINS,AutoSchemacompatibility, and removing duplicate middleware).pip check,manage.py check,makemigrations --check --dry-run) to the GitHub Actions test workflow.rorapi/v2/tests.pyto fix import paths and test client ID validation properly.Key Modifications
requirements.txt):Django: 2.2.28 -> 3.2.25djangorestframework: 3.11.2 -> 3.12.4django-prometheus: 1.0.15 -> 2.2.0sentry-sdk: 0.12.2 -> 1.45.1django-cors-headers: 3.1.0 -> 3.13.0rorapi/common/urls.py):django.conf.urls.urlreferences todjango.urls.re_path.rorapi/settings.py):DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'.'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema'to maintain compatibility withcoreapischema/documentation generation.CORS_ORIGIN_ALLOW_ALLwithCORS_ALLOW_ALL_ORIGINS.django.middleware.common.CommonMiddlewareentry inMIDDLEWARE.USE_L10N = True..github/workflows/run_tests.yml,.travis.yml,.env.travis):pip check,python -Wd manage.py check, andpython manage.py makemigrations --check --dry-runto workflow steps..travis.ymland.env.travis.rorapi/v2/tests.py):from rorapi.v2.models import Client./validate-client-id/<client_id>/.Important Technical Details
REST_FRAMEWORK['DEFAULT_SCHEMA_CLASS']torest_framework.schemas.coreapi.AutoSchemaensures thatinclude_docs_urlscontinues functioning as expected under Django REST Framework 3.12+.DEFAULT_AUTO_FIELDprevents Django 3.2 from generating unwanted implicit auto field migrations across models.Types of changes
Reviewer, please remember our guidelines: