[openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP
Doug Hellmann
doug at doughellmann.com
Tue Feb 20 14:46:01 UTC 2018
Excerpts from Robert Collins's message of 2018-02-20 22:58:59 +1300:
> On 20 February 2018 at 04:39, Andrey Kurilin <andr.kurilin at gmail.com> wrote:
> > Can someone explain me the reason for including "tests" module into
> > packages?
>
> Namespacing the tests makes the test ids unique which is very helpful
> for aggregating test data as we do. Including that in the tar.gz that
> is uploaded to PyPI is pretty standard - a) its how you can verify
> that what you downloaded works in your context (and no, going to git
> is not a good answer there because that means you now need the entire
> ecosystem of tools to build man pages etc etc etc). and b) its
> providing the full source of the thing we're releasing. Thats you
> know, how F/LOSS works.
Thanks, Robert, that's the argument I was trying to remember earlier in
the thread.
> It should be possible, if we care to, to exclude the tests from wheels
> made from those distributions, which would make the footprint for
> binary usage smaller - I have no strong opinion on whether thats wise
> or not, but I will say I can't see a use case for needing the tests in
> that scenario.
>
> Similarly whether those tests should be included in Linux distribution
> packages or not is a debate I don't care to enter - but again I don't
> see a use case: binary distributions are presumed to be integration
> tested by the distributor, not the consumers.
>
> I don't think importing code from another packages 'tests' module is
> wrong or right - python is very much a consenting-adults language -
> but I do think that in OpenStack with the sheer number of people
> involved we should set very clear guidance; and I'd suggest that
> saying its not supported is a good default: if folk want to offer a
> contract where something can be imported they can always put it in a
> different package.
Exactly. The Oslo team struggles sometimes to support project teams
using the libraries in unexpected ways. This is one of those
unexpected uses, and I think we don't want to support it because
we have not designed the test suite with backwards compatibility
in mind. We just need to be clear about that.
>
> In summary:
> - moving 'tests' to the root is a poor idea, please don't do it - we
> had this debate back in 2011 or so and nothing has changed that I can
> see.
> - we can, and perhaps should, exclude $package.tests from wheels to
> save bandwidth (but *not* from .tar.gz).
> - linux distributions should IMO follow what we put in wheels.
>
> -Rob
>
More information about the OpenStack-dev
mailing list