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 wabu
Recipients gvanrossum, vstinner, wabu, yselivanov
Date 2014-10-21.20:12:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1413922330.06.0.97195688881.issue22685@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a more complete example

@coroutine
put_data(filename, queue, chunksize=16000):
    pbzip2 = yield from asyncio.create_subprocess_exec(
                 'pbzip2', '-cd', filename, 
                 stdout=asyncio.subprocess.PIPE, limit=self.chunksize*2)

    while not pbzip2.stdout.at_eof():
        data = yield from pbzip2.stdout.read(chunksize)
        yield from queue.put(data)

adding the workaround after createing the stream fixes the issue:
pbzip2.stdout.set_transport(pbzip2._transport.get_pipe_transport(1))
History
Date User Action Args
2014-10-21 20:12:10wabusetrecipients: + wabu, gvanrossum, vstinner, yselivanov
2014-10-21 20:12:10wabusetmessageid: <1413922330.06.0.97195688881.issue22685@psf.upfronthosting.co.za>
2014-10-21 20:12:10wabulinkissue22685 messages
2014-10-21 20:12:09wabucreate