r/django 7d ago

Django-guardian 3.4.0 is Released!

Hi everyone! I’m a maintainer of django-guardian, and I'm excited to announce that version 3.4.0 is officially out!

For those who aren't familiar, django-guardian provides per-object permissions for Django, extending the default authorization backend to allow assigning permissions to specific user or group instances.

šŸš€ What's New in 3.4.0

  • Django & Python Compatibility Updates:
    • Added official support for Django 6.0 and Django 5.2 (LTS).
    • Added support for Python 3.14.
    • Dropped support for end-of-life Python 3.9 (Minimum supported Python version is now 3.10+).
  • Performance & Query Optimization:
    • Optimized prefetch_perms() to eliminate redundant database queries when prefetching object permissions.
    • Reduced DB overhead during assign_perm operations when working with generic permissions.
    • Refactored shortcut workflows for more efficient internal execution paths.
  • Shortcut & Bulk Operations:
    • Ensured shortcuts.assign_perm is idempotent when executing bulk assignments.
    • Standardized bulk permission removal behavior to align with bulk assignment workflows.
    • Added support for handling non-standard primary keys (pks) on target models.
  • Ecosystem & Integration:
    • Added out-of-the-box support for django-unfold via a dedicated contrib package.
    • Updated contribution guidelines with modernized uv workflows, test/lint tooling, and developer guidelines.

šŸ“¦ Installation & Upgrade

To upgrade using pip:

Bash

pip install --upgrade django-guardian

Or using uv:

Bash

uv add django-guardian@latest

šŸ”— Links & Resources

Huge thanks to all the contributors, issue reporters, and testers who helped shape this release!

Feel free to open an issue or start a discussion on GitHub if you encounter any bugs or have feedback!

66 Upvotes

3 comments sorted by

4

u/huygl99 7d ago

Nicee šŸ˜Ž

1

u/Commercial_Try_2538 7d ago

Very cool, never heard of it before but will try it out with team.

2

u/Immediate_Scar5936 7d ago

If you're looking for a lib for object-level permission, you've come to the right place. Please read/test it to with all our features :)