On 05/06/2011 08:45 AM, INADA Naoki wrote:
> Fixed.
>
> I've found some modules raises error on importing because of lacking some modules.
> Modules providing commands should be able to import while exporting command helps.
> Otherwise, help messages of the commands are not translated.
>
> I don't think this is a big problem because updating pot is as special as making
> package. Only few developers and buildbots do this task.
> Is this an acceptable limitation?
>
Modules ideally should not have dependency issues. ie You should be able
to run "python -c 'import bzrlib.XXX'" for any XXX and not have it fail.
If there are circular dependencies or missing dependencies, we should
fix this.
I had thought you were just grepping the code, but if you are importing
it, then we should probably go via a different path.
from bzrlib import initialize, plugin, commands
initialize().__enter__()
plugin.load_plugins()
# do stuff with the registered commands. Which will now include plugin-
# provided commands.
And then whatever else you need. Once you've done initialize +
load_plugins, I think everything should be in a happy enough state for
importing.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/06/2011 08:45 AM, INADA Naoki wrote:
> Fixed.
>
> I've found some modules raises error on importing because of lacking some modules.
> Modules providing commands should be able to import while exporting command helps.
> Otherwise, help messages of the commands are not translated.
>
> I don't think this is a big problem because updating pot is as special as making
> package. Only few developers and buildbots do this task.
> Is this an acceptable limitation?
>
Modules ideally should not have dependency issues. ie You should be able
to run "python -c 'import bzrlib.XXX'" for any XXX and not have it fail.
If there are circular dependencies or missing dependencies, we should
fix this.
I had thought you were just grepping the code, but if you are importing
it, then we should probably go via a different path.
from bzrlib import initialize, plugin, commands ).__enter_ _() load_plugins( )
initialize(
plugin.
# do stuff with the registered commands. Which will now include plugin-
# provided commands.
And then whatever else you need. Once you've done initialize +
load_plugins, I think everything should be in a happy enough state for
importing.
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk3 EBOsACgkQJdeBCY SNAAP7BwCeM5NWt QP/Cs03o8ssj/ gtafcg q+VyhiZrImKorY0 m7
D/8AnAydV84uiwe
=0Io/
-----END PGP SIGNATURE-----