Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-20 Thread Doug Hellmann
Excerpts from Robert Collins's message of 2018-02-20 22:58:59 +1300:
> On 20 February 2018 at 04:39, Andrey Kurilin  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
> 

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-20 Thread Robert Collins
On 20 February 2018 at 04:39, Andrey Kurilin  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.

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.

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

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Tony Breeds
On Mon, Feb 19, 2018 at 10:00:59AM -0500, Michael Bayer wrote:
> Hi list -
> 
> Apparently Cinder was misled by my deprecations within the
> oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> in https://review.openstack.org/#/c/522290/ the assumption was made
> that these should be imported from oslo_db.tests.sqlalchemy.This
> is an immense mistake on my part that I did not expect people to go
> looking for the same names elsewhere in private packages and now we
> have a serious downstream issue as these modules are not packaged, as
> well as the possibility that the oslo_db.tests. package is now locked
> in time and I have to add deprecations there also.
> 
> If anyone knows of projects (or feels like helping me search) that are
> importing *anything* from oslo_db.tests these must be reverted ASAP.

I get:

[tony@thor openstack]$ grep -Erin '((from|import) oslo_db.tests|from oslo_db 
import tests)' */*/*
openstack/cinder/cinder/tests/unit/db/test_migrations.py:29:from 
oslo_db.tests.sqlalchemy import base as test_base
openstack/glance/glance/tests/functional/db/test_migrations.py:23:from 
oslo_db.tests.sqlalchemy import base as test_base
openstack/glare/glare/tests/unit/db/migrations/test_migrations.py:35:from 
oslo_db.tests.sqlalchemy import base as test_base
openstack/ironic/build/lib/ironic/tests/unit/db/sqlalchemy/test_migrations.py:47:from
 oslo_db.tests.sqlalchemy import base as test_base
openstack/ironic/ironic/tests/unit/db/sqlalchemy/test_migrations.py:47:from 
oslo_db.tests.sqlalchemy import base as test_base
openstack/neutron/neutron/tests/unit/db/test_sqlalchemytypes.py:19:from 
oslo_db.tests.sqlalchemy import base as test_base

+ bunch of oslo_db hits but I guess they're un interesting ;P

I last updated my local clones yesterday so it shouldn't be too far from
the current state.

Yours Tony.


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Michael Bayer
Summarizing all the reviews:

Doug's proposed check in oslo_db.tests: https://review.openstack.org/#/c/545859/
Mark oslo_db internal fixtures private:   https://review.openstack.org/545862
Cinder: https://review.openstack.org/545860
Neutron: https://review.openstack.org/545868
Ironic: https://review.openstack.org/545874
Glance: https://review.openstack.org/545878
Glare: https://review.openstack.org/545883



On Mon, Feb 19, 2018 at 11:32 AM, Doug Hellmann  wrote:
> Excerpts from Michael Bayer's message of 2018-02-19 10:55:52 -0500:
>> wow that's heavy-handed.  should that be in an oslo utility package of
>> some kind ?
>
> I thought about that, but figured we should wait and see whether we
> actually want to take the approach before polishing it. If we do we can
> add a function in oslo.utils.
>
>>
>> On Mon, Feb 19, 2018 at 10:52 AM, Doug Hellmann  
>> wrote:
>> > Excerpts from Doug Hellmann's message of 2018-02-19 10:15:34 -0500:
>> >> Excerpts from Michael Bayer's message of 2018-02-19 10:00:59 -0500:
>> >> > Hi list -
>> >> >
>> >> > Apparently Cinder was misled by my deprecations within the
>> >> > oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
>> >> > in https://review.openstack.org/#/c/522290/ the assumption was made
>> >> > that these should be imported from oslo_db.tests.sqlalchemy.This
>> >> > is an immense mistake on my part that I did not expect people to go
>> >> > looking for the same names elsewhere in private packages and now we
>> >> > have a serious downstream issue as these modules are not packaged, as
>> >> > well as the possibility that the oslo_db.tests. package is now locked
>> >> > in time and I have to add deprecations there also.
>> >> >
>> >> > If anyone knows of projects (or feels like helping me search) that are
>> >> > importing *anything* from oslo_db.tests these must be reverted ASAP.
>> >> >
>> >>
>> >> If we have modules or classes we don't expect people to be importing
>> >> directly, we need to prefix the names with _ to comply with the naming
>> >> conventions we have previously told everyone to look for to recognize
>> >> private code.
>> >>
>> >> I think it's safe to treat "tests" as an exception (after resolving
>> >> this case) but we should probably document that.
>> >>
>> >> Doug
>> >
>> > Once we resolve the current set of imports, we can land a patch like
>> > https://review.openstack.org/545859 to prevent this from happening in
>> > the future.
>> >
>> > Doug
>> >
>> > __
>> > OpenStack Development Mailing List (not for usage questions)
>> > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Doug Hellmann
Excerpts from Michael Bayer's message of 2018-02-19 10:55:52 -0500:
> wow that's heavy-handed.  should that be in an oslo utility package of
> some kind ?

