Patchwork [7,of,8,py3,v3] init: zstd is already python3-ready, so don't run it through our importer

login
register
mail settings
Submitter Augie Fackler
Date March 8, 2017, 11:22 p.m.
Message ID <eefc1048d292cda28d44.1489015366@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/19036/
State Accepted
Headers show

Comments

Augie Fackler - March 8, 2017, 11:22 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1489014679 18000
#      Wed Mar 08 18:11:19 2017 -0500
# Node ID eefc1048d292cda28d4493ac5a6ea56c68fed1e2
# Parent  9788576dc5009344c2649a7a56565cdf20713112
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: