Tracker field and Django 3.2
Opened this issue · 0 comments
brianmay commented
Problem
I want to be able to upgrade my application to Django 3.2.
But I was forced to stay behind and use an old version of django-model-utils (3.1.2), because the TrackerField
has been broken. I think this might be:
But this old version of django-model-utils breaks with Django 3.2:
E AttributeError: 'DeferredAttribute' object has no attribute 'field_name'
/home/brian/.cache/pypoetry/virtualenvs/karaage-uhi1oUwy-py3.9/lib/python3.9/site-packages/model_utils/tracker.py:112: AttributeError
So I need to upgrade django-model-utils. Fair enough. But it breaks due to the previous issue:
Apparently Django 4.0 would fix this (?), but:
- Recommended Django upgrade practise is that I upgrade to 3.2 release first.
- Django 4.0 breaks a number of 3rd party packages that we use, don't particularly want to have to round up and fix all of these.
- I actually do want the LTS release of Django.
So what is the solution? Is there any solution to get this working with Django 3.2? Maybe by patching the old version?
Or maybe I need to migrate/rewrite my code not to use TrackerField
?
Environment
- Django Model Utils version: 3.1.2/4.2 as discussed
- Django version: 3.2
- Python version: 3.9