Message117436
Both file.truncate() and StringIO.truncate() accept an optional "size" parameter to truncate the file to a specific size. SpooledTemporaryFile should accept a similar parameter and pass it on.
The only tricky part is that truncate can potentially increase the size of a file, so it needs to check the max size and rollover if appropriate.
Patch is against py3k branch; should work on trunk modulo the use of b"xxx" in the tests. |
|
| Date |
User |
Action |
Args |
| 2010-09-27 02:02:31 | rfk | set | recipients:
+ rfk |
| 2010-09-27 02:02:31 | rfk | set | messageid: <[email protected]> |
| 2010-09-27 02:02:29 | rfk | link | issue9957 messages |
| 2010-09-27 02:02:29 | rfk | create | |
|