Mercurial > hg
changeset 44475:b7ca03dff14c stable
gzip: use the stdlib version with python 3 (issue6284)
It turned out that the stdlib gained the feature we missed in python 3.1. We can
now use it directly.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 10 Mar 2020 18:54:44 +0100 |
parents | a23b859ad17d |
children | df5dfee8cfb4 |
files | mercurial/archival.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/archival.py Tue Mar 10 18:53:19 2020 +0100 +++ b/mercurial/archival.py Tue Mar 10 18:54:44 2020 +0100 @@ -135,7 +135,9 @@ '''write archive to tar file or stream. can write uncompressed, or compress with gzip or bzip2.''' - if True: + if pycompat.ispy3: + GzipFileWithTime = gzip.GzipFile # camelcase-required + else: class GzipFileWithTime(gzip.GzipFile): def __init__(self, *args, **kw):