hgdemandimport/__init__.py
author Siddharth Agarwal <sid0@fb.com>
Sun, 21 May 2017 12:10:53 -0700
changeset 32420 0906b85bf222
child 32422 f37f9499fea8
permissions -rw-r--r--
demandimport: move to separate package In Python 3, demand loading is per-package. Keeping demandimport in the mercurial package would disable demand loading for any modules in mercurial.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32420
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     1
# hgdemandimport - global demand-loading of modules for Mercurial
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     2
#
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     3
# Copyright 2017 Facebook Inc.
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     4
#
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     5
# This software may be used and distributed according to the terms of the
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     6
# GNU General Public License version 2 or any later version.
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     7
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     8
'''demandimport - automatic demand-loading of modules'''
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
     9
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    10
# This is in a separate package from mercurial because in Python 3,
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    11
# demand loading is per-package. Keeping demandimport in the mercurial package
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    12
# would disable demand loading for any modules in mercurial.
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    13
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    14
from __future__ import absolute_import
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    15
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    16
from . import demandimportpy2 as demandimport
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    17
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    18
# Re-export.
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    19
ignore = demandimport.ignore
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    20
isenabled = demandimport.isenabled
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    21
enable = demandimport.enable
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    22
disable = demandimport.disable
0906b85bf222 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com>
parents:
diff changeset
    23
deactivated = demandimport.deactivated