[openstack-dev] Import ordering for oslo imports
Russell Bryant
rbryant at redhat.com
Fri May 31 14:38:53 UTC 2013
On 05/31/2013 10:33 AM, 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.
It depends what you mean by oslo imports. IMO:
A released oslo library is third-party to the project it is being used
by (example: oslo-config).
Any code imported into the project from oslo-incubator is under the
project's namespace (example: nova.openstack.common.rpc) and should be
included with the project's imports.
--
Russell Bryant
More information about the OpenStack-dev
mailing list