Unsafe import in bzrlib/index.py
John Arbash Meinel
john at arbash-meinel.com
Thu Nov 15 14:12:59 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
>>>>>> "john" == John Arbash Meinel <john at arbash-meinel.com> writes:
...
>
> Since Aaron mentioned that (lazy_import should only import
> modules) I try to update all modules I modified to do just that,
> never import vars or functions *whether or not* they use
> lazy_import.
>
> It's generally quite mechanical but I introduced a bug in the
> launchpad plugin for lack of tests so some care should be taken.
>
> Do we all agree about this practice or should I refrain from
> continuing ?
>
> Vincent
Well, I follow that practice, and change modules when appropriate.
The actual problem with the LP plugin was that you did that, and then
introduced gather_user_credentials() without any tests for that function.
But in general, the test suite is meant to catch that sort of change, so I
think it should be safe. Maybe not do it during freeze week, but at the
beginning of a cycle it seems like a good idea.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHPFPrJdeBCYSNAAMRAmjPAKCVwoNoEFOCUOgc6QgOXruNmvGVvACgrLog
5qVnXQNgHZy3sBHRK+a5XxQ=
=8vdF
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list