Problems updating an old install

John Arbash Meinel john at arbash-meinel.com
Tue Jan 24 14:32:11 GMT 2006


Aaron Bentley wrote:
> Vincent LADEUIL wrote:
> 

...

> 
> Yes.  Python tries file-relative paths first, before trying the system
> libraries  Since there is an xml.pyc file, it concludes that xml ==
> bzrlib/xml.pyc.  Then, it tries to import sax in bzrlib, which is
> impossible.
> 
> Aaron

Which is why there was at least a PEP proposing that global paths would
be tried first, and if you wanted a local path you would use:

from . import xml
And you could get a parent path by doing
from .. import xml
And a grandparent with
from ... import xml

They decided '...' was the best, because it helped people realize they
shouldn't be doing that anyway. :)

I have no idea what the status of that was. I thought they were going to
add support for it in 2.4 and then make it mandatory in 2.5 or 2.6, but
I don't see support for it. And it was a long time ago when I read about it.

John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060124/b98072c5/attachment.pgp 


More information about the bazaar mailing list