I thought about that, but figured we should wait and see whether we
actually want to take the approach before polishing it. If we do we can
add a function in oslo.utils.

> 
> On Mon, Feb 19, 2018 at 10:52 AM, Doug Hellmann  wrote:
> > Excerpts from Doug Hellmann's message of 2018-02-19 10:15:34 -0500:
> >> Excerpts from Michael Bayer's message of 2018-02-19 10:00:59 -0500:
> >> > Hi list -
> >> >
> >> > Apparently Cinder was misled by my deprecations within the
> >> > oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> >> > in https://review.openstack.org/#/c/522290/ the assumption was made
> >> > that these should be imported from oslo_db.tests.sqlalchemy.This
> >> > is an immense mistake on my part that I did not expect people to go
> >> > looking for the same names elsewhere in private packages and now we
> >> > have a serious downstream issue as these modules are not packaged, as
> >> > well as the possibility that the oslo_db.tests. package is now locked
> >> > in time and I have to add deprecations there also.
> >> >
> >> > If anyone knows of projects (or feels like helping me search) that are
> >> > importing *anything* from oslo_db.tests these must be reverted ASAP.
> >> >
> >>
> >> If we have modules or classes we don't expect people to be importing
> >> directly, we need to prefix the names with _ to comply with the naming
> >> conventions we have previously told everyone to look for to recognize
> >> private code.
> >>
> >> I think it's safe to treat "tests" as an exception (after resolving
> >> this case) but we should probably document that.
> >>
> >> Doug
> >
> > Once we resolve the current set of imports, we can land a patch like
> > https://review.openstack.org/545859 to prevent this from happening in
> > the future.
> >
> > Doug
> >
> > __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Michael Bayer
On Mon, Feb 19, 2018 at 10:57 AM, Andrey Kurilin  wrote:
> As for downstream you can do whatever you want, but it looks like this issue
> should be solved in upstream. I mean if "tests" directory is located at the
> top level of the repo, no one will use it.

again, the search at
http://codesearch.openstack.org/?q=oslo_db.tests&i=nope&files=&repos=
shows four downstream projects using it.   I am now submitting gerrits
for all four and also getting internal downstream patches to fix
internally.  this is as bad as it gets.




> Also, setuptools supports `exclude` option which should solve the issue as
> well.
>
>
>
> 2018-02-19 17:41 GMT+02:00 Michael Bayer :
>>
>> On Mon, Feb 19, 2018 at 10:39 AM, Andrey Kurilin 
>> wrote:
>> > Can someone explain me the reason for including "tests" module into
>> > packages?
>>
>> the "tests" module should not be inside packages.   Downstream we have
>> CI running Cinder's test suite against packaged dependencies, which
>> fails because we don't package oslo_db.tests.
>>
>>
>> >
>> >
>> > 2018-02-19 17:00 GMT+02:00 Michael Bayer :
>> >>
>> >> Hi list -
>> >>
>> >> Apparently Cinder was misled by my deprecations within the
>> >> oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
>> >> in https://review.openstack.org/#/c/522290/ the assumption was made
>> >> that these should be imported from oslo_db.tests.sqlalchemy.This
>> >> is an immense mistake on my part that I did not expect people to go
>> >> looking for the same names elsewhere in private packages and now we
>> >> have a serious downstream issue as these modules are not packaged, as
>> >> well as the possibility that the oslo_db.tests. package is now locked
>> >> in time and I have to add deprecations there also.
>> >>
>> >> If anyone knows of projects (or feels like helping me search) that are
>> >> importing *anything* from oslo_db.tests these must be reverted ASAP.
>> >>
>> >>
>> >> __
>> >> OpenStack Development Mailing List (not for usage questions)
>> >> Unsubscribe:
>> >> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >
>> >
>> >
>> >
>> > --
>> > Best regards,
>> > Andrey Kurilin.
>> >
>> >
>> > __
>> > OpenStack Development Mailing List (not for usage questions)
>> > Unsubscribe:
>> > openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
>
> --
> Best regards,
> Andrey Kurilin.
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Andrey Kurilin
Imo, it creates more problems than profits. If someone wants to change the
code and run tests -> use git repositories. Prepared python package is not
about this.

