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 ztane
Recipients Gary Fernie, danieljewell, martin.panter, nubirstein, terry.reedy, ztane
Date 2020-10-30.12:51:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604062311.96.0.105513318299.issue26175@roundup.psfhosted.org>
In-reply-to
Content
Another test case:

import tempfile
import io
import json


with tempfile.SpooledTemporaryFile(max_size=2**20) as f:
    tf = io.TextIOWrapper(f, encoding='utf-8')
    json.dump({}, fp=tf)

I was writing json to a file-like object that I need to read in as binary (to upload to S3). Originally the code used BytesIO and I thought it would be wise to actually spool this to disk as I was operating with possible limited RAM... except that of course it didn't work.
History
Date User Action Args
2020-10-30 12:51:52ztanesetrecipients: + ztane, terry.reedy, martin.panter, Gary Fernie, nubirstein, danieljewell
2020-10-30 12:51:51ztanesetmessageid: <1604062311.96.0.105513318299.issue26175@roundup.psfhosted.org>
2020-10-30 12:51:51ztanelinkissue26175 messages
2020-10-30 12:51:51ztanecreate