fix_bytesmod: use the "from mercurial" form of the import to avoid breaking httpclient
authorAugie Fackler <raf@durin42.com>
Tue, 04 Feb 2014 18:33:25 -0500
changeset 20701 d20817ac628a
parent 20698 1147563faf62
child 20702 2764148aa088
fix_bytesmod: use the "from mercurial" form of the import to avoid breaking httpclient Without this patch, 2to3's rewrites to httpclient cause it to fail to import. With this patch, it's probably hopelessly broken, but at least won't block forward progress on non-http2 functionality on Python 3.
contrib/hgfixes/fix_bytesmod.py
--- a/contrib/hgfixes/fix_bytesmod.py	Mon Mar 10 17:52:42 2014 -0400
+++ b/contrib/hgfixes/fix_bytesmod.py	Tue Feb 04 18:33:25 2014 -0500
@@ -37,7 +37,7 @@
             if self.filename.endswith(bfn):
                 return
         if not self.filename.endswith('mercurial/py3kcompat.py'):
-            touch_import('.', 'py3kcompat', node=node)
+            touch_import('mercurial', 'py3kcompat', node=node)
 
         formatstr = results['formatstr'].clone()
         data = results['data'].clone()