profile_imports not in bzrlib

John Arbash Meinel john at arbash-meinel.com
Thu Jun 22 16:52:45 BST 2006


Martin Pool wrote:
> On 22 Jun 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
>> The problem is that bzrlib.__init__ *and anything it imports* will be
>> excluded. Plus anything that has been imported by 'bzr' before we load
>> the profile_imports.py
> 
> Right.  We should probably try to reduce those imports; I think sys, os
> and locale could probably be fixed fairly easily by moving the user
> encoding into, say, osutils.

Well sys and os are actually already imported by 'bzr'. (And sys is
again imported in profile-imports.py)
So I'm not really worried about them. They are very core modules, and
probably have already been imported by the interpreter. (At least sys)

> 
>> I did sort of want to allow for profile_imports.py to be a standalone
>> lib, since I would probably like to use it on other things that I've
>> written.
> 
> Is it hygenic for us to just install it, do you think?  Or perhaps we
> should just leave it as is and maybe give a message if we get an
> ImportError telling folks to install it.  I suppose it is really a
> developer tool and so it's reasonable to expect people to have a bzr
> source checkout.

I don't think it is terrible. If we want to be more hygenic we could
prefix it. Something like bzr_profile_imports.py

> 
>> We could do both, and have it fall back to a builtin version if it can't
>> get a top-level version.
> 
> That sounds a bit complicated to me.
> 

Well, my thought was:

try:
  import profile_imports
except ImportError:
  from bzrlib import profile_imports

Not too tricky. Though I don't know what it would entail if we asked
'setup.py' to install a file inside bzrlib, that used to be next to it.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060622/c06256e9/attachment.pgp 


More information about the bazaar mailing list