# HG changeset patch # User Gregory Szorc # Date 2018-02-11 18:52:13 # Node ID 788b2e8530ae6c5282089adbf1b8330cc06fc2d3 # Parent 95791b275b73774d83829ab57f393baaadbdfb45 py3: use raw string for file open mode Otherwise the module importer rewrites it to bytes on Python 3, which angers Python 3. Differential Revision: https://phab.mercurial-scm.org/D2137 diff --git a/mercurial/archival.py b/mercurial/archival.py --- a/mercurial/archival.py +++ b/mercurial/archival.py @@ -218,7 +218,7 @@ class zipit(object): dest.tell() except (AttributeError, IOError): dest = tellable(dest) - self.z = zipfile.ZipFile(dest, 'w', + self.z = zipfile.ZipFile(dest, r'w', compress and zipfile.ZIP_DEFLATED or zipfile.ZIP_STORED)