django-versatileimagefield and Django 3.1/3.2 compatibility

38 views
Skip to first unread message

Fabio C. Barrionuevo da Luz

unread,
Mar 29, 2021, 3:44:34 PM3/29/21
to django...@googlegroups.com
Hello community

From the point of view of those who develop pluggable apps for Django, do you know if there has been any significant change in ImageField / FileField implementation (and related code) between Django 3.0 and 3.1 and which is not explicitly mentioned in the release notes and maybe possible can break pluggable apps that use it?

I'm trying to fix django-versatileimagefield and make it compatible with Django 3.1 and 3.2, however, the tests only pass on Django 3.0 or lower, and I was unable to discover any other significant changes other than the "self.name/self.field.name"  to "self.attname/self.field.attname" in some places.

At the moment, I'm getting a lot of "AttributeError: 'Foo' object has no attribute 'bar'" errors, like:

AttributeError: 'VersatileImageFieldFile' object has no attribute '_ppoi_value'
AttributeError: 'VersatileImageFieldFile' object has no attribute 'filters'
AttributeError: 'VersatileImageFieldFile' object has no attribute 'thumbnail'

The full traceback can be found at this link: https://github.com/luzfcb/django-versatileimagefield/runs/2221660202?check_suite_focus=true#step:7:135

If someone is interested in looking at the source code:

https://github.com/luzfcb/django-versatileimagefield/tree/django3.2_tox_github_actions

Or to be more specific:

https://github.com/luzfcb/django-versatileimagefield/blob/django3.2_tox_github_actions/versatileimagefield/files.py

https://github.com/luzfcb/django-versatileimagefield/blob/django3.2_tox_github_actions/versatileimagefield/fields.py


If you have any ideas or guesses as to the cause of these errors, let me know.

I'm digging into the implementation of django-versatileimagefield, but I'm still trying to understand how the pieces fit together in order to finally figure out a way to fix this.

--
Fabio C. Barrionuevo da Luz
Palmas - Tocantins - Brazil - South America
GMT -3 Timezone
https://github.com/luzfcb/
https://twitter.com/luzfcb/

Reply all
Reply to author
Forward
0 new messages