deps: update to django 5.2
Description
- Update to Django 5.2
Closes
- Resolves #2709
Otherwise I think all other deps are good to go? I donβt know if i trust it :) With honeypot commented out:
β¦(1)π€·] via π orbstack via π€ v22.5.1 via ξ΅ pyenv via π v2.7.8 took 3m37s
β uv pip install -r dev-requirements.txt
Resolved 102 packages in 347ms
Prepared 2 packages in 916ms
Uninstalled 2 packages in 467ms
Installed 2 packages in 58ms
- django==4.2.22
+ django==5.2
- django-celery-beat==2.5.0
+ django-celery-beat==2.8.1
Waiting on https://github.com/jazzband/django-pipeline/issues/834 due to https://github.com/python/pythondotorg/actions/runs/15638699855/job/44060476992?pr=2741
length_is depr since 4.2, out in 5: https://docs.djangoproject.com/en/dev/releases/5.1/#features-removed-in-5-1
Tests passing locally π
β¦1)π€·β] via π orbstack via π€ v22.5.1 via ξ΅ pyenv via π v2.7.8 took 2m27s
β make test
# Build web container for this project
docker compose build --force-rm web
Compose can now delegate builds to bake for better performance.
To do so, set COMPOSE_BAKE=true.
[+] Building 24.0s (19/19) FINISHED docker:orbstack
=> [web internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.67kB 0.0s
=> [web internal] load metadata for docker.io/library/python:3.12.6- 0.6s
=> [web internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [web stage-0 1/13] FROM docker.io/library/python:3.12.6-bookworm 0.0s
=> [web internal] load build context 1.0s
=> => transferring context: 5.74MB 0.9s
=> CACHED [web stage-0 2/13] RUN set -eux; rm -f /etc/apt/apt.c 0.0s
=> CACHED [web stage-0 3/13] RUN --mount=type=cache,target=/var/cac 0.0s
=> CACHED [web stage-0 4/13] RUN case $(uname -m) in "x86_ 0.0s
=> CACHED [web stage-0 5/13] RUN mkdir /code 0.0s
=> CACHED [web stage-0 6/13] WORKDIR /code 0.0s
=> CACHED [web stage-0 7/13] COPY dev-requirements.txt /code/ 0.0s
=> [web stage-0 8/13] COPY base-requirements.txt /code/ 0.3s
=> [web stage-0 9/13] COPY prod-requirements.txt /code/ 0.2s
=> [web stage-0 10/13] COPY requirements.txt /code/ 0.1s
=> [web stage-0 11/13] RUN pip --no-cache-dir --disable-pip-version- 3.2s
=> [web stage-0 12/13] RUN --mount=type=cache,target=/root/.cache/p 12.8s
=> [web stage-0 13/13] COPY . /code/ 4.1s
=> [web] exporting to image 1.5s
=> => exporting layers 1.5s
=> => writing image sha256:9e7f18d79b7d2bb55db6323cab4f79580a2179aa1 0.0s
=> => naming to docker.io/library/pythondotorg:docker-compose 0.0s
=> [web] resolving provenance for metadata file 0.0s
[+] Building 1/1
β web Built 0.0s
# Mark the state so we don't rebuild this needlessly.
mkdir -p .state && touch .state/docker-build-web
# Load all fixtures
docker compose run --rm web ./manage.py loaddata fixtures/*.json
[+] Creating 2/2
β Container pythondotorg-redis-1 Running 0.0s
β Container pythondotorg-postgres-1 Running 0.0s
/usr/local/lib/python3.12/site-packages/haystack/__init__.py:4: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import DistributionNotFound, get_distribution, parse_version
System check identified some issues:
WARNINGS:
SponsorshipBenefit: (ordered_model.W003) OrderedModelBase subclass has a ModelManager that does not inherit from OrderedModelManager. This is not ideal but will work.
SponsorshipPackage: (ordered_model.W003) OrderedModelBase subclass has a ModelManager that does not inherit from OrderedModelManager. This is not ideal but will work.
Installed 3144 object(s) from 6 fixture(s)
# Mark the state so we don't rebuild this needlessly.
mkdir -p .state && touch .state/db-initialized
docker compose run --rm web ./manage.py test
[+] Creating 2/2
β Container pythondotorg-postgres-1 Running 0.0s
β Container pythondotorg-redis-1 Running 0.0s
/usr/local/lib/python3.12/site-packages/haystack/__init__.py:4: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import DistributionNotFound, get_distribution, parse_version
Found 623 test(s).
Creating test database for alias 'default'...
Got an error creating the test database: database "test_pythondotorg" already exists
Type 'yes' if you would like to try deleting the test database 'test_pythondotorg', or 'no' to cancel: yes
Destroying old test database for alias 'default'...
System check identified some issues:
WARNINGS:
SponsorshipBenefit: (ordered_model.W003) OrderedModelBase subclass has a ModelManager that does not inherit from OrderedModelManager. This is not ideal but will work.
SponsorshipPackage: (ordered_model.W003) OrderedModelBase subclass has a ModelManager that does not inherit from OrderedModelManager. This is not ideal but will work.
System check identified 2 issues (0 silenced).
...................................................................................................................................................................................................................................................................................Fullfilling full_conference_passes_code_2025 for Foo: 1848846014
Fullfilling pycon_expo_hall_only_passes_code_2025 for Foo: 1471792621
Fullfilling pycon_additional_full_conference_passes_code_2025 for Foo: 1176205334
Fullfilling pycon_additional_expo_hall_only_passes_2025 for Foo: 1461117240
Done!
.............................................................................................................................................................................../usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
warnings.warn(
............................................................/usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
warnings.warn(
../usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
warnings.warn(
...............................................................................................................
----------------------------------------------------------------------
Ran 623 tests in 91.728s
OK
Destroying test database for alias 'default'..
Investigate separately these non-failing warnings
......................../usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
warnings.warn(
............................................................/usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
warnings.warn(
../usr/local/lib/python3.12/site-packages/admin_interface/templatetags/admin_interface_tags.py:29: UserWarning: Language chooser requires 'django.middleware.locale.LocaleMiddleware' in your MIDDLEWARE to work.
warnings.warn
Investigate separately these non-failing warnings
WARNINGS:
SponsorshipBenefit: (ordered_model.W003) OrderedModelBase subclass has a ModelManager that does not inherit from OrderedModelManager. This is not ideal but will work.
SponsorshipPackage: (ordered_model.W003) OrderedModelBase subclass has a ModelManager that does not inherit from OrderedModelManager. This is not ideal but will work.
all that remains is https://github.com/python/pythondotorg/actions/runs/15639586106/job/44063439645?pr=2741 mentioned above me thinks
Methodology was to run
git ls-files -z -- '*.py' | xargs -0r uvx run django-upgrade --target-vers ion 5.2 which didnt change much, didn't catch the length_is deprecation for example, then run make test and fix deps one by one as they failed π