Skip to content

Upgrade to Django 6.0#6411

Open
a5m0 wants to merge 2 commits intocookiecutter:mainfrom
a5m0:upgrade/django-6.0
Open

Upgrade to Django 6.0#6411
a5m0 wants to merge 2 commits intocookiecutter:mainfrom
a5m0:upgrade/django-6.0

Conversation

@a5m0
Copy link

@a5m0 a5m0 commented Mar 4, 2026

Description

Upgrade to Django 6.0 (ref #6226)

Changes

  • Update django 5.2.12 -> 6.0.3 and pyup constraint < 6.0 -> < 7.0
  • Update ADMINS setting from deprecated tuple format to string format (deprecated in Django 6.0)
  • Update django-upgrade pre-commit target from 5.2 to 6.0
  • Remove outdated Pillow pyup constraint
  • Update pyproject.toml Django framework classifier

Dependency Compatibility

All dependencies verified compatible with Django 6.0, no git installs or constraint overrides needed:

Package Version Django constraint
django-celery-beat 2.9.0 Django<6.1,>=2.2
django-storages 1.14.6 Django>=3.2
django-allauth 65.14.3 No upper bound
djangorestframework 3.16.1 No upper bound
django-redis 6.0.0 No upper bound
django-model-utils 5.0.0 No upper bound
drf-spectacular 0.29.0 No upper bound

Testing

  • Generated project with cookiecutter --no-input (use_celery=y, rest_api=DRF, use_whitenoise=y)
  • manage.py check: 0 issues
  • manage.py migrate: all migrations applied
  • pytest: 31/31 tests passed

Checklist:

  • I've made sure that tests are updated accordingly
  • I've updated the documentation or confirm that my change doesn't require any updates

Rationale

Django 5.2 enters extended support (security fixes only) while Django 6.0 is now the actively supported release. All dependencies already support Django 6.0 on PyPI — the only blocker was django-celery-beat, which was resolved in their 2.9.0 release (Django<6.1).

Fix #6226
Closes #6233

@a5m0 a5m0 force-pushed the upgrade/django-6.0 branch 4 times, most recently from 507b034 to 8c3c89b Compare March 4, 2026 07:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the Cookiecutter Django template to target Django 6.0, aligning dependency pins, template settings, and related tooling/configuration with the new major version.

Changes:

  • Bump Django pin to 6.0.3 and adjust pyup constraint to < 7.0; remove outdated Pillow pyup constraint.
  • Update ADMINS setting format in the generated project settings and adjust generation test expectation accordingly.
  • Update django-upgrade pre-commit target version and refresh Django version references/classifiers (README + pyproject).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
{{cookiecutter.project_slug}}/requirements/base.txt Updates Django pin/pyup constraint and removes outdated Pillow constraint comment.
{{cookiecutter.project_slug}}/config/settings/base.py Changes ADMINS representation for Django 6.0 compatibility.
{{cookiecutter.project_slug}}/.pre-commit-config.yaml Updates django-upgrade target version to 6.0.
tests/test_cookiecutter_generation.py Updates assertion to match new ADMINS formatting in generated settings.
pyproject.toml Updates trove classifier to Django 6.0.
README.md Updates stated supported Django version to 6.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@a5m0 a5m0 mentioned this pull request Mar 4, 2026
2 tasks
a5m0 added 2 commits March 4, 2026 03:41
- Update django 5.2.12 -> 6.0.3 and pyup constraint < 6.0 -> < 7.0
- Update ADMINS setting from deprecated tuple format to string format
  (tuple format deprecated in Django 6.0)
- Update django-upgrade target from 5.2 to 6.0
- Bump factory-boy 3.3.2 -> 3.3.3
- Remove outdated Pillow pyup constraint
- Update pyproject.toml Django framework classifier

All dependencies verified compatible with Django 6.0:
django-celery-beat 2.9.0 (Django<6.1), django-storages 1.14.6,
django-allauth 65.14.3, djangorestframework 3.16.1,
django-redis 6.0.0, and all others install and pass tests.

Ref: cookiecutter#6226
@a5m0 a5m0 force-pushed the upgrade/django-6.0 branch from b46e120 to 7dc8da2 Compare March 4, 2026 09:41
@browniebroke
Copy link
Member

There are still a few packages with a red cross on #6226 but most of them are actually running fine under 6.0 (I use most of them on a project).

The only exception is django-stubs:

We test mypy on the generated project but we don't use a lot of Django features. I wonder if folks will run into frictions into their project after adding stuff because support wouldn't be fully there?

On the other hand, a type check issue can be silenced with a comment and hopefully it won't be too long before they release django-stubs 6.0

Copy link
Member

@browniebroke browniebroke 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. I didn't see any mentions of dropping Postgres version this time around

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.

[Update Django] Django 6.0

3 participants