2018-02-19 17:57 GMT+02:00 Doug Hellmann :

> IIRC we started doing that so that consumers building their own packages
> can run the tests for the packages easily. I don't know how many people
> are doing that, and apparently at least some downstream consumers aren't
> packaging everything anyway so they couldn't run those tests.
>
> Excerpts from Andrey Kurilin's message of 2018-02-19 17:39:11 +0200:
> > Can someone explain me the reason for including "tests" module into
> > packages?
> >
> > 2018-02-19 17:00 GMT+02:00 Michael Bayer :
> >
> > > Hi list -
> > >
> > > Apparently Cinder was misled by my deprecations within the
> > > oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> > > in https://review.openstack.org/#/c/522290/ the assumption was made
> > > that these should be imported from oslo_db.tests.sqlalchemy.This
> > > is an immense mistake on my part that I did not expect people to go
> > > looking for the same names elsewhere in private packages and now we
> > > have a serious downstream issue as these modules are not packaged, as
> > > well as the possibility that the oslo_db.tests. package is now locked
> > > in time and I have to add deprecations there also.
> > >
> > > If anyone knows of projects (or feels like helping me search) that are
> > > importing *anything* from oslo_db.tests these must be reverted ASAP.
> > >
> > > 
> __
> > > OpenStack Development Mailing List (not for usage questions)
> > > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:
> unsubscribe
> > > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> > >
> >
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Best regards,
Andrey Kurilin.
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Andrey Kurilin
As for downstream you can do whatever you want, but it looks like this
issue should be solved in upstream. I mean if "tests" directory is located
at the top level of the repo, no one will use it.
Also, setuptools supports `exclude` option which should solve the issue as
well.



2018-02-19 17:41 GMT+02:00 Michael Bayer :

> On Mon, Feb 19, 2018 at 10:39 AM, Andrey Kurilin 
> wrote:
> > Can someone explain me the reason for including "tests" module into
> > packages?
>
> the "tests" module should not be inside packages.   Downstream we have
> CI running Cinder's test suite against packaged dependencies, which
> fails because we don't package oslo_db.tests.
>
>
> >
> >
> > 2018-02-19 17:00 GMT+02:00 Michael Bayer :
> >>
> >> Hi list -
> >>
> >> Apparently Cinder was misled by my deprecations within the
> >> oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> >> in https://review.openstack.org/#/c/522290/ the assumption was made
> >> that these should be imported from oslo_db.tests.sqlalchemy.This
> >> is an immense mistake on my part that I did not expect people to go
> >> looking for the same names elsewhere in private packages and now we
> >> have a serious downstream issue as these modules are not packaged, as
> >> well as the possibility that the oslo_db.tests. package is now locked
> >> in time and I have to add deprecations there also.
> >>
> >> If anyone knows of projects (or feels like helping me search) that are
> >> importing *anything* from oslo_db.tests these must be reverted ASAP.
> >>
> >> 
> __
> >> OpenStack Development Mailing List (not for usage questions)
> >> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:
> unsubscribe
> >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
> >
> >
> >
> > --
> > Best regards,
> > Andrey Kurilin.
> >
> > 
> __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:
> unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Best regards,
Andrey Kurilin.
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Doug Hellmann
IIRC we started doing that so that consumers building their own packages
can run the tests for the packages easily. I don't know how many people
are doing that, and apparently at least some downstream consumers aren't
packaging everything anyway so they couldn't run those tests.

Excerpts from Andrey Kurilin's message of 2018-02-19 17:39:11 +0200:
> Can someone explain me the reason for including "tests" module into
> packages?
> 
> 2018-02-19 17:00 GMT+02:00 Michael Bayer :
> 
> > Hi list -
> >
> > Apparently Cinder was misled by my deprecations within the
> > oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> > in https://review.openstack.org/#/c/522290/ the assumption was made
> > that these should be imported from oslo_db.tests.sqlalchemy.This
> > is an immense mistake on my part that I did not expect people to go
> > looking for the same names elsewhere in private packages and now we
> > have a serious downstream issue as these modules are not packaged, as
> > well as the possibility that the oslo_db.tests. package is now locked
> > in time and I have to add deprecations there also.
> >
> > If anyone knows of projects (or feels like helping me search) that are
> > importing *anything* from oslo_db.tests these must be reverted ASAP.
> >
> > __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
> 

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Michael Bayer
wow that's heavy-handed.  should that be in an oslo utility package of
some kind ?

