hikari-py / hikari

A Discord API wrapper for Python and asyncio built on good intentions.
https://docs.hikari-py.dev/en/stable
MIT License
806 stars 95 forks source link

Fix uploading files when using aiohttp 3.10.6 and onwards #2059

Closed davfsa closed 1 week ago

davfsa commented 1 week ago

In aiohttp 3.10.6, a new abstract method was added to aiohttp.Payload, so trying to instantiate our _FilePayload, would cause issues.

It is impossible to implement .decode in a sync context, so, for now, just error pointing them to raise an issue with us if this ever becomes an issue in the future, in which case we will have to revisit this and look for an alternative and better solution