Skip to content

Upgrade Django to 6.0.5#531

Merged
bpepple merged 10 commits into
masterfrom
wiki
May 28, 2026
Merged

Upgrade Django to 6.0.5#531
bpepple merged 10 commits into
masterfrom
wiki

Conversation

@bpepple
Copy link
Copy Markdown
Member

@bpepple bpepple commented May 25, 2026

Summary

  • Vendor django-wiki and django-nyt as internal apps rather than uv dependencies, giving us full control to apply fixes and customizations without waiting on upstream releases
  • Upgrade Django to 6.0.5 (the vendored approach was necessary because upstream packages don't yet support Django 6.0)
  • Add test coverage for both vendored apps
  • Clean up the vendored code: remove unused JS/translations, apply ruff linting throughout

Changes

Vendoring

  • wiki/ — django-wiki vendored as an internal app; templates moved into wiki/templates/
  • django_nyt/ — django-nyt notification backend vendored as an internal app

Tests

  • tests/wiki/ — covers models, views, permissions, and all plugins (attachments, images, links, notifications, globalhistory)
  • tests/django_nyt/ — covers models, views, and utils

Cleanup

  • Removed unnecessary JavaScript bundled with the wiki
  • Removed unused translation files
  • Applied ruff linting to both wiki/ and django_nyt/
  • Fixed a naive datetime warning in TestCollectionItemModel::test_collection_item_with_date_read (used timezone-aware datetime for a DateTimeField)

bpepple added 10 commits May 25, 2026 15:38
Replace the third-party `wiki` PyPI package with a local copy under wiki/, consolidate its templates into the app, and remove unused Bootstrap static files. Former transitive deps (django-mptt, django-nyt, django-sekizai, bleach, markdown, pymdown-extensions) are now listed as direct dependencies.
django-nyt 1.5.0 introduced a hard django<5.3 upper bound, blocking the Django 6.0 upgrade. Since django-wiki is already vendored, vendor django-nyt alongside it and remove it as an external dependency.

Also fixes a Python 3.14 JSON serialization bug where naturaltime() returned a lazy __proxy__ object that json.dumps could not serialize.

Adds tests covering models, notify/subscribe/unsubscribe utilities, and views.
- Apply ruff fixes throughout the vendored django_nyt app: convert relative to absolute imports, fix model field/method ordering (DJ012), replace assert statements with proper exceptions, convert f-strings in logging calls to % format, replace open() with Path.open(), and wrap long docstring lines.
- Add django_nyt/migrations to per-file-ignores.
@bpepple bpepple changed the title Vendor django-wiki as an internal app Upgrade Django to 6.0.5 May 26, 2026
@bpepple bpepple self-assigned this May 27, 2026
@bpepple bpepple added the dependencies Pull requests that update a dependency file label May 27, 2026
@bpepple bpepple marked this pull request as ready for review May 28, 2026 13:52
@bpepple bpepple merged commit 8abeef4 into master May 28, 2026
2 checks passed
@bpepple bpepple deleted the wiki branch May 28, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant