Patchwork [5,of,6,py3,v4] init: zstd is already python3-ready, so don't run it through our importer

login
register
mail settings
Submitter Augie Fackler
Date March 11, 2017, 7:39 p.m.
Message ID <f4179c62dc3fee6dadd8.1489261157@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/19103/
State Accepted
Headers show

Comments

Augie Fackler - March 11, 2017, 7:39 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1489014679 18000
#      Wed Mar 08 18:11:19 2017 -0500
# Node ID f4179c62dc3fee6dadd8451214ad565986c3b149
# Parent  eb7a5670afe8cbf8865b890af198608a793ce94c
init: zstd is already python3-ready, so don't run it through our importer

Patch

diff --git a/mercurial/__init__.py b/mercurial/__init__.py
--- a/mercurial/__init__.py
+++ b/mercurial/__init__.py
@@ -137,6 +137,9 @@  if sys.version_info[0] >= 3:
             # Only handle Mercurial-related modules.
             if not fullname.startswith(('mercurial.', 'hgext.', 'hgext3rd.')):
                 return None
+            # zstd is already dual-version clean, don't try and mangle it
+            if fullname.startswith('mercurial.zstd'):
+                return None
 
             # This assumes Python 3 doesn't support loading C modules.
             if fullname in _dualmodules: