Message233799
| Author | martin.panter |
|---|---|
| Recipients | Arfrever, christian.heimes, eric.araujo, martin.panter, nadeem.vawda, nikratio, pitrou, serhiy.storchaka, vstinner |
| Date | 2015-01-10.03:31:56 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1420860721.56.0.742961345632.issue15955@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Here is a patch for the higher-level LZMAFile implementation to use Nikolaus’s “max_length” parameter. It depends on Nikolaus’s patch also being applied. I split out a _RawReader class that does the actual decompress() calls, and then wrapped that in a BufferedReader. This avoids needing any special code to implement buffering, readline(), etc. The only significant changes in the API that I can see are: * LZMAFile now inherits the useless specification of BufferedReader.peek(), losing the guarantee of returning at least a single byte. I questioned the BufferedReader specification at <https://bugs.python.org/issue5811#msg233750>. * read() now accepts size=None, because BufferedReader does. I had to change a test case for this. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015-01-10 03:32:02 | martin.panter | set | recipients: + martin.panter, pitrou, vstinner, christian.heimes, nadeem.vawda, eric.araujo, Arfrever, nikratio, serhiy.storchaka |
| 2015-01-10 03:32:01 | martin.panter | set | messageid: <1420860721.56.0.742961345632.issue15955@psf.upfronthosting.co.za> |
| 2015-01-10 03:32:01 | martin.panter | link | issue15955 messages |
| 2015-01-10 03:32:01 | martin.panter | create | |