~gz/brz/next_up_next

« back to all changes in this revision

Viewing changes to breezy/groupcompress.py

  • Committer: Breezy landing bot
  • Author(s): Martin
  • Date: 2017-05-25 00:04:21 UTC
  • mfrom: (6631.3.1 unmapped)
  • Revision ID: breezy.the.bot@gmail.com-20170525000421-xu23w9ll191pqid8
Make use of map Python 3 compatible

Merged from https://code.launchpad.net/~gz/brz/unmapped/+merge/324568

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from __future__ import absolute_import
20
20
 
 
21
from future_builtins import map
21
22
import time
22
23
import zlib
23
24
 
300
301
        compressor = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION)
301
302
        # Peak in this point is 1 fulltext, 1 compressed text, + zlib overhead
302
303
        # (measured peak is maybe 30MB over the above...)
303
 
        compressed_chunks = map(compressor.compress, chunks)
 
304
        compressed_chunks = list(map(compressor.compress, chunks))
304
305
        compressed_chunks.append(compressor.flush())
305
306
        # Ignore empty chunks
306
307
        self._z_content_chunks = [c for c in compressed_chunks if c]