[PR #1388] Update to Django 4.2.x #2905

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

Original Pull Request: https://github.com/ArchiveBox/ArchiveBox/pull/1388

State: closed
Merged: Yes


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
**Original Pull Request:** https://github.com/ArchiveBox/ArchiveBox/pull/1388 **State:** closed **Merged:** Yes --- # 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
kerem 2026-03-01 18:01: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#2905
No description provided.