wagtail / Willow

A wrapper that combines the functionality of multiple Python image libraries into one API
https://willow.wagtail.org/
BSD 3-Clause "New" or "Revised" License
273 stars 53 forks source link

Many tests failing with `TypeError: Unsupported type as file input: <class '_io.BytesIO'>` #100

Closed jams2 closed 1 year ago

jams2 commented 2 years ago

Appears to have been introduced in https://github.com/wagtail/Willow/commit/084a112aac21af97d0924c9447c739722cd4539e, which replaced imghdr with filetype. filetype does not handle BytesIO as input.

Opening this to track the issue, I've also opened https://github.com/h2non/filetype.py/issues/140 and will submit a patch if filetype maintainers are into it.

gasman commented 1 year ago

Fixed in #101