Skip to content

Upgrade to Django 3.2 LTS (Python 3.10) - #1571

Open
viniciusandrade wants to merge 8 commits into
mainfrom
rc/3.2
Open

Upgrade to Django 3.2 LTS (Python 3.10)#1571
viniciusandrade wants to merge 8 commits into
mainfrom
rc/3.2

Conversation

@viniciusandrade

Copy link
Copy Markdown
Member

Upgrades the stack from Django 2.2.24 → 3.2.25 LTS on Python 3.7.8 → 3.10 (python:3.10-alpine). Bundles the Phase 2 deprecation fixes (commit 4ee052a) already on this branch.

Goals

  • Upgrade Django 2.2.24 → 3.2.25 LTS with Python 3.10
  • Bump prod + dev dependencies to newest Django 3.2-compatible versions
  • Fix Django 3.0 hard breakers before the bump: from_db_value signature, {% load staticfiles %} in templates, render_to_response calls/imports across views
  • Add DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' to settings (preserve integer PKs)
  • Switch python-memcachedpymemcache (PyMemcacheCache) in requirements + conf env files
  • makemigrations produces no unexpected migrations for local apps
  • Full test suite passes (make dev_test) in the rebuilt Python 3.10 image

Notes

  • jsonfield==3.1.0 retained — native JSONField migration is deferred to Phase 4.
  • Automated tests only; manual checks deferred to the validation environment.
  • Local DB-dump artifacts (proc/dump-db*.sh, proc/*.sql) were intentionally left untracked.

See .ai/features/004-upgrade-django-phase3-django-3.2.md for the detailed spec.

Replace ugettext_lazy/ugettext with gettext_lazy/gettext across 72 files,
remove django.utils.six and force_text, replace abandoned django-form-utils
with minimal betterforms shim, remove dead recaptcha-client dependency,
and remove deprecated default_app_config. All changes backward-compatible
with Django 2.2.
Upgrade Django 2.2.24 -> 3.2.25 LTS with Python 3.7.8 -> 3.10.
Bump prod + dev dependencies to Django 3.2-compatible versions,
switch python-memcached -> pymemcache (PyMemcacheCache), and add
DEFAULT_AUTO_FIELD = django.db.models.AutoField to preserve integer PKs.

Fix Django 3.0 hard breakers: from_db_value signature, {% load staticfiles %}
in templates, and render_to_response calls/imports across views.
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.

1 participant