On Mon, Feb 19, 2018 at 10:52 AM, Doug Hellmann  wrote:
> Excerpts from Doug Hellmann's message of 2018-02-19 10:15:34 -0500:
>> Excerpts from Michael Bayer's message of 2018-02-19 10:00:59 -0500:
>> > Hi list -
>> >
>> > Apparently Cinder was misled by my deprecations within the
>> > oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
>> > in https://review.openstack.org/#/c/522290/ the assumption was made
>> > that these should be imported from oslo_db.tests.sqlalchemy.This
>> > is an immense mistake on my part that I did not expect people to go
>> > looking for the same names elsewhere in private packages and now we
>> > have a serious downstream issue as these modules are not packaged, as
>> > well as the possibility that the oslo_db.tests. package is now locked
>> > in time and I have to add deprecations there also.
>> >
>> > If anyone knows of projects (or feels like helping me search) that are
>> > importing *anything* from oslo_db.tests these must be reverted ASAP.
>> >
>>
>> If we have modules or classes we don't expect people to be importing
>> directly, we need to prefix the names with _ to comply with the naming
>> conventions we have previously told everyone to look for to recognize
>> private code.
>>
>> I think it's safe to treat "tests" as an exception (after resolving
>> this case) but we should probably document that.
>>
>> Doug
>
> Once we resolve the current set of imports, we can land a patch like
> https://review.openstack.org/545859 to prevent this from happening in
> the future.
>
> Doug
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Doug Hellmann
Excerpts from Doug Hellmann's message of 2018-02-19 10:15:34 -0500:
> Excerpts from Michael Bayer's message of 2018-02-19 10:00:59 -0500:
> > Hi list -
> > 
> > Apparently Cinder was misled by my deprecations within the
> > oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> > in https://review.openstack.org/#/c/522290/ the assumption was made
> > that these should be imported from oslo_db.tests.sqlalchemy.This
> > is an immense mistake on my part that I did not expect people to go
> > looking for the same names elsewhere in private packages and now we
> > have a serious downstream issue as these modules are not packaged, as
> > well as the possibility that the oslo_db.tests. package is now locked
> > in time and I have to add deprecations there also.
> > 
> > If anyone knows of projects (or feels like helping me search) that are
> > importing *anything* from oslo_db.tests these must be reverted ASAP.
> > 
> 
> If we have modules or classes we don't expect people to be importing
> directly, we need to prefix the names with _ to comply with the naming
> conventions we have previously told everyone to look for to recognize
> private code.
> 
> I think it's safe to treat "tests" as an exception (after resolving
> this case) but we should probably document that.
> 
> Doug

Once we resolve the current set of imports, we can land a patch like
https://review.openstack.org/545859 to prevent this from happening in
the future.

Doug

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Michael Bayer
On Mon, Feb 19, 2018 at 10:39 AM, Andrey Kurilin  wrote:
> Can someone explain me the reason for including "tests" module into
> packages?

the "tests" module should not be inside packages.   Downstream we have
CI running Cinder's test suite against packaged dependencies, which
fails because we don't package oslo_db.tests.


>
>
> 2018-02-19 17:00 GMT+02:00 Michael Bayer :
>>
>> Hi list -
>>
>> Apparently Cinder was misled by my deprecations within the
>> oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
>> in https://review.openstack.org/#/c/522290/ the assumption was made
>> that these should be imported from oslo_db.tests.sqlalchemy.This
>> is an immense mistake on my part that I did not expect people to go
>> looking for the same names elsewhere in private packages and now we
>> have a serious downstream issue as these modules are not packaged, as
>> well as the possibility that the oslo_db.tests. package is now locked
>> in time and I have to add deprecations there also.
>>
>> If anyone knows of projects (or feels like helping me search) that are
>> importing *anything* from oslo_db.tests these must be reverted ASAP.
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
>
> --
> Best regards,
> Andrey Kurilin.
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Michael Bayer
On Mon, Feb 19, 2018 at 10:15 AM, Doug Hellmann  wrote:
> Excerpts from Michael Bayer's message of 2018-02-19 10:00:59 -0500:
>> Hi list -
>>
>> Apparently Cinder was misled by my deprecations within the
>> oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
>> in https://review.openstack.org/#/c/522290/ the assumption was made
>> that these should be imported from oslo_db.tests.sqlalchemy.This
>> is an immense mistake on my part that I did not expect people to go
>> looking for the same names elsewhere in private packages and now we
>> have a serious downstream issue as these modules are not packaged, as
>> well as the possibility that the oslo_db.tests. package is now locked
>> in time and I have to add deprecations there also.
>>
>> If anyone knows of projects (or feels like helping me search) that are
>> importing *anything* from oslo_db.tests these must be reverted ASAP.
>>
>
> If we have modules or classes we don't expect people to be importing
> directly, we need to prefix the names with _ to comply with the naming
> conventions we have previously told everyone to look for to recognize
> private code.

