This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Dutcho, asvetlov, martin.panter, sergiitk, serhiy.storchaka, terry.reedy, wumpus
Date 2019-12-10.19:07:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576004880.12.0.640381303756.issue33762@roundup.psfhosted.org>
In-reply-to
Content
Even if make TemporaryFile a subclass of IOBase (I am not sure we should do this) you could only use this in Python 3.9 and newer. I think it is better to fix this issue on the aiohttp side. aiohttp already registers payload types for a bunch of file-like types. You can also register it yourself:

aiohttp.payload.PAYLOAD_REGISTRY.register(aiohttp.payload.IOBasePayload, tempfile.TemporaryFile)

Seems IOBasePayload needs only read() and close() methods.
History
Date User Action Args
2019-12-10 19:08:00serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, asvetlov, martin.panter, wumpus, Dutcho, sergiitk
2019-12-10 19:08:00serhiy.storchakasetmessageid: <1576004880.12.0.640381303756.issue33762@roundup.psfhosted.org>
2019-12-10 19:08:00serhiy.storchakalinkissue33762 messages
2019-12-10 19:07:59serhiy.storchakacreate