# HG changeset patch # User Pierre-Yves David # Date 1583862884 -3600 # Node ID b7ca03dff14c63d64ad7bfa36a2d0a36a6b62253 # Parent a23b859ad17dd0a5b9bb37846b69b5e30f99c44c 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. diff -r a23b859ad17d -r b7ca03dff14c mercurial/archival.py --- 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):