Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

deps: update to django 5.2 #2741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
JacobCoffee merged 16 commits into main from django-5.2
Feb 6, 2026
Merged

deps: update to django 5.2 #2741

JacobCoffee merged 16 commits into main from django-5.2
Feb 6, 2026

Conversation

@JacobCoffee
Copy link
Member

@JacobCoffee JacobCoffee commented Jun 13, 2025
edited
Loading

Description

  • Update to Django 5.2

Closes

This comment was marked as resolved.

Copy link
Member Author

@JacobCoffee JacobCoffee added dependencies Pull requests that update a dependency file do-not-merge labels Jun 13, 2025
Copy link
Member Author

Copy link
Member Author

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'..

Copy link
Member Author

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

This comment was marked as resolved.

Copy link
Member Author

Copy link
Member Author

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 🙃

This comment was marked as outdated.

Copy link
Member

hugovk commented Jan 13, 2026

Doesn't change any code, but can also bump this to 5.2:

args: [--target-version=4.2]
JacobCoffee reacted with thumbs up emoji

Copy link
Member Author

We're ready 😎

hugovk reacted with hooray emoji

Copilot AI review requested due to automatic review settings February 6, 2026 15:08

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 6, 2026 15:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

This comment was marked as resolved.

This comment was marked as outdated.

Copilot AI and others added 2 commits February 6, 2026 09:33
* Initial plan
* Pin Django to version 5.2.11
Co-authored-by: JacobCoffee <45884264+JacobCoffee@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JacobCoffee <45884264+JacobCoffee@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 6, 2026 15:34
@JacobCoffee JacobCoffee removed the request for review from ewdurbin February 6, 2026 15:35

This comment was marked as outdated.

@JacobCoffee JacobCoffee merged commit 0338231 into main Feb 6, 2026
16 checks passed
@JacobCoffee JacobCoffee deleted the django-5.2 branch February 6, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

Assignees

No one assigned

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Enhancement: Django 5.2

AltStyle によって変換されたページ (->オリジナル) /