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 vstinner
Recipients cstratak, lars.gustaebel, nitishch, vstinner
Date 2018-06-20.13:04:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529499895.38.0.56676864532.issue31774@psf.upfronthosting.co.za>
In-reply-to
Content
Extract of tartest.py:

tarfile.open(name=_tmp_tar, mode='w', bufsize=EXPECTED_SIZE)

Hum, the bufsize argument only applies to the "...|compression" modes (ex: "w|gz"). Moreover, it shouldn't change the size of the tarfile, it only changes the size of parameters of read() and write() arguments. 

Extract of Stream.__write():

    while len(self.buf) > self.bufsize:
        self.fileobj.write(self.buf[:self.bufsize])
        self.buf = self.buf[self.bufsize:]

> Trying to create an archive with the tarfile module, by specifying a different blocking factor, (...)

I didn't know that we can change the "blocking factor". In the UNIX tar command, I see the -b option:

       -b, --blocking-factor=BLOCKS
              Set record size to BLOCKSx512 bytes.


In Lib/tarfile.py, I see:

BLOCKSIZE = 512                 # length of processing blocks
RECORDSIZE = BLOCKSIZE * 20     # length of records

So values are hardcoded in Python.


So this issue is a feature request, not a bug report :-)
History
Date User Action Args
2018-06-20 13:04:55vstinnersetrecipients: + vstinner, lars.gustaebel, cstratak, nitishch
2018-06-20 13:04:55vstinnersetmessageid: <1529499895.38.0.56676864532.issue31774@psf.upfronthosting.co.za>
2018-06-20 13:04:55vstinnerlinkissue31774 messages
2018-06-20 13:04:55vstinnercreate