[Django] #35884: Django doesn't support Pillow v11: ValueError('Invalid dimensions')

8 views
Skip to first unread message

Django

unread,
Nov 4, 2024, 9:50:51 AM11/4/24
to django-...@googlegroups.com
#35884: Django doesn't support Pillow v11: ValueError('Invalid dimensions')
-------------------------------------+-------------------------------------
Reporter: jedie | Type:
| Uncategorized
Status: new | Component: File
| uploads/storage
Version: 5.0 | Severity: Normal
Keywords: pillow, PIL, image, | Triage Stage:
imagefield | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Django's django.core.files.images.get_image_dimensions() feeds PIL with
chunks to get the image size. Pillow v11 adds "raise ValueError" in v11
with https://github.com/python-
pillow/Pillow/commit/e6e5ef5c5fbd83ac5dd63301e4d7d6860a7b2d09#diff-
6ad43f85f1a075181d4d8cfcd97ae27bba1eccf5c3db5a3457160f98218eba6eR1404 that
Django doesn't catch in the feed loop, here:
https://github.com/django/django/blob/968397228fe03968bb855856532569586c8a8a1c/django/core/files/images.py#L35-L89
--
Ticket URL: <https://code.djangoproject.com/ticket/35884>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 4, 2024, 9:55:15 AM11/4/24
to django-...@googlegroups.com
#35884: Django doesn't support Pillow v11: ValueError('Invalid dimensions')
-------------------------------------+-------------------------------------
Reporter: jedie | Owner: (none)
Type: Uncategorized | Status: new
Component: File | Version: 5.0
uploads/storage |
Severity: Normal | Resolution:
Keywords: pillow, PIL, image, | Triage Stage:
imagefield | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jedie):

* has_patch: 0 => 1

Comment:

Patch is here: https://github.com/django/django/pull/18764
--
Ticket URL: <https://code.djangoproject.com/ticket/35884#comment:1>

Django

unread,
Nov 4, 2024, 11:15:05 AM11/4/24
to django-...@googlegroups.com
#35884: Django doesn't support Pillow v11: ValueError('Invalid dimensions')
-------------------------------------+-------------------------------------
Reporter: jedie | Owner: (none)
Type: Uncategorized | Status: new
Component: File | Version: 5.0
uploads/storage |
Severity: Normal | Resolution:
Keywords: pillow, PIL, image, | Triage Stage:
imagefield | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Alexander Lazarević):

I think this is an duplicate of #33240
--
Ticket URL: <https://code.djangoproject.com/ticket/35884#comment:2>

Django

unread,
Nov 5, 2024, 2:38:07 AM11/5/24
to django-...@googlegroups.com
#35884: Django doesn't support Pillow v11: ValueError('Invalid dimensions')
-------------------------------------+-------------------------------------
Reporter: jedie | Owner: (none)
Type: Uncategorized | Status: closed
Component: File | Version: 5.0
uploads/storage |
Severity: Normal | Resolution: duplicate
Keywords: pillow, PIL, image, | Triage Stage:
imagefield | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* resolution: => duplicate
* status: new => closed

Comment:

Thank you for raising an issue in Pillow jedie
I have commented there: https://github.com/python-
pillow/Pillow/issues/8530#issuecomment-2456436638
Essentially, we are following the Pillow docs so I feel like this could be
an issue in Pillow 11 and they should confirm before we make changes to
Django

Agree this can be tracked by #33240
--
Ticket URL: <https://code.djangoproject.com/ticket/35884#comment:3>
Reply all
Reply to author
Forward
0 new messages