-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
JacobCoffee
commented
Jun 13, 2025
JacobCoffee
commented
Jun 13, 2025
length_is depr since 4.2, out in 5: https://docs.djangoproject.com/en/dev/releases/5.1/#features-removed-in-5-1
JacobCoffee
commented
Jun 13, 2025
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'..
JacobCoffee
commented
Jun 13, 2025
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.
This comment was marked as resolved.
JacobCoffee
commented
Jun 13, 2025
all that remains is https://github.com/python/pythondotorg/actions/runs/15639586106/job/44063439645?pr=2741 mentioned above me thinks
JacobCoffee
commented
Jun 13, 2025
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 🙃
a209091 to
f6271c9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
hugovk
commented
Jan 13, 2026
Doesn't change any code, but can also bump this to 5.2:
pythondotorg/.pre-commit-config.yaml
Line 6 in 72aef05
JacobCoffee
commented
Jan 20, 2026
We're ready 😎
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
* 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>
Uh oh!
There was an error while loading. Please reload this page.
Description
Closes