[rfc] use absolute imports
John Arbash Meinel
john at arbash-meinel.com
Wed Feb 21 17:42:40 GMT 2007
Martin Pool wrote:
> After a conversation with John I thought I'd try enabling absolute
> imports. However, it looks like there's no clean way to turn these on
> only on python2.5, since they can't be guarded by an if or try/except
> block. Nevertheless I think our code should always use 'import
> bzrlib.foo' not 'import foo'.
I would be for this, since it is something we would like to do.
The only downside is plugins. Because they don't always know where they
are installed, so I've taken to using local imports there.
If this only changes it for a specific file we don't affect plugins, but
then again we don't affect the rest of our code base either. (And I
don't think we want to add that line to every file).
More information about the bazaar