doing that now

>
> I think it's safe to treat "tests" as an exception (after resolving
> this case) but we should probably document that.

the example of three projects that did this without any of us knowing
should illustrate that we really can't make that assumption.


>
> Doug
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Andrey Kurilin
Can someone explain me the reason for including "tests" module into
packages?


2018-02-19 17:00 GMT+02:00 Michael Bayer :

> Hi list -
>
> Apparently Cinder was misled by my deprecations within the
> oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> in https://review.openstack.org/#/c/522290/ the assumption was made
> that these should be imported from oslo_db.tests.sqlalchemy.This
> is an immense mistake on my part that I did not expect people to go
> looking for the same names elsewhere in private packages and now we
> have a serious downstream issue as these modules are not packaged, as
> well as the possibility that the oslo_db.tests. package is now locked
> in time and I have to add deprecations there also.
>
> If anyone knows of projects (or feels like helping me search) that are
> importing *anything* from oslo_db.tests these must be reverted ASAP.
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
Best regards,
Andrey Kurilin.
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Sean McGinnis
On Mon, Feb 19, 2018 at 04:13:04PM +0100, Andreas Jaeger wrote:
> On 2018-02-19 16:00, Michael Bayer wrote:
> > Hi list -
> > 
> > Apparently Cinder was misled by my deprecations within the
> > oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> > in https://review.openstack.org/#/c/522290/ the assumption was made
> > that these should be imported from oslo_db.tests.sqlalchemy.This
> > is an immense mistake on my part that I did not expect people to go
> > looking for the same names elsewhere in private packages and now we
> > have a serious downstream issue as these modules are not packaged, as
> > well as the possibility that the oslo_db.tests. package is now locked
> > in time and I have to add deprecations there also.
> > 
> > If anyone knows of projects (or feels like helping me search) that are
> > importing *anything* from oslo_db.tests these must be reverted ASAP.
> 
> cinder, glance, ironic,... see
> 
> http://codesearch.openstack.org/?q=oslo_db.tests&i=nope&files=&repos=
> 
> ;(
> 
> Andreas

I don't see any recommendation in the deprecation warning. What should we be
using now instead?

Sean

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Doug Hellmann
Excerpts from Michael Bayer's message of 2018-02-19 10:00:59 -0500:
> Hi list -
> 
> Apparently Cinder was misled by my deprecations within the
> oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> in https://review.openstack.org/#/c/522290/ the assumption was made
> that these should be imported from oslo_db.tests.sqlalchemy.This
> is an immense mistake on my part that I did not expect people to go
> looking for the same names elsewhere in private packages and now we
> have a serious downstream issue as these modules are not packaged, as
> well as the possibility that the oslo_db.tests. package is now locked
> in time and I have to add deprecations there also.
> 
> If anyone knows of projects (or feels like helping me search) that are
> importing *anything* from oslo_db.tests these must be reverted ASAP.
> 

If we have modules or classes we don't expect people to be importing
directly, we need to prefix the names with _ to comply with the naming
conventions we have previously told everyone to look for to recognize
private code.

I think it's safe to treat "tests" as an exception (after resolving
this case) but we should probably document that.

Doug

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo.db] [all] please DO NOT IMPORT from oslo_db.tests.* ! projects doing this need to revert ASAP

2018-02-19 Thread Andreas Jaeger
On 2018-02-19 16:00, Michael Bayer wrote:
> Hi list -
> 
> Apparently Cinder was misled by my deprecations within the
> oslo_db.sqlalchemy.test_base package of DbFixture and DbTestCase, and
> in https://review.openstack.org/#/c/522290/ the assumption was made
> that these should be imported from oslo_db.tests.sqlalchemy.This
> is an immense mistake on my part that I did not expect people to go
> looking for the same names elsewhere in private packages and now we
> have a serious downstream issue as these modules are not packaged, as
> well as the possibility that the oslo_db.tests. package is now locked
> in time and I have to add deprecations there also.
> 
> If anyone knows of projects (or feels like helping me search) that are
> importing *anything* from oslo_db.tests these must be reverted ASAP.

cinder, glance, ironic,... see

http://codesearch.openstack.org/?q=oslo_db.tests&i=nope&files=&repos=

;(

Andreas
-- 
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi
  SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Felix Imendörffer, Jane Smithard, Graham Norton,
   HRB 21284 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev