Patchwork [6,of,8] demandimport: declare victory over PyPy

login
register
mail settings
Submitter Bryan O'Sullivan
Date Dec. 23, 2015, 6:24 a.m.
Message ID <af1cada80ab29e60e01b.1450851884@bryano-mbp.local>
Download mbox | patch
Permalink /patch/12270/
State Changes Requested
Delegated to: Yuya Nishihara
Headers show

Comments

Bryan O'Sullivan - Dec. 23, 2015, 6:24 a.m.
# HG changeset patch
# User Bryan O'Sullivan <bos@serpentine.com>
# Date 1450849087 28800
#      Tue Dec 22 21:38:07 2015 -0800
# Node ID af1cada80ab29e60e01bd04a33d6bd4e582c5508
# Parent  129b519e02b92b1f352d6776e271b310279b67db
demandimport: declare victory over PyPy

This is based on the preceding import fixes, and backs out 4e554a7df1e9.

Patch

diff --git a/mercurial/demandimport.py b/mercurial/demandimport.py
--- a/mercurial/demandimport.py
+++ b/mercurial/demandimport.py
@@ -237,9 +237,6 @@  def isenabled():
 
 def enable():
     "enable global demand-loading of modules"
-    # PyPy doesn't work with demand import.
-    if '__pypy__' in sys.builtin_module_names:
-        return
 
     if os.environ.get('HGDEMANDIMPORT') != 'disable':
         builtins.__import__ = _demandimport