[openstack-dev] Import ordering for oslo imports

Mark McLoughlin markmc at redhat.com
Fri May 31 14:42:27 UTC 2013


On Fri, 2013-05-31 at 10:33 -0400, David Ripton wrote:
> hacking's HACKING.rst says:
> 
>    {{stdlib imports in human alphabetical order}}
>    \n
>    {{third-party lib imports in human alphabetical order}}
>    \n
>    {{nova imports in human alphabetical order}}
>    \n
>    \n
>    {{begin your code}}
> 
> But should oslo imports (in code outside oslo itself) go in the 
> third-party section or the project section?  oslo is kind of both -- 
> it's a separate project but it's part of OpenStack, not truly third-party.
> 
> I've seen it both ways in code I've reviewed lately, and it would be 
> nice to be consistent.

If you mean e.g. oslo.config imports, they should go in the
"third-party" section - i.e. it's code from outside the nova repo

If you mean code copied from oslo-incubator, then that does live in the
nova repo and should go in the 'nova imports' section

Cheers,
Mark.




More information about the OpenStack-dev mailing list