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.20:05:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576008351.36.0.935000037611.issue33762@roundup.psfhosted.org>
In-reply-to
Content
Actually things are more complex. TemporaryFile is not a class, it is a function, so it does not make sense to use it with isinstance(). And if add support for TemporaryFile, NamedTemporaryFile and SpooledTemporaryFile should be supported too.

It may be easier to use a virtual subclassing: register IOBasePayload with a class which has an __instancecheck__() method which checks the existence of attributes "read" and "close".
History
Date User Action Args
2019-12-10 20:05:51serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, asvetlov, martin.panter, wumpus, Dutcho, sergiitk
2019-12-10 20:05:51serhiy.storchakasetmessageid: <1576008351.36.0.935000037611.issue33762@roundup.psfhosted.org>
2019-12-10 20:05:51serhiy.storchakalinkissue33762 messages
2019-12-10 20:05:51serhiy.storchakacreate