~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

(gz) Make lazy imports proxy by default so that concurrent resolution is
 robust (Martin Packman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import bzrlib.bzrdir
24
24
 
25
 
from bzrlib.lazy_import import lazy_import
26
 
lazy_import(globals(), """
 
25
from bzrlib import lazy_import
 
26
lazy_import.lazy_import(globals(), """
27
27
import cStringIO
28
28
import errno
29
29
import sys
4004
4004
            load_list=None, debugflag=None, starting_with=None, subunit=False,
4005
4005
            parallel=None, lsprof_tests=False,
4006
4006
            sync=False):
 
4007
 
 
4008
        # During selftest, disallow proxying, as it can cause severe
 
4009
        # performance penalties and is only needed for thread
 
4010
        # safety. The selftest command is assumed to not use threads
 
4011
        # too heavily. The call should be as early as possible, as
 
4012
        # error reporting for past duplicate imports won't have useful
 
4013
        # backtraces.
 
4014
        lazy_import.disallow_proxying()
 
4015
 
4007
4016
        from bzrlib import tests
4008
4017
 
4009
4018
        if testspecs_list is not None: