[PR #1388] [MERGED] Update to Django 4.2.x #4408

Closed
opened 2026-03-15 01:43:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1388
Author: @jimwins
Created: 3/26/2024
Status: Merged
Merged: 3/26/2024
Merged by: @pirate

Base: devHead: upgrade-django-to-4.2.x


📝 Commits (1)

  • 8b1b01e Update to Django 4.2.x, now in LTS until April 2026

📊 Changes

6 files changed (+104 additions, -86 deletions)

View changed files

📝 archivebox/core/__init__.py (+0 -1)
📝 archivebox/core/admin.py (+100 -75)
📝 archivebox/core/apps.py (+0 -2)
📝 archivebox/core/settings.py (+0 -4)
📝 archivebox/core/urls.py (+2 -2)
📝 pyproject.toml (+2 -2)

📄 Description

Summary

This updates Django to 4.2.x, which is currently in LTS until April 2026, and away from 3.1.x which is no longer supported.

More changes may be required. I had to stub out the LDAP stuff in archivebox/core/auth.py to get it to run locally (but did not commit this) because of ImportError: attempted relative import beyond top-level package errors. I'm not sure I understand the dependencies there, but it seems like LDAP configuration should get passed into the Django app rather than it trying to import it from outside core. (This commit fixes the LDAP issue that I had.)

This didn't cause any additional tests to fail for me, and some cursory poking around the UI didn't turn up any problems.

The change to archivebox/core/admin.py is less significant than it appears because it's really just moving the AdminSite subclass above the ModelAdmin subclasses so the @admin.register(..., site=archivebox_admin) works. Maybe it would be an opportunity to split these admin classes into a package.

Related issues

I have no idea if this fixes any reported issues, but probably not. I assume some new features come from updating Django, but I don't know enough to even suggest what those might be.

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Snapshot data layout on disk

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/1388 **Author:** [@jimwins](https://github.com/jimwins) **Created:** 3/26/2024 **Status:** ✅ Merged **Merged:** 3/26/2024 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `upgrade-django-to-4.2.x` --- ### 📝 Commits (1) - [`8b1b01e`](https://github.com/ArchiveBox/ArchiveBox/commit/8b1b01e508bf5827fd8d98a9cd1cdaf028d09a15) Update to Django 4.2.x, now in LTS until April 2026 ### 📊 Changes **6 files changed** (+104 additions, -86 deletions) <details> <summary>View changed files</summary> 📝 `archivebox/core/__init__.py` (+0 -1) 📝 `archivebox/core/admin.py` (+100 -75) 📝 `archivebox/core/apps.py` (+0 -2) 📝 `archivebox/core/settings.py` (+0 -4) 📝 `archivebox/core/urls.py` (+2 -2) 📝 `pyproject.toml` (+2 -2) </details> ### 📄 Description # Summary This updates Django to 4.2.x, which is currently in LTS until April 2026, and away from 3.1.x which is no longer supported. More changes may be required. <s>I had to stub out the LDAP stuff in `archivebox/core/auth.py` to get it to run locally (but did not commit this) because of `ImportError: attempted relative import beyond top-level package` errors. I'm not sure I understand the dependencies there, but it seems like LDAP configuration should get passed into the Django app rather than it trying to import it from outside `core`.</s> ([This commit](https://github.com/ArchiveBox/ArchiveBox/pull/1327/commits/eaa4a9c5ea14d1fc11740af460e9e9a1135babd0) fixes the LDAP issue that I had.) This didn't cause any additional tests to fail for me, and some cursory poking around the UI didn't turn up any problems. The change to `archivebox/core/admin.py` is less significant than it appears because it's really just moving the `AdminSite` subclass above the `ModelAdmin` subclasses so the `@admin.register(..., site=archivebox_admin)` works. Maybe it would be an opportunity to split these admin classes into a package. # Related issues I have no idea if this fixes any reported issues, but probably not. I assume some new features come from updating Django, but I don't know enough to even suggest what those might be. # Changes these areas - [ ] Bugfixes - [ ] Feature behavior - [ ] Command line interface - [ ] Configuration options - [X] Internal architecture - [ ] Snapshot data layout on disk --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 01:43:06 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#4408
No description provided.