Upgrade Django to 6.0.5 and add django-tasks configuration#4633
Upgrade Django to 6.0.5 and add django-tasks configuration#4633marcoacierno wants to merge 4 commits intomainfrom
Conversation
Bumps [django](https://github.com/django/django) from 5.2.8 to 6.0.5. - [Commits](django/django@5.2.8...6.0.5) --- updated-dependencies: - dependency-name: django dependency-version: 6.0.4 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
django-timezone-field 7.0 requires django>=3.2,<6.0, which conflicts with the Django 6.0.5 upgrade. Updating to >=7.1 for Django 6.0 support. Co-authored-by: Marco Acierno <marcoacierno@users.noreply.github.com>
- Set TASKS to django_tasks ImmediateBackend so modelsearch keeps working (Django 6.0 ships its own django.tasks.* with a different Task signature that lacks `enqueue_on_commit`, which broke the modelsearch @task decorator). - Bump django-autocomplete-light from 3.9.4 to 4.0.0 (3.9.4 imports the removed `django.utils.itercompat` module).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4633 +/- ##
=======================================
Coverage 92.52% 92.52%
=======================================
Files 359 359
Lines 10791 10792 +1
Branches 821 821
=======================================
+ Hits 9984 9985 +1
Misses 696 696
Partials 111 111 🚀 New features to boost your workflow:
|
|
This PR upgrades Django 5.2.8 → 6.0.5, django-autocomplete-light 3.9.4 → 4.0.0, and adds a `TASKS` configuration block using `ImmediateBackend` from django-tasks. Critical: `ImmediateBackend` in `base.py` affects production`backend/pycon/settings/base.py:382-386` The `TASKS` block is set in `base.py` with `ImmediateBackend`, which executes tasks synchronously in the request thread. Since `prod.py` inherits from `base.py` and has no `TASKS` override, production will also run tasks synchronously, blocking HTTP threads. The PR description itself notes this backend is "suitable for development and testing environments." Move this setting to `dev.py` and `test.py` only, or add a proper async backend override in `prod.py`. `django-tasks` missing as a direct dependency`backend/pyproject.toml` `django_tasks.backends.immediate.ImmediateBackend` is referenced in settings, but `django-tasks` is only a transitive dependency (via wagtail). If wagtail ever drops it, the settings will break at runtime with no resolution error. Add it as a direct dependency. `django_tasks` not in `INSTALLED_APPS``backend/pycon/settings/base.py` Not required for `ImmediateBackend`, but `DatabaseBackend` (the natural production choice) does require it in `INSTALLED_APPS` for migrations. Worth adding now to avoid a future surprise. Unconfirmed compatibilityThe PR description lists open TODO items — verifying Django 6.0.5 compatibility, testing task execution, and updating docs — none of which are confirmed complete. Given this is a major version jump, merging with unverified compatibility is risky. `django-timezone-field` missing upper boundChanged from `==7.0` to `>=7.1` with no upper bound. Future `uv lock` runs could pull in breaking major versions. Use `>=7.1,<8.0` to be consistent with other packages in the file (e.g., `countries<1.0.0,>=0.2.0`). |
What
The django-tasks configuration uses the
ImmediateBackendwhich executes tasks synchronously, suitable for development and testing environments.ToDo
https://claude.ai/code/session_012iLUaDFSVctE7tbLx6